Repository navigation
Conversation
IAmNotSiob
left a comment
There was a problem hiding this comment.
tunczzz's cf_diff sweep already shows main's 43 mismatches go to 0 with this plus #615, and tests pass with main here (805). lgtm \o/ AI-assisted review (Claude Code).
|
GPU run of #663 (eb89f82), which asks for a 64-wide subgroup or Setup: Windows 11. AMD Radeon Graphics (Ryzen 7 7800X3D iGPU, RDNA2), driver 32.0.21043.5001, native wave64 (subgroup 32..64). RTX 4070 Ti SUPER, driver 610.88, subgroup 32. Test programs from main c432cdc (llvm-mingw clang), llvm-mc 23.1.6.
Native wave64 and emulated give the same words. (AI-assisted run, counts only.) |
|
Ran |
|
Tested eb89f82 on RTX 4090 (driver 621.14, 32-wide subgroups), Windows 11 26200: pass (32-wide half)
This still needs a native wave64 (AMD) run. No game files used. AI-assisted run (Claude Code). |
|
Tested #663 (eb89f82) on an NVIDIA GTX 1060 6GB (Pascal, subgroup 32..32, NVIDIA 582.78, With LEONIDA_W64_EMULATE=1 (this device has no 64-wide subgroup, so native wave64 skips as expected): |
eb89f82 to
a07e9e0
Compare
|
Tested
|
|
Tested on Linux (CachyOS, kernel 7.3.5, Mesa 26.3.1 RADV), RX 9070 XT (gfx1201) and the Ryzen 7 9800X3D iGPU (gfx1036), through #4241's head
One note for the description: this PR no longer changes AI-assisted (Claude Code). |
|
Thanks @AwkGrep256, you're right. I'd retitled the PR but left the old body. The description now says the translator change landed in #3225 ( |
|
Tested 676d59c on AMD Radeon RX 9070 XT (RADV GFX1201) and the Ryzen 7 9800X3D iGPU (RADV RAPHAEL_MENDOCINO, gfx1036), Mesa 26.2.6, Linux 7.3.4: pass, no regressions.
No game files. AI-assisted. |
…_mask32 GPU test The translator side of this PR (s_not_b32 on a wave32 lane mask votes its SCC) landed on main through ItsNotRexed#3225 (SweatierKey), so the branch now keeps main's tools/rdna2spirv.py and adds the checks around it: - tools/cf_ref.py models s_not_b32/b64; tools/cf_diff.py generates s_not in the sccmask/csel shapes; tests/test_cf_diff.py has the two s_not regression cases (they fail with the old per-lane SCC). - runtime/test/shaders/cs_scc_mask32.asm: @kotorvr's compute test for s_and + s_cselect, s_andn2 + s_cbranch_scc1, s_not, s_or, s_xnor, registered as a wave32 dump in check.py and run_gpu_tests.py (skipped below 32 lanes). - docs/design.md: s_not_b32 in the rule, the GPU results and @kotorvr's corpus count. AI-assisted (Claude Code). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…alf GPU test The translator side of this PR (wave64 32-bit ops on one half of EXEC/VCC: exec_lo writes and the half's SCC vote) landed on main through ItsNotRexed#3225 (SweatierKey), so the branch now keeps main's tools/rdna2spirv.py. The new shapes below pass on it; they found both bugs on the translator before ItsNotRexed#3225: - A register written to exec_lo set all 64 lanes, and any op but s_mov_b32 into exec_hi was rejected ("destination exec_hi"). - The SCC of a 32-bit op on one half of a mask took the lane's own bit. Fuzzer: cf_ref treats every _b32 op as a 32-bit word op (halves included) and models s_cmp_eq/lg_u64 and s_cselect_b64; cf_diff adds e64 compares into SGPR masks (saveexec, v_cndmask), constant EXEC, half-EXEC ops, half-mask SCC, s_cmp on masks and s_cselect between masks, and counts literals in instruction sizes. GPU test cs_w64_exec_half (wave64 dump; expected 1 0 1 1 0 3 9 9). Depends on: ItsNotRexed#615 AI-assisted (Claude Code). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
676d59c to
1f87f23
Compare
|
Rebased the FUZZ-8 stack onto Tests (WSL Ubuntu, llvm-mc 21, CPU only; the PC's RTX 5070 Ti not used): on #615's head, |
|
Tested 1f87f23 on Windows 11 Pro 26200: pass, no regressions. AMD Radeon RX 9070 XT (AMD 26.11.2, Vulkan 1.4.359, subgroup 32..64, native wave64) and the Intel Graphics iGPU of a Core Ultra 5 225 (driver 101.8860, subgroup 8..32, LEONIDA_W64_EMULATE=1). Runtime built from 561b65a with MSVC 19.50 (its runtime sources are identical to this head), Vulkan SDK 1.4.350, llvm-mc AMD LLVM 23.
No game files. AI-assisted. |
|
Tested
No game files used. AI-assisted (Claude Code). |
Item: FUZZ-8 finding, posted in #374: #374 (comment)
Depends on: #615 (stacked on it; only the last commit,
1f87f232, is new here).Update 2026-11-23: this PR no longer changes
tools/rdna2spirv.py. #3225 (SweatierKey,99c048f7) fixed both translator bugs below while this PR waited, and the rebase ontomain98fa503fkeepsmain's translator. What's left is the fuzzer shapes that found the bugs and a GPU regression test that pins the fix. Both pass onmain's translator, natively and with--wave64-emulate.Findings (fixed on
mainby #3225; found here independently)Found by
tools/cf_diff.pywith the new mask shapes below, on the translator before #3225:exec_lochanged all 64 lanes.v_cmp_gt_u32 vcc, 8, v1; s_and_b32 exec_lo, exec_lo, vcc_lomust leave lanes 32-63 alone, but lanes 32-63 switched off.s_mov_b32 exec_lo, s0did the same. Any op buts_mov_b32intoexec_hiwas rejected (Unsupported: destination exec_hi).s_and_b32 s50, vcc_hi, exec_hi; s_cbranch_scc0must vote over lanes 32-63 only.Fuzzer
tools/cf_ref.py: every_b32op is a 32-bit word op (exec_lo/hi,vcc_lo/hi, SGPRs), which is what the hardware does in both wave sizes. It also addss_cmp_eq/lg_u64ands_cselect_b64.tools/cf_diff.py, new shapes:v_cmp_*_e64into an SGPR mask feedings_and_saveexecandv_cndmask_b32_e64; constant EXEC (s_mov_b32 exec_lo/exec_hi, literal);s_and_b32on one EXEC half; SCC of half-mask ops;s_cmpof masks against 0;s_cselectbetween masks. Instruction sizes now count literals.destination exec_hi) in 600 cases, all wave64. Onmain98fa503fit gives 0 and 0, and so do 800 more programs over the stack tip (seeds 4242/4243, wave32/64, depth 4 dispatch loop).tests/test_cf_diff.py: five half-mask regression cases in both forms. They pass onmainand fail on the translator before rdna2spirv: fix 32-bit bitwise SALU ops on wave32 and wave64 half lane masks #3225.GPU test
runtime/test/shaders/cs_w64_exec_half.asmis a wave64 dump (one wave64, 64 threads) registered incheck.pyandrun_gpu_tests.py. Expectedout[0..7] = 1 0 1 1 0 3 9 9. It needs a 64-wide subgroup orLEONIDA_W64_EMULATE=1. Testers' results are in the comments: native wave64 on RDNA2/RDNA3/RDNA4 (RADV and AMDVLK), and emulated on several NVIDIA GPUs, all1 0 1 1 0 3 9 9. I didn't run it myself; the PC's RTX 5070 Ti has 32-wide subgroups.Tests
WSL Ubuntu, llvm-mc 21, on
676d59ce:tests/test_cf_diff.py,test_cf_ref.py,test_run_gpu_tests.pyandtests/semantic/test_spirv_wave_interp.pygive 139 passed, 132 subtests. The fullpytest tests --ignore=tests/semanticon the stack tip shows only the 7 failures plainmainhas (test_joaat_agreement, fixed by #4753;test_rdna2_decodellvm-mc parity).AI-assisted (Claude Code). No game data.
🤖 Generated with Claude Code