GPU fixture cs_imgatomic_ext: image_atomic_{swap,inc,dec,fmin,fmax,fcmpswap} (GPU-IMG-ATOMIC-EXT) #345
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!345
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/345/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@milk4sale on GitHub · 2026-11-24 03:39 UTC · original
milk4sale:gpu-test/image-atomics→main· +325 −1 · 3 files · 1 commits · merged 2026-11-24 16:16 UTCClaimed in the coordination issue as: GPU-IMG-ATOMIC-EXT (#14)
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 #31 and fixed by #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
@Sangonapou on GitHub · 2026-11-24 05:05 UTC · original
Tested a31cb813 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
scripts\build_runtime.ps1(MSVC 19.51, VS Build Tools 2026);llvm-mc23.1.6 (conda-forge), SPIRV-Tools 2026.4, Vulkan SDK 1.4.363.0. No game files.run_gpu_tests.py --filter cs_imgatomic_ext --require-pass: PASS native and withLEONIDA_W64_EMULATE=1("all 64 words of the uint image, the sint image and the volume exact").mainplus this fixture. The only failures,cs_imgload_tfeandcs_imgload_d16_tfe, fail identically onmainece4ba5bon this card (main: native 197/248, emulated 229/248), the same pair as #31 / #336.@quartz-heron-58 on GitHub · 2026-11-24 07:42 UTC · original
Tested f5ef1e2d (cherry-picked onto main
d42773d0) 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
d42773d0withscripts\build_runtime.ps1(MSVC 14.44, VS 2022 Build Tools); this PR does not touchruntime/C++. llvm-mc 21.1.8 (built byscripts\build_llvm_mc.ps1), SPIRV-Tools v2026.4, Vulkan SDK 1.4.363.0. No game files.run_gpu_tests.py --filter cs_imgatomic --require-pass: 3/3 passed natively and 3/3 withLEONIDA_W64_EMULATE=1.cs_imgatomic_ext,cs_imgatomicandcs_imgatomic3deach report "all 64 words of the uint image, the sint image and the volume exact".Not run: the negative controls and the full suite with this commit.
AI-assisted (Claude Code ran the tests and wrote this comment).
@trigger337 on GitHub · 2026-11-24 08:28 UTC · original
Tested f5ef1e2d 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:
python3 scripts/run_gpu_tests.py --build runtime/build/linux --filter cs_imgatomic_ext --require-pass: PASS natively and withLEONIDA_W64_EMULATE=1("all 64 words of the uint image, the sint image and the volume exact").python3 scripts/run_gpu_tests.py --build runtime/build/linux --filter cs_imgatomic --require-pass: 3/3 passed natively and 3/3 underLEONIDA_W64_EMULATE=1(cs_imgatomic,cs_imgatomic3d,cs_imgatomic_ext).LEONIDA_W64_EMULATE=1): 231/249 passed, 16 skipped.cs_imgload_tfeandcs_imgload_d16_tfe) fail identically onmainon this GPU (#31).python3 -m unittest discover -s tests/semantic -p test_image_atomics_32.py: 3/3 passed.python3 -I tests/test_shader_checks.py: 87/87 passed.python3 -I tests/test_run_gpu_tests.py: 62/62 passed.scripts/check_no_game_data.py: clean. No game files.AI-assisted: yes
agent: yes
@aslan2142 on GitHub · 2026-11-24 16:15 UTC · original
Tested
367d91ef(merged locally onto main0af7753c) on RDNA3 and on an RDNA2 iGPU: pass.Setup:
Results:
AI-assisted (Claude Code, Claude Opus 5.5).