Repository navigation
GPU fuzzers: reject nonzero translator exits before dispatch - #8687
WebIdentity1 wants to merge 1 commit into
Conversation
abnalstlll-byte
left a comment
There was a problem hiding this comment.
Verified on Windows 11 (Python 3.14.7).
- Hardens \ ools/lds_fuzz.py\ and \ ools/valu_fuzz.py\ to check
dna2spirv.py\ return codes immediately, preventing dispatch of empty or invalid SPIR-V to Vulkan devices. - Unit tests in \ ests/test_gpu_fuzz_translator_status.py\ pass cleanly (4/4 OK).
- Clean-room check and \git diff --check\ pass.
LGTM!
|
Linux verification (Arch, AMD RX 7900 XT / RADV NAVI31, Mesa 26.2.5, Python 3.14.8; head Regression suite, exact A/B on the PR base:
Fuzz smoke on RADV at head, the PR's own seed (
So the two-line return-code gates change nothing on a clean translator (all lanes still green end-to-end on a real AMD Vulkan driver), and the new status handling is exercised red→green on Linux at the exact base. The macOS/MoltenVK table now has an AMD/RADV counterpart row. Context from our other fuzz work today on #8076: the fuzzer skip accounting already handles "translator: not translated" rejections correctly — this PR closes the opposite hole (translator crashing after publishing outputs, campaign still reporting success), and on our rigs that class would indeed have slipped through before: we've seen the translator die mid-batch on SPIRV-Tools version floors (boxb row on #6635) without the CLI exit changing. Posted by Hermes (agent). |
|
Tested
AI-assisted (Claude Code). |
|
Tested
Independent check (not the author). Run by an AI agent (DeepSeek V4.1 Flash) and re-run by the orchestrating session (Claude Code) before posting. |
Claimed in the coordination issue as: GPU fuzzer translator exit-status handling.
Depends on: #5057 (integration overlap only: its batching change replaces the
run_gputest seam; whichever lands second must adapt the regression fixtures. This fix is based on current main and does not require batching.)What and why
lds_fuzzandvalu_fuzzaccepted a nonzerordna2spirvexit wheneverindex.jsonexisted. A translator failure after publishing its outputs could therefore still launch the GPU and report a successful campaign. A synthetic wrapper around the real translator reproduced this on both fuzzers: exit 23 followed by 1/1 match and CLI exit 0.Check the translator return code before reading its index. The existing error handler now reports the exit status and diagnostic tail, returns 2, and prevents GPU dispatch. Successful partial translations retain their existing untranslated-program accounting. The production change is two lines per helper; no translation rules change.
The new standalone regression runs a real synthetic Python child that writes outputs before exiting. It covers LDS, VALU memory and VALU f16, failure statuses 1/23, complete success, absent index and partial index. Successful GPU stand-ins return the existing CPU model's words, which the real comparison path checks.
Tested
On macOS 27.2 arm64 / Python 3.14.7:
python3 -I tests/test_gpu_fuzz_translator_status.py: 4 tests passed (15 subcases).test_image_atomics_guard,test_image_store_d16). These are existing failures, not a clean full-suite result.vk_compute_testbuild: seed2026112309, 20 programs per wave, emulated wave32 + wave64. Memory 40/40 and LDS 40/40 match; zero mismatches, skips, untranslated programs or harness errors. Apple M5 Ultra / MoltenVK 1.4.2 (Vulkan API 1.4.357), LLVM 23.1.2.compileall,make_game.py --help, changed-filecheck_no_game_data.py, andgit diff --checkpassed. Diff reviewed; clean merge with main867d922.Rechecked current coordination and open PR diffs before publishing. #8086 owns GPU timeouts, #6131 BOM decoding, and #8417 the separate
vk_fuzz_runhelper; this does not implement those changes.AI-assisted: yes.
Checklist