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
No game files used. AI-assisted (Claude Code). |
…_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>
1f87f23 to
a305f50
Compare
|
Rebased onto
No game files. AI-assisted (Claude Code). |
|
Tested a305f50 on AMD Radeon RX 5700 XT (RDNA1), Mesa RADV 26.2.5, Linux (CachyOS 7.3), i7-7700K: pass (AMD wave64 half)
AI-assisted (Claude Code), run by a person; built and run in a sandbox without network. |
|
checked: #663 (CPU side; GPU fixture blocked by local toolchain) | with: applied the last-commit diff on main 5d74c27, ran tests/test_cf_diff.py (58 passed), tests/test_cf_ref.py (26 tests OK), tests/test_run_gpu_tests.py (62 tests OK) | on: Windows 11, RX 9060 XT | result: CPU PASS Could not run cs_w64_exec_half / cs_scc_mask32 on the GPU: the only llvm-mc on this machine (LLVM 23.1.6 at D:\llvm) is built without the AMDGPU target ("unable to get target for 'amdgcn-unknown-amdpal'"), so build.py cannot assemble the fixtures. The fuzzer and semantic-test side is verified; the wave64 GPU fixture still needs a run on an AMDGPU-enabled llvm-mc. AI-assisted check. |
|
Tested a305f50 on AMD Radeon 8060S (Strix Halo, gfx1151, subgroup 32..64), RADV Mesa 26.3.1, Arch Linux container on Ubuntu 24.04.5 / kernel 7.0.0-38; LLVM 23.1.5, SPIRV-Tools v2026.4: pass.
Synthetic fixtures only, no game files. AI-assisted (Claude Code). |
|
checked: #663 GPU side now PASS too — update to the earlier CPU-only note | with: llvm-mc via WSL Fedora (/usr/bin/llvm-mc, LLVM with amdgcn target), spirv-as/spirv-val from Vulkan SDK 1.4.363.0, run_gpu_tests.py --filter | on: Windows 11, AMD Radeon RX 9060 XT (RDNA4, wave32/64) | result: PASS
Plus the earlier CPU side: test_cf_diff.py 58 passed, test_cf_ref.py 26 OK, test_run_gpu_tests.py 62 OK. For the record, the Windows LLVM at D:\llvm has no AMDGPU target, but WSL Fedora's /usr/bin/llvm-mc does; LLVM_MC="wsl -d FedoraLinux-44 -e /usr/bin/llvm-mc" works with build.py and run_gpu_tests.py as documented. AI-assisted check. |
|
Tested
AI-assisted: Codex GPT-6.2 Sol ran the tests, Claude Opus 5.5 reviewed the report. No game files used. |
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