Repository navigation
compute: accept EXEC as a 64-bit scalar operand in direct compute - #3245
Conversation
EXEC (126) is accepted as the even source pair of s_bcnt0/s_bcnt1, s_ff0/s_ff1 and s_flbit *_b64, and as the s_bfm_b64 destination. In the wave64 model each host half holds both EXEC words: both are set at entry, lane-mask writers publish both through the exchange, and scalar writes are identical in both halves; VCC has no such guarantee and stays refused as a source and as the s_bfm_b64 destination. New test native_wave64_exec_salu (wave64 64 and 128 threads, wave32 32): a sparse EXEC count, s_bfm_b64 exec, 16, 0 and exec, 32, 32, with three refusal controls. Depends on R0Y00#3006 for the wave64 model.
R0Y00
left a comment
There was a problem hiding this comment.
Reviewed 01dc357 on main 4d7265c (trial 6d0c144a788d0ef1a9dc8ac099d3f5fecdcce2de). The EXEC low and high words are read as a pair for the bit operations, and the mask instruction writes both words. The 64- and 128-thread fixtures tested masks spanning both host halves, write suppression outside EXEC, and the wave32 high-word control. VCC and odd pairs still refuse in the affected operations. Both Debug and Release /O2 passed 7/7, no skips.
ctest --test-dir <build> --no-tests=error --output-on-failure -j 1 -R "^native_(direct_container|wave_request_hardware|wave64_exec_salu_hardware|salu_bitscan64_(controls|hardware)|salu64_(controls|hardware))$"
RTX 4060 Laptop, driver 32.0.16.1656, Windows 11 26200.9974, standalone replay without the debug layer. Required Windows CI passed.
Please update docs/experiments/native-direct-salu-bitscan64.md and docs/experiments/native-salu64-ops.md before merge. The former still lists EXEC as a source refusal (the control is now EXEC_HI), and the latter says EXEC destinations are refused without listing the new s_bfm_b64 case. Please include the new fixture command and keep the unrelated CSELECT/NOT limits for #3262.
native-direct-salu-bitscan64 lists EXEC as a valid S0 and explains why its source refusal control now uses exec_hi; native-salu64-ops lists s_bfm_b64 into EXEC, keeps the s_cselect_b64 / s_not_b64 EXEC destination refusal, and adds the native_wave64_exec_salu_hardware command.
|
Thanks for testing it. Pushed
No code change. AI-assisted. |
R0Y00
left a comment
There was a problem hiding this comment.
Reviewed 08b6cff. Its change from 01dc357 is limited to the two experiment notes. Both describe accepted EXEC pairs, the EXEC_HI negative and the coverage actually run. The CSELECT and NOT limits remain documented for #3262.
I reran the seven focused cases on main c827d8b plus this head (tree 6fc3db43c84b2e1098808c23e27f98a07cf164ba). Debug and Release /O2 each passed 7/7, zero skips. The docs link check passed. Main a0b45d4 adds only the staging guard and its documentation/preset fixture, giving clean tree 2d76d3f3e7a4ac7a175fe15f5f712c5dd8784649 with the same compiler and EXEC fixture files.
ctest --test-dir <build> --no-tests=error --output-on-failure -j 1 -R "^native_(direct_container|wave_request_hardware|wave64_exec_salu_hardware|salu_bitscan64_(controls|hardware)|salu64_(controls|hardware))$"
python -B tests/docs_links_check.py
RTX 4060 Laptop, driver 32.0.16.1656, Windows 11 26200.9974, standalone replay without the debug layer. Required Windows CI passed on 08b6cff.
Part of #2935, claimed in #3224 (item 1 of my third comment there). Target branch
main.Change (
src/gfx1013_direct_compute.inl): direct compute accepts EXEC (126) as a 64-bit scalar operand.s_bcnt0/s_bcnt1,s_ff0/s_ff1,s_flbit_i32_b64ands_flbit_i32_i64, which were refused as "invalid s_bcnt1_i32_b64 source" and the like.s_bfm_b64destination, which was refused as "invalid s_bfm_b64 destination".s_bfm_b64destination. Nothing guarantees both of its words in wave64, for example after a write tovcc_loalone.tests/native_salu_bitscan64_check.py: its EXEC-source refusal control now usesexec_hi(127), which stays refused, because EXEC (126) is accepted.Tests. The setup was Windows 11 with an NVIDIA GeForce RTX 5080 and DXC from the Windows SDK 10.0.26100, Release, on
main7364e6a9plus this commit.native_wave64_exec_salu_hardwarecovers wave64 requests with 64 and 128 threads, two groups each:s_bcnt1_i32_b64on a sparse EXEC that spans both halves, giving 15 in the first guest wave and 16 in the second;s_bfm_b64 exec, 16, 0, after which only guest lanes 0-15 store;s_bfm_b64 exec, 32, 32, after which only lanes 32-63 store;s_bcnt1_i32_b64on EXEC with an explicitexec_hi.s_bcnt1_i32_b64on VCC,s_bfm_b64into VCC, and an odd source pair.main'scompile_dxil, the new test stops at "invalid s_bcnt1_i32_b64 source".-R "native_wave64|native_salu|native_slot67|native_direct_container".Measured with
compile_dxil --jobs 8 gfx1013-direct-cs@36 --requests,main7364e6a9against this commit.s_bfm_b64destination,s_bcnt1_i32_b64source ors_ff1_i32_b64source refusals above.AI-assisted.