Repository navigation
GPU fixtures: masked SAD, v_swaprel and s_movrels - #4615
YaBulochka wants to merge 1 commit into
Conversation
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). |
a6f6965 to
eb31ed1
Compare
|
Rebased onto Re-ran after the rebase: 134 tests / 329 subtests green, and |
|
Tested
No game files. AI-assisted (Claude Code). |
|
Tested All three new synthetic fixtures passed with the runtime built from this head: I checked the final self-swap in a temporary copy of AI-assisted verification. |
|
Tested eb31ed1 on Apple M2 with MoltenVK 1.4.2 (macOS 26.4 (25E246), subgroup 4..32, device Vulkan 1.4.357): three new GPU fixtures pass; full suite 155/220 passed, 58 skipped, 7 failed vs base 0db7fed 152/217, 58 skipped, 7 failed A/B; no regression.
Clean configure and build of the six GPU-suite targets on AppleClang 17 (llvm-mc 21.1.8, Python 3.13.18). No code changes of my own. No game data; synthetic fixtures and counts only. AI-assisted. |
|
Tested
The seven failures on MoltenVK are exactly the ones The three new fixtures pass on both drivers, bit-exact:
For comparison, AI-assisted. |
|
FAIL, reproduced against main 3faac55: everything substantive is green on the merged tree — both new fixture suites (4 + 6 tests), the SAD/movrel semantic siblings, clean merge, hand-written .asm fixtures — but tests/test_docs_design_rows.py fails here and is green on main: the rewritten SAD row at docs/design.md:392 uses backslash-space-pipe escapes inside the ABSDIFF spelling, which split the row into 5 cells under the 3-cell header (confirmed the offending escapes on that line). Escape as a tight backslash-pipe or use a non-pipe absolute-value spelling and this should be ready. Also worth a look: possible coverage overlap with #3545 for v_mqsad_u32_u8. Checks pending; the branch otherwise merges clean with #4617 (verified pairwise). AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run). |
|
Tested |
|
Tested
Xbox 1.0.2.1 coverage: 0 of 26,503 local |
eb31ed1 to
38a8ace
Compare
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.
38a8ace to
a4ff4b3
Compare
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.