Commit Graph

9 Commits

Author SHA1 Message Date
41c49ee83c vk_fuzz_run: document and cover crash skips across signal exits
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>
2026-11-30 22:27:17 +00:00
3bdec8fde3 vk_fuzz_run: --pc-tail-ubo under LEONIDA_PC_TAIL_UBO, VK_FUZZ_SKIP_CRASH for driver crashes
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>
2026-11-30 22:27:17 +00:00
8cf8c854f7 Merge pull request #630 from Kal0s-design/feature/cf-gpu-run
cf_gpu_run: run the FUZZ-8 control-flow programs on a Vulkan GPU (FUZZ-8-GPU)
2026-11-28 09:02:28 +01:00
0ce4c5da8c cf_gpu_run: run the FUZZ-8 control-flow programs on a Vulkan GPU
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>
2026-11-24 10:51:36 +01:00
791778dfb3 vk_fuzz_run: read a wave32 one-word dump from vk_compute_test's larger buffer
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>
2026-11-23 22:15:13 -06:00
ee975e7fe6 vk_fuzz_run: surface failed GPU child exits 2026-11-23 17:02:20 -05:00
829e5ede1b vk_fuzz_run: validate wave, clean up temp dir on error, read index as utf-8-sig, and guard exact_verdict (#6700)
Squash-merged after diff review of PR #6700 - vk_fuzz_run: validate wave, clean up temp dir on error, read index as utf-8-sig, and guard exact_verdict
2026-11-23 10:02:36 -06:00
6de3970e15 vk_fuzz_run: exit 2 when every --oracle hw,vk comparison skips (#6820)
Squash-merged after diff review of PR #6820 - vk_fuzz_run: exit 2 when every --oracle hw,vk comparison skips
2026-11-23 09:47:05 -06:00
a284bad1e9 pk16_diff, vint_diff, sdwa_diff, wint_diff: --oracle hw,vk runs the translated programs on a Vulkan GPU (#6306)
Squash-merged after diff review of PR #6306 - pk16_diff, vint_diff, sdwa_diff, wint_diff: --oracle hw,vk runs the translated programs on a Vulkan GPU
2026-11-23 08:25:41 -06:00