Repository navigation
GPU fixture cs_imgatomic_ext: image_atomic_{swap,inc,dec,fmin,fmax,fcmpswap} (GPU-IMG-ATOMIC-EXT) - #345
Conversation
|
Tested a31cb81 on NVIDIA GeForce RTX 3080 Ti Laptop (Ampere, subgroup 32..32), NVIDIA 621.24, Vulkan 1.4.357, Windows 11 Pro (build 26300): pass Runtime built at this head with
|
a31cb81 to
f5ef1e2
Compare
|
Tested f5ef1e2 (cherry-picked onto main d42773d) on an NVIDIA GeForce RTX 4080 (Ada, subgroup 32..32), NVIDIA 621.24, Vulkan 1.4.357, Windows 11 Home (build 26300): pass. Runtime built from main d42773d with
Not run: the negative controls and the full suite with this commit. AI-assisted (Claude Code ran the tests and wrote this comment). |
…mpswap} (GPU-IMG-ATOMIC-EXT) The row for the six remaining 32-bit MIMG image atomics was CPU-checked only (tests/semantic/test_image_atomics_32.py) and said "Not GPU-verified on RDNA2". This adds the GPU fixture, judged through vk_store_test's "words" mode and check.py's STORE_WORDS like cs_imgatomic/cs_imgatomic3d: - all six ops on the 2D r32 uint image (binding 4) and the volume (binding 7); inc/dec on both sides of their wrap and with a D that is negative as a signed number; fmin/fmax with a NaN data register; fcmpswap equal, unequal, +0 against -0 and NaN; glc and non-glc - inc/dec/fmin/fmax from all 64 threads on one texel, which runs the translator's CAS loops under contention - inactive lanes held on a trap texel that must keep its fill The cases leave out what the ISA and SPIR-V leave open: NaN or denormal texels for fmin/fmax/fcmpswap and +0 against -0 for fmin/fmax. Exact on a Radeon 610M (gfx1036, RDNA2, RADV Mesa 26.2.6) and an RTX 4070 Ti (NVIDIA 620.70.06), native and LEONIDA_W64_EMULATE=1. Five planted translator faults (signed inc/dec compare, fmin/fmax exchanged, fcmpswap without the +0/-0 rule, no inactive-lane guard, no glc return from swap) each fail it on both. docs/design.md records the GPU check. AI-assisted. No game files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tested f5ef1e2 on AMD Radeon RX 6900 XT (RADV NAVI21 / GFX1030, Mesa 26.2.5, Linux 7.3.1 CachyOS, Vulkan 1.4.328, subgroup 32..64): pass. Discrete desktop RDNA2 verification:
AI-assisted: yes |
f5ef1e2 to
367d91e
Compare
|
Tested 367d91e (merged locally onto main 0af7753) on RDNA3 and on an RDNA2 iGPU: pass. Setup:
Results:
AI-assisted (Claude Code, Claude Opus 5.5). |
…U-IMG-ATOMIC-EXT-VOLUME-TAG) db19bbd gave the 4x4x4 volume in vk_store_test the D3D12 layer's whole-mip UAV tag (word 4 0x80000055, word 7 0xd7801800) and updated cs_imgatomic3d.asm to match. cs_imgatomic_ext.asm (ProjectLeonida#345) landed separately and still built the old key, so its six 3D cases missed the descriptor-table entry and the fixture failed on every device (6 of 64 sint words, first word 32 = 0x0badf00d). AI-assisted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claimed in the coordination issue as: GPU-IMG-ATOMIC-EXT (#14 (comment))
What and why
The
image_atomic_{swap,inc,dec,fmin,fmax,fcmpswap}row indocs/design.mdwas CPU-checked only (tests/semantic/test_image_atomics_32.py) and ended with "Not GPU-verified on RDNA2.". This adds the GPU fixture. It runs throughvk_store_test ... wordsandcheck.py'sSTORE_WORDS, likecs_imgatomicandcs_imgatomic3d, sorun_gpu_tests.py,check.pyandtest_shader_checks.pypick it up with no other change.runtime/test/shaders/cs_imgatomic_ext.asmcovers, on the 2D r32 uint image (binding 4) and the volume (binding 7):glc;v_cmpx, and the trap texels (uint 26, volume 62) must keep their fills.The header lists every case and the word it leaves, derived from the RDNA2 ISA rules it quotes. The cases leave out what the ISA and SPIR-V leave open: no NaN or denormal texel for fmin/fmax/fcmpswap, and no +0 against -0 for fmin/fmax (
NMin/NMaxmay return either, and native RDNA2 behaviour there is unmeasured). The row now says so.Tested
On
mainece4ba5b3plus this commit, CachyOS (kernel 7.3.3), llvm-mc 23.1.4, SPIRV-Tools v2026.4, GCC 16.2.1, implicit Vulkan layers off:LEONIDA_W64_EMULATE=1Negative controls. In a throwaway worktree I planted five translator faults in
emit_image_atomic_extra(tools/rdna2spirv.py), one at a time. Each fails the fixture on both GPUs in both modes:glcThe first version of the fixture did not catch the missing guard on the Radeon. The inactive lanes landed on the fmin contention texel, and the lockstep order there ended on the right value. That is why the trap texel exists.
Other checks:
run_gpu_tests.pyon both GPUs, native and emulated: 249 shaders. The only failures arecs_imgload_tfeandcs_imgload_d16_tfe, which are AMD Radeon 780M (RDNA3 iGPU, driver 26.10.2): cs_imgload_tfe and cs_imgload_d16_tfe fail on main - the tfe fetch status VGPR is read but never written #31 and fixed by rdna2spirv: zero the tfe/lwe status VGPR on image_load and image_load_mip (SHADER-1266) #98.cs_imgatomicandcs_imgatomic3dstill pass.tests/test_*.py: pass. The 30 pytest-based files were not run, since pytest is not installed here.scripts/run_semantic_tests.py tests/semantic: 463 files, 6,075 tests, 0 failed.ctest: 70/70, with 2 skipped as on main.scripts/check_no_game_data.pyon the fixture: clean.AI-assisted: yes (Claude Code)
Checklist
docs/design.md, with how it was confirmed. (No new rule: this GPU-confirms the existing row.)🤖 Generated with Claude Code