VK_FUZZ_SKIP_CRASH treats every vk_compute_test exit outside 0/1/2/77 as a
driver crash skip, including the negative return codes Python uses for signal
deaths on POSIX. Spell that out in the module contract and cover it beside the
Windows access-violation case so exits 1/2 staying fatal is unambiguous.
Co-Authored-By: Devin <noreply@cognition.ai>
Translate with rdna2spirv.py --pc-tail-ubo when LEONIDA_PC_TAIL_UBO asks for it
(the 1/true/yes/on convention image_fuzz, lds_fuzz and valu_fuzz already use), so
the modules fit a device's 128-byte push-constant range; the variable also
reaches vk_compute_test through the inherited environment.
VK_FUZZ_SKIP_CRASH=1 records a vk_compute_test crash (the AMD Windows shader
compiler's access violation and the like) as a per-program skip instead of
aborting the batch; exit 1 (CHECK failures) and 2 (usage errors) stay fatal,
as does every non-zero exit without the variable.
Co-Authored-By: Devin <noreply@cognition.ai>
The dump is longer than the request in the other direction too: wave64 with words=1 asks for 64 words,
and a two-group buffer holds 128. Only the first 64 are the wave's.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The larger-buffer case filled the tail with R.FILL, the value the harness itself writes past the
program's stores, and every lane with the same word. Each lane now stores its own value and the tail
holds 0xDEADBEEF, so the test fails if read_dump took the tail, the wrong words or the wrong order.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tools/cf_diff.py checks the generated control-flow programs against two
CPU models only (cf_ref and the SPIR-V wave interpreter), so nothing
showed what a driver does with the translated control flow: how it
reconverges after a divergent if/else, a per-lane loop with a break mask
or a saveexec idiom.
tools/cf_gpu_run.py takes the same programs, turns each into a one-wave
compute program that stores v8..v11 of every lane, runs it through
vk_fuzz_run (translator + vk_compute_test) and compares every lane with
cf_ref, in wave32 and in wave64 (LEONIDA_W64_EMULATE=1 on a 32-wide GPU).
Before a campaign it runs a control, a reference with a flipped branch
that must differ from the GPU's result, and does not start if that fails.
A skipped program is counted with its reason and is never a pass. Exit
status: 0 no mismatch, 1 mismatch (minimised in summary.json), 2 nothing
ran, 3 control failed.
vk_fuzz_run.run_programs gets encoded=True for complete listings that
already carry `; encoding:` byte counts, so they skip llvm-mc. A program
the translator does not translate now reports the translator's last
error line.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
run_programs required a VKC_DUMP of exactly 4 * words * wave bytes. vk_compute_test's
output buffer is at least one 64-thread group of words (VKC_OUT_WORDS only raises it),
and VKC_DUMP writes the whole buffer, so wave32 with words=1 (128 bytes asked) got a
256-byte file and every program came back as "vk_compute_test exit 0". words=2, 4
and 8 were not affected.
read_dump() now takes the first words * wave words of a dump at least that long, and a
missing or short dump says so instead of reporting exit 0. Unit test in
tests/test_vk_fuzz_run.py.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>