Repository navigation
test: cover direct compute 32-bit integer min3 max3 and med3 - #3185
Conversation
|
LGTM on the min3/max3/med3 test coverage.\n\nNote: Like #3187, this PR removes |
|
Thanks for checking! #3159 merged at 20:43:02 UTC, 107 seconds after this PR was opened. The old branch lacked that newer commit; our three-dot diff never removed the conversions. Rebased onto Fresh Debug/Release: conversion IR (82 cases, 38 refusals), DXIL controls, and min/max/median controls passed in both builds. Stock GPU tests skip 77 on this Win10 machine. With the local Agility replay, min/max/median passed 44/44 cases on RX 7900 XT and WARP. The conversion GPU fixture reaches its final guard check but hits an existing AI-assisted; locally verified by Buhe. |
535b761 to
81693c1
Compare
pigalot
left a comment
There was a problem hiding this comment.
I reviewed 81693c16 merged over main 5612e924. The merge is clean (tree 9fdc4f0b) and git diff --cached --check is clean. The PR only adds a test and its registration.
What I traced.
- Coverage: on
main, notests/native_*.pyexercises VOP3 opcodes0x152..0x159, so this is the first direct-native fixture for the six integer min3/max3/med3 forms. - Encodings: the fixture's encodings match the GFX10 VOP3 opcodes for
v_{min,max,med}3_{i,u}32. - Oracle: the reference sorts the three operands with a signed or unsigned key and picks rank 0, 1 or 2. That is an independent model of the lowering's
bound(...)select chain atgfx1013_direct_compute.inl. - EXEC: under sparse EXEC, inactive lanes keep
SEED, and the aliased signed-median destination keeps S0.
What I ran. I built compile_dxil native_store_replay in dev and release, then ran
python .agentic\scripts\with_gpu_lock.py ctest --test-dir out/build/<preset> --no-tests=error -j 1 -V -R '^(native_int32_minmax3_(controls|hardware)|native_direct_container)$'- Results: 3/3 pass in Debug and Release
/O2, with no skips.native_int32_minmax3_hardwareexecuted all 11 cases on the GPU, and each matched all 2,064 words. - Not a skip here: the PR body reports a 77 skip for the registered hardware test on its machine. On this one it ran.
Negative controls. The production lowering is unchanged, so I mutated it in src/gfx1013_direct_compute.inl. For each, I rebuilt in dev and ran both tests:
| Mutant | Result |
|---|---|
signed_order = false (i32 compared unsigned) |
killed (first triple: 0x7fffffff vs 0x80000000 at word 11) |
| min3/max3 drop the S2 bound | killed (word 9: 0x80000000 vs 0xffffffff) |
med3 inner max(a, b) replaced with min(a, b) |
killed (word 10) |
Restored and rebuilt afterwards; git diff --quiet is clean.
Verdict: approve on 81693c16.
Environment: NVIDIA GeForce RTX 5090 driver 610.88, Windows 11 25H2 build 26200.9974, MSVC 19.52.37029, Windows SDK 10.0.28000.0 DXC, Python 3.12.10, wave32, debug layer off.
CI: Build and test on Windows passes on 81693c16.
This reply was AI-assisted.
Fixes #3184. Refs #2935, #1546.
Change
Add a focused direct-native regression for v_min3/max3/med3 in u32 and i32. The native compare/select lowering already exists (4036577); no production compiler change is needed. The prior Python/AOT implementations and tests are #1992, #1574, #1577 and #308.
Verification
Clean builds on main 5fc9f6f (includes #3155 and #3081), with only this test fixture/registration added. Both Debug and Release:
Environment: Windows 10 22H2 build 19045, RX7900XT driver 32.0.32029.2010, WARP 1.0.22.0, Agility 1.620.2 DLL-only, Windows SDK 10.0.26100.0, MSVC 19.44. Debug layer unavailable. Full physical waves deliberately avoid the independently reproduced WARP partial-wave ballot anomaly (#3160); sparse guest EXEC remains covered. No claim that the known WARP failure is fixed.
Standard commands:
On this Win10 machine, the actual readback additionally used the locally built replay copy with explicit device-factory/Agility exports, not a capability bypass.
Public source-generated fixtures only. AI-assisted; tested locally by Buhe (@xiaoqi72665).