Repository navigation
GPU test cs_w32_saveexec_ext: the saveexec / wrexec kinds of #1657 - #1771
LouisRiverstone wants to merge 5 commits into
Conversation
dcastell1
left a comment
There was a problem hiding this comment.
Hardware run (RTX 5090, 621.24, Windows 11, programs rebuilt from this tree, LEONIDA_W64_EMULATE=1): 159/167 passed, 8 skipped, 0 failed, and the new case is exact:
PASS cs_w32_saveexec_ext 4096 2560 6656 5642 4608 542 4106 2560
Those are the eight header-derived words, so s_and_saveexec_b32, s_or_saveexec_b32, s_andn2_saveexec_b32 and s_andn2_wrexec_b32 are checked against hardware in all the shapes that matter here (constant masks, an EXEC that is already partial, and the 32-bit-in-wave64 half rule). 8 skips are the M1/M2/M3 shaders the D3D12 tests run.
|
Tested 6244f79 on NVIDIA GeForce RTX 3090 (Ampere, subgroup 32..32), driver 610.88 (Vulkan 1.4.341), Windows 11 Pro 26300: pass. The PR's diff applied cleanly to
|
|
Tested
AI-assisted (ZCode agent): builds and runs executed by a coding agent on this machine. |
6244f79 to
9f00e65
Compare
|
AMD data point; the runs so far are NVIDIA. Pass. Setup: Windows 11. AMD Radeon Ryzen 7 7800X3D iGPU (RDNA2, gfx1036), driver 32.0.21043.5001, subgroup 32..64. RTX 4070 Ti SUPER, driver 32.0.16.1088. Test programs from main 89b047c, llvm-mc 23.1.6.
(AI-assisted run; counts only, no game files.) |
|
Tested First Intel result for this fixture. The Intel Windows driver has had EXEC-mask bugs before (#820), so a saveexec/wrexec test on a 32-wide Intel GPU seemed worth running. The test runs here; it isn't skipped as narrow. The neighbouring Runtime built from
CPU at this head: The previous head AI-assisted (Claude Code ran the commands; I reviewed the results). |
|
Tested on Windows 11 with two GPUs on one machine (runtime built from this PR's head, MSVC 14.51): pass. |
|
Tested 9f00e65 on AMD Radeon(TM) Graphics (Ryzen 9 9950X3D iGPU, RDNA2, subgroup 32..64), driver 26.10.1, and NVIDIA GeForce RTX 5080 (subgroup 32..32), driver 616.92, Windows 11 (26200): pass. Detached worktree at the PR head (base 003e781), runtime built from it (Ninja, RelWithDebInfo, -j 4).
No red-on-main: the PR adds a test only and changes no translator code. Not run here: the full semantic suite, and the negative control. AI-assisted. |
|
Tested
No regression against AI-assisted (Claude Code). |
9f00e65 to
14c03a1
Compare
…xed#1657 s_xor/andn1/orn1/orn2/nand/nor/xnor_saveexec_b32 and s_andn1_wrexec_b32 were merged with CPU checks only. cs_w32_saveexec_ext.asm runs each with EXEC = lanes 0..23 and S0 = lanes 10..29 (from compares) and stores (s_bcnt1 << 8) | s_ff1 of the new EXEC, a whole-wave word. It is a wave32 lane-mask dump (WAVE32_LANE_DUMPS), skipped below 32 lanes. tests/semantic/test_saveexec_ext_fixture.py runs the fixture on the CPU against tools/cf_ref.py's _SAVEEXEC and checks both runners expect the same words.
14c03a1 to
0168f6f
Compare
python -I on the file failed with ModuleNotFoundError: support, as the folder was not on sys.path (@Yourrespawn noted it on this PR, @justr4mzi on ItsNotRexed#4323). It is now inserted, as test_cs_shared_memory_limit does.
|
Tested Native wave32 on Linux RTX 5090 (driver 595.99.02) passes For a negative control, I changed only the fixture’s first AI-assisted verification. |
# Conflicts: # runtime/test/shaders/check.py # scripts/run_gpu_tests.py # tests/semantic/regen_fixtures.py
|
Tested Checked AI-assisted verification. AI-assisted verification. |
# Conflicts: # runtime/test/shaders/check.py # scripts/run_gpu_tests.py # tests/semantic/regen_fixtures.py
|
Tested
|
|
Tested AI-assisted (Claude Code). |
|
Tested The stock wave32 fixture matched all eight expected words. I also checked which individual lanes ran after each operation, since a count and first-set-bit index alone can match different masks. In a temporary variant, each active lane wrote a marker at its own index before EXEC was restored. Reconstructing the masks from those markers gave, in fixture order:
All eight matched the Boolean operations on the fixture’s source mask (lanes 10–29) and incoming EXEC (lanes 0–23), including lanes that became active again. A separate attempt to copy EXEC into an SGPR and export the word through lane 0 returned all ones or zero according to lane 0’s activity. That agrees with the mask-as-data limitation described in #293. The per-lane marker check avoids that path. AI-assisted verification. |
|
Tested PR #1771 (
Nonblocking coverage observation: the new GPU fixture checks the EXEC population count and first active lane rather than the full EXEC mask. A deliberately incorrect mask can preserve those summaries, although the existing CPU lane-level tests catch that case. Checking full masks or per-lane writes on the GPU would strengthen future coverage. AI-assisted. |
|
Tested 7984119 on NVIDIA GeForce RTX 4090, driver 595.99.02, Linux (Debian 13 userspace), llvm-mc 21.1.8: pass
Test programs built from |
# Conflicts: # runtime/test/shaders/check.py # scripts/run_gpu_tests.py # tests/semantic/regen_fixtures.py
|
Tested
Toolchain: standalone tools ( |
|
Tested 530a1de on AMD Radeon RX 6800 (RDNA2 gfx1030, AMD 26.11.2, Windows 11): pass Trial-merged onto
AI-assisted test run. |
|
Tested 530a1de on RTX 5090, NVIDIA 615.71.09, Ubuntu 26.04: pass
|
|
Tested
Baseline on AI-assisted (Claude Code). |
|
Tested
No game files. AI-assisted (Claude Code). |
A GPU test for the saveexec/wrexec kinds #1657 added with CPU checks only:
s_xor/andn1/orn1/orn2/nand/nor/xnor_saveexec_b32ands_andn1_wrexec_b32.runtime/test/shaders/cs_w32_saveexec_ext.asm, one wave32 group:(s_bcnt1 << 8) | s_ff1of the new EXEC: the whole wave's lane count and first lane, so the word doesn't depend on which lane stores it.0x10000xA000x1A000x160A0x12000x21E0x100As_andn1_wrexec_b320xA00Registration: it's a wave32 lane-mask dump, so it goes in
WAVE32_DUMPSandWAVE32_LANE_DUMPSincheck.pyand the matching lists inrun_gpu_tests.py. Likecs_w32_permute, it's skipped on devices whose subgroup is narrower than 32 (llvmpipe), so CI's llvmpipe job will skip it. It needs a 32-lane GPU (NVIDIA, AMD, Intel with 32 requested). Also registered inregen_fixtures.py, with its fixture.CPU check:
tests/semantic/test_saveexec_ext_fixture.pyruns the fixture as one wave32 group inspirv_mini_interp. The expected words come fromtools/cf_ref.py_SAVEEXEC, the FUZZ-8 ISA model, not from the translator. 3/3 pass;regen_fixtures.py --checkpasses.python -I -m unittest discover -s tests/semantic: 1453 tests OK (2 skipped).tests/test_shader_checks.pyandtests/test_run_gpu_tests.pyOK.Not yet run on a GPU. A run on any 32-lane GPU is welcome. No game files.
AI-assisted (Claude Code): I reviewed and ran the change and the tests.