Repository navigation
fuzzers: skip wave32 runs vk_compute_test could not pin to 32 lanes - #1447
Conversation
valu_fuzz.py, lds_fuzz.py and crosslane_fuzz.py ask vk_compute_test for 32-lane subgroups (VKC_SUBGROUP_SIZE=32) for wave32 programs, but they ignored its "compute subgroup size: 32 not available" line. On a device that can't pin that size (Mesa llvmpipe: 8 lanes) every wave32 program was judged at the driver's size and its cross-lane results came out as translator mismatches. On main f85582e with llvmpipe, lds_fuzz --emulate --programs 400 --seed 5150 gave 215 mismatches, all wave32, and crosslane_fuzz --wave 32 --no-maskdata gave 68 of 100. Those wave32 programs are now skips, as check.py's unpinned_subgroup_skip does for its lane-mask dumps. Programs translated with --wave64-emulate use no subgroup operations, so they are still compared at any size (400 of 400 match on llvmpipe). crosslane_fuzz counts the skips in its summary and exits 2 when every program was skipped, as the other two fuzzers already do. The line is parsed by compute_fixture.unpinned_subgroup, shared by the three fuzzers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
abf4aef to
449cb7b
Compare
|
This covers the "Not run on a 32-wide GPU" case, on two of them. Tested 449cb7b (0 behind main) against main bb2e184 on Windows 11 Home 10.0.26300, Python 3.14.7, llvm-mc 21.1.8, Vulkan SDK 1.4.363.0, with main's
Each line is identical on main and this PR, so as you expected, a device that pins 32 lanes skips nothing new. The 50 AI-assisted (Claude Code). No game files. |
|
Tested 449cb7b on NVIDIA GeForce RTX 3060 (Ampere, subgroup 32..32, pins 32 for compute), NVIDIA driver 610.88, Windows 11 Pro 26200: pass. This is the other side of the PR's llvmpipe runs: on a device that can pin 32 lanes, nothing is skipped and the results are the same as main. Worktree of the PR head; vk_compute_test from a main (bb2e184) MSVC build; llvm-mc 21.1.8;
AI-assisted (Claude Code). |
Claimed in the coordination issue as: FUZZ-35 (#1380)
What and why
valu_fuzz.py,lds_fuzz.pyandcrosslane_fuzz.pyaskvk_compute_testfor 32-lane subgroups (VKC_SUBGROUP_SIZE=32) for wave32 programs, but they never read its answer. Where the device can't pin that size,vk_compute_testprintscompute subgroup size: 32 not available(#774) and runs at whatever size the driver picks. The fuzzers then judged those words anyway, so a wave32 program's cross-lane results showed up as translator mismatches. TEST-71 asks people to open an issue for each mismatch, so on such a device (Mesa llvmpipe at 8 lanes, or any driver that can't pin 32 for compute) the fuzzers asked for bogus issues.On Mesa llvmpipe (subgroup 8..8), before this change:
mainlds_fuzz --emulate --programs 400 --seed 5150(f85582e)lds_fuzz --emulate --programs 60 --seed 5150(c2967a5)crosslane_fuzz --wave 32 --no-maskdata --programs 100 --seed 5150(f85582e)The fix:
compute_fixture.unpinned_subgroup(out)reads that line (the same pattern ascheck.py'sunpinned_subgroup_skip).check.pyandrun_gpu_tests.pyalready do for the wave32 lane-mask dumps.--wave64-emulatestay compared at any subgroup size. They use no subgroup operations (Gen.x_round), and on llvmpipe they match: 400/400 inlds_fuzz, and 0 mismatches over 100 incrosslane_fuzz --no-maskdata. So llvmpipe stays a real test of the emulation.crosslane_fuzzcountsskippedin its summary and exits 2 when every program was skipped, as the other two fuzzers already do for "nothing ran".docs/shader_validation.mddescribe the rule.Tested
Linux container, Mesa llvmpipe 25.2.8 (LLVM 20.1.2, subgroup 8), llvm-mc 18.1.3, spirv-tools from Ubuntu 24.04, Python 3.13. Branch rebased on
mainc2967a5. No game files.lds_fuzz --emulate --programs 60 --seed 5150: 60/60 emulated programs match, 60 wave32 skipped, exit 0. Before the rebase, with 400 programs: 400/400 match, 400 skipped, exit 0.lds_fuzz --wave 32: everything is skipped, so exit 2.valu_fuzz --family mem --emulate --programs 200: 200/200 match, 200 skipped, exit 0.crosslane_fuzz --no-maskdata --programs 100: wave32 native gives skipped 50; wave64 emulate gives 34 match, 0 mismatch and 16 hyp_only (the permlane FI = 0 hypothesis, Translator: v_permlane16/x16 FI=0 and BOUND_CTRL for source lanes off in EXEC (SHADER-74) #580). Exit 0.crosslane_fuzz --wave 32: skipped 20, "no program ran", exit 2.main's tools, the skip tests fail and the "still compared" tests pass:tests/test_lds_fuzz.py: an unpinned wave32 run is a skip, a pinned one is still compared, an unpinned emulated wave64 run is still compared, and the parser itself is checked.tests/test_valu_fuzz.py: the same three runner cases.tests/test_crosslane_fuzz.py:run_gpuraisesUnpinnedonly for wave32; an all-skipped run exits 2; skips next to matches exit 0.python -m unittest discover -s tests/semantic: 1,194 tests OK.python -m pytest tests --ignore=tests/semantic: 3,511 passed, 37 skipped.python -I tests/test_*.py, as CI runs them): pass.python -m compileall -q make_game.py tools testsandpython -I make_game.py --help: clean.vk_compute_testprintscompute subgroup size: 32, so nothing is skipped and the behaviour is unchanged; the "pinned wave32 is still compared" tests cover that path.AI-assisted (Claude Code).
Checklist
docs/design.md, with how it was confirmed. (N/A: no translator change.)🤖 Generated with Claude Code