Repository navigation
GPU test cs_w32_global_fcmpswap: float cmpswap row translation GPU-verified (RX 9060 XT, RTX 5060 Ti) - #7048
abilliontokens wants to merge 3 commits into
Conversation
|
Replying to @abilliontokens. The stock wave32 global float compare-and-swap fixture passed at For the subnormal question, I changed the operands in a temporary copy of the synthetic shader. With memory AI-assisted. |
|
Tested
AI-assisted (Claude Code). |
|
Tested e208974 on RTX 3090 (Ampere, 32-wide subgroups), driver 620.70.06, Linux, native Vulkan,
A third GPU family for the row: NVIDIA Ampere, 32-wide, where the two halves of the row are both checked per lane. |
|
Tested
The words match the ones reported on the RX 9060 XT and RTX 5060 Ti. Full suite at the PR head: 190/239 passed, 48 skipped. The one failure, |
|
Tested
Synthetic fixture only, no game files. AI-assisted (Claude Code). |
|
Tested
Synthetic project fixtures only. AI-assisted testing (Codex). |
|
Tested Both devices report
Both match the words in the Full GPU suite, That failure is not from this PR. It reproduces on clean CPU side, on the PR branch:
The translated module has four Toolchain: gcc 16.2.1, CMake 4.5.1, Ninja 1.13.2, llvm-mc 23.1.5 (AMDGPU), SPIRV-Tools 2026.4, Vulkan headers 1.4.363, Python 3.14.10. No game files were used. AI-assisted: yes. |
|
AI-assisted independent GPU verification of For |
|
Tested
Xbox 1.0.2.1 coverage: 0 of 26,503 local |
|
Tested e208974 on an NVIDIA GeForce RTX 5080, driver 620.73.04, Linux kernel 7.3.5-arch1-1, LLVM 23.1.5.
|
Item: new SHADER item. The docs/design.md translator-contract row for
ds_cmpst_f32/_rtn_f32,global_atomic_fcmpswapandbuffer_atomic_fcmpswap(the float compare-and-swap,Gen.float_cmpswap_loop) was marked Not GPU-verified. The open question there is the translation itself: does a CAS loop with anOpFOrdEqualcompare give the ISA's float compare, and does it stay exact when lanes contend? Hardware behaviour is not the question. Claimed in #6910: #6910 (comment)What this adds
runtime/test/shaders/cs_w32_global_fcmpswap.asm: one wave32 group. Its expected words are derived by hand in the header.global_atomic_fcmpswapcases:glc. It matches, so DATA is stored.glc. It never matches, so memory is unchanged.glc. No match.0x3F800000 + lane. Which lane wins is up to the hardware, so the shader stores counts, which don't depend on the winner:runtime/test/shaders/check.py(CS dumps,WAVE32_DUMPS,WAVE32_LANE_DUMPS) and inscripts/run_gpu_tests.py, with the same words in both.tests/semantic/test_global_fcmpswap_fixture.pyandtests/semantic/fixtures/disasm/cs_w32_global_fcmpswap.s(added toregen_fixtures.py) run the fixture throughspirv_mini_interp. The test checks the words against a float-compare reference, checks that the counts hold for any winning lane, and checks that both GPU runners expect the same words.docs/design.md: the row now says the translation is GPU-verified, with the two cards. It also names the existingcs_w32_fcmpswap.asm(theds_cmpst_*_f32andbuffer_atomic_fcmpswapcases), which had never been reported on a GPU for this row. Subnormal inputs on hardware stay unmeasured.Tested
Commit
6dcf865b3(tested). The branch head merges origin/main on top of it, and I re-ran the CPU tests there.GPU runs, Windows 11. Each card was pinned alone through the HKLM loader settings, and afterwards all 5 Vulkan devices were back:
scripts/run_gpu_tests.py --filter fcmpswapcheck.pyon the two built fixturescs_w32_fcmpswap ok,cs_w32_global_fcmpswap okcs_w32_fcmpswap ok,cs_w32_global_fcmpswap okThe
check.pyruns used a build folder holding only these two fixtures, so the other names in its list report missing files. That is not a failure of these tests.The two runs printed identical lines on both cards.
CPU tests, at the branch head:
Mutation check: I replaced the loop's
OpFOrdEqualwith a bit compare (OpIEqualon the raw words). With that change,test_translated_shaderfails on words 1, 3, 5, 6 and 7 (for example 32 lanes report old value 0 instead of 1). So the fixture would catch a bit-compare translation.No game data is used: the fixture and its words are synthetic.
AI-assisted (omp orchestrator)