Repository navigation
GPU fixtures: masked SAD, v_swaprel and s_movrels - #4615
YaBulochka wants to merge 1 commit into
Conversation
cs_msad_mqsad covers v_msad_u8 and v_mqsad_u32_u8: masked bytes, the sliding 64-bit windows, and 32-bit accumulator wraps. cs_swaprel covers both M0 fields, ignored M0 bits and a self-swap; cs_movrels covers s_movrels_b32/b64, an overlapping destination and an unchanged SCC. All three are wave32 dumps registered with check.py and scripts/run_gpu_tests.py, with CPU fixtures in tests/semantic. Measured on the RDNA2 iGPU (gfx1036, RADV, Mesa 27.0.0-devel): all three match their headers bit-for-bit.
Kam471
left a comment
There was a problem hiding this comment.
Ran this at a6f69651 on Windows 11, RTX 5070 Ti.
- Semantic tests (the repo's no-
-Iinvocation, since these importsupport):test_msad_mqsad_fixture.py4 tests, OK,test_rel_addressing_fixture.py6 tests, OK;git diff --checkclean. - GPU fixtures, built through the runner's translator:
--filter msad->PASS cs_msad_mqsad 48 4294967284 4294967290 7 2147483654 305419900 3735928559 255(1/1)--filter swaprel->PASS cs_swaprel 11 22 55 44 77 55 66 88(1/1)--filter movrels->PASS cs_movrels 170 204 187 204 187 187 1 238andPASS cs_movrelsd_2 11 33 33 55 1717 77 1515 1717(2/2)
All three fixtures translate and spirv-val clean, and the words match check.py's table on hardware. No blocking issue.
whattheflop
left a comment
There was a problem hiding this comment.
Tested a6f69651 on Windows Radeon iGPU with the AMD 25.10.30.02 proprietary driver. All three validated stock fixtures passed at native subgroup 32, 24/24 readback words matched, and zero Khronos validation errors or warnings were reported. Details in #166. AI-assisted.
|
Tested a6f6965 on AMD Radeon RX 7800 XT (RDNA3), RADV Mesa 26.2.6 (ACO), Vulkan 1.4.354, subgroup 32..64, Fedora 44; llvm-mc 22.1.8, GCC 16.2.1: pass.
|
|
Tested
No game files. Tested and written by Claude (Claude Code), posting from @theswiss24's account. |
|
Tested head
AI-assisted (Devin). |
Three GPU fixtures for rows that had no hardware check: masked byte SAD (
v_msad_u8,v_mqsad_u32_u8),v_swaprel_b32, and relative SGPR reads (s_movrels_b32,s_movrels_b64).cs_msad_mqsad.asmcovers the masked-byte semantics (a zero S1 byte skips that byte), the wrapping 32-bit accumulator, the four sliding windows ofv_mqsad_u32_u8, andUMax - UMinon one byte.cs_swaprel.asmswapsVGPR[D + M0[25:16]]withVGPR[S0 + M0[9:0]], with the M0 bits outside the fields ignored and a self-swap case, and checks that untouched registers survive.cs_movrels.asmmovess[D + M0]/s[D + M0 : D + M0 + 1]from a relative source, including an overlapping destination that reads the next register and ans_cselectproving SCC is not disturbed.All three are registered in
check.pyandscripts/run_gpu_tests.py(dumps, wave32 list, wave64 exclusions), with semantic fixture disassembly and CPU tests that pin the words against the model. The fourdocs/design.mdrows now name the fixtures and the measured result instead of "Not GPU-verified".Measured on the RDNA2 iGPU (
gfx1036, RADV RAPHAEL_MENDOCINO, Mesa 27.0.0-devel), exact:No translator change was needed: all three matched the derived words on the first run.
pytestfor the new semantic tests, the runner tests and the shader checks: 129 passed.build.py: 3/3 translated andspirv-valclean;regen_fixtures.py --checkclean; docs tests pass. A full semantic discovery in this worktree reports 7 failures + 2 errors in unrelated files (test_loop_ballot_barrier,test_cmp_class_f64,test_mutations), untouched by this change and present in the base tree.