Repository navigation
Conversation
|
Native wave64 hardware check on Linux with the Radeon 660M (RADV Mesa 26.3.1), fixture head
Both fixes applied independently to the fixture branch. The real Synthetic shaders only. AI-assisted (Codex). |
Grimkeh
left a comment
There was a problem hiding this comment.
Independent Linux CPU review
What changed: GPU fixtures for computed writes to exec_lo / exec_hi (SHADER-1264), plus a semantic test that expects per-lane EXEC bits.
Checked: tests/semantic/test_exec_computed.py — test_words_follow_from_the_masks OK, but test_words fails on this tip: interpreter still returns the OLD_PREFIX whole-half masks ([8192, 8192, 8192, …]). This PR adds fixtures/tests only — no rdna2spirv change — so the semantic expectation is ahead of the translator.
Needs the SHADER-1264 translator fix (or the test gated) before merge. No game files.
|
AMD Windows and NVIDIA Windows run of the new fixtures at b643ebd, merged with current
The wave64 fixture skips on the RTX 5070 Ti, because the card has no 64-wide subgroup. Both fixes give identical words on both drivers. The fixtures catch the bug on The words agree with my silicon check of the same rule on #8424 (gfx1036 Windows 10 22H2, AMD Radeon iGPU gfx1036 (driver 32.0.13036.4), NVIDIA RTX 5070 Ti (driver 621.35), Vulkan SDK 1.4.363. Synthetic values only, no game files. AI-assisted (Claude Code). |
|
Tested Each configuration starts from
One gap, for whoever picks between #8353 and #8424: the description says the two fixes treat Not covered:
No game files. AI-assisted. |
|
Tested
With either fix the words are Synthetic shaders only, no game files. AI-assisted (Claude Code). |
|
Tested b643ebd on AMD Radeon 660M (Ryzen 5 7535HS iGPU, RDNA2, subgroup 32..64, native wave64, no LEONIDA_W64_EMULATE), Adrenalin 32.0.21045.1000 (Vulkan driver 2.0.353), Windows 11 build 26200, MSVC 2026. Run with
Words match the RTX 5070 results in the description; wave64 here is native hardware rather than emulation. AI-assisted. |
|
Intel data point for
The same words as the AMD and NVIDIA runs above, so the emulated wave64 path agrees with native wave64 here. The same run on an RX 9070 XT with the newer driver 32.0.32029.2010 also gives these words, as in Diskuss's run on 32.0.32015.7029. Synthetic fixtures only, no game files. AI-assisted (Claude Code). |
|
First Intel and Linux runs, with each fix. I tested
The results are the same on both GPUs. Both fixes give identical words on every case, so these fixtures don't separate them. The |
Claimed in the coordination issue as: GPU fixture for SHADER-1264 (claim)
Depends on: #8353 or #8424. Either one is enough: they fix the same bug, and this PR's new tests fail on
mainuntil one of them lands.What and why
SHADER-1264 has two open fixes, #8353 and #8424. Both check themselves only with CPU tests. Neither adds a GPU test to the suite, so nothing on real hardware would catch the rule breaking again after a merge. This PR adds GPU tests the maintainer can run against both:
runtime/test/shaders/cs_w32_exec_computed.asm: one 32-thread wave32.runtime/test/shaders/cs_w64_exec_computed.asm: one 64-thread wave64, withexec_hiand both halves.Each case writes a computed value into
exec_lo/exec_hi, then marks the lanes that run a VALU write. Lane 0 storeslane count << 8 | lowest lanefor each case. The base value comes fromv_readfirstlane_b32, so the translator can't fold a write into a constant and take the constant path, which was already right (cs_exec_const). The cases:s_lshl_b32into EXECexec_hi: lane 35s_add_u32into EXECexec_lo,exec_hi= 0s_bfm_b32into EXECexec_hi,exec_lo= -1s_not_b32/s_mov_b32of a numbermainalreadymainalreadys_and_b32a numbermainalreadymainalreadyThe last two rows were already right before the fix; they check that a fix keeps them right. #8353 treats
s_mov_b32from a lane-mask SGPR differently from #8424, which always takes the per-lane bit.Changes:
scripts/run_gpu_tests.pyandruntime/test/shaders/check.py. The wave32 one is registered likecs_w32_andn2_exec, the wave64 one likecs_w64_mask_imm: it needs a 64-wide subgroup orLEONIDA_W64_EMULATE=1.tests/semantic/test_exec_computed.py: runs both fixtures through the translator andspirv_mini_interpon every lane, so CI checks the words without a GPU. A plain-Python reference recomputes each word from the case's EXEC.tests/semantic/fixtures/disasm/*.s(regen_fixtures.py --checkis clean), and a line intests/semantic/README.md.There's no new translator rule here, so no
docs/design.mdcontract row. #8353 or #8424 brings the rule; its row can name these tests as its GPU check.Tested
NVIDIA GeForce RTX 5070 (Blackwell, subgroup 32..32), NVIDIA 615.78.08, Vulkan 1.4.351, Arch Linux, llvm-mc 23.1.4, Python 3.14.8. Test programs built from
main867d922f0(-DLEONIDA_VULKAN_HEADERS_FETCH=ON).cs_w32_exec_computedcs_w64_exec_computed(LEONIDA_W64_EMULATE=1)test_exec_computed.pymain8192 8192 8192 7682 512 4100 0 38224 8192 16384 16384 8192 4132 0 3cb7c5b322)259 1028 3088 7682 512 4100 0 3291 1028 11264 771 8192 4132 0 31d93673c5)The CPU interpreter and the GPU agree word for word, both before and after the fix. Without emulation,
cs_w64_exec_computedskips on this device ("no 64-wide compute subgroup"), as the other wave64 dumps do. A native wave64 run on AMD would be the first hardware check of the expected words, which are worked out by hand from the ISA in each.asmheader.scripts/run_gpu_tests.py, full suite:main192/241 → this PR 192/243 (the two new tests: one FAIL, one SKIP). With translator: extract per-lane bit when Gen.dst writes non-mask to exec_lo/hi (SHADER-1264) #8353 or rdna2spirv: exec_half_write extracts per-lane bit for computed scalar values (SHADER-1264) #8424 merged: 193/243. The only remaining failure is the knownms_wave_info_s3(ms_wave_info_s3 fails natively on NVIDIA RTX 5080 (Windows, subgroup 32): all pixels read back -1 #8306).runtime/test/shaders/check.py:cs_w32_exec_computedfails without a fix and passes with either one.python -I scripts/run_semantic_tests.py tests/semantic: this PR onmainfailstest_exec_computed(intended) plustest_image_atomics_guardandtest_image_store_d16, which also fail onmain. With translator: extract per-lane bit when Gen.dst writes non-mask to exec_lo/hi (SHADER-1264) #8353: only the two that fail onmain. With rdna2spirv: exec_half_write extracts per-lane bit for computed scalar values (SHADER-1264) #8424: those two plustest_active_cache, the regression @jacob-rowlands reported on rdna2spirv: exec_half_write extracts per-lane bit for computed scalar values (SHADER-1264) #8424; this is another reproduction.pyteston the runner and fixture tests (test_run_gpu_tests.py,test_shader_checks.py,test_regen_fixtures.pyand 7 more): the same 16 failures asmainon Linux, plus 12 new subtests that pass.python -m compileall,regen_fixtures.py --check,check_no_game_data.pyon the new files: clean.AI-assisted: yes (Claude)
Checklist
docs/design.md, with how it was confirmed. (No new rule here: see above.)