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>
This commit is contained in:
whoalin1
2026-11-25 18:35:47 +02:00
committed by Man Alin
parent 3bdec8fde3
commit 41c49ee83c
2 changed files with 13 additions and 0 deletions

View File

@ -239,6 +239,14 @@ class ProgramText(unittest.TestCase):
build=folder, work_parent=folder, retries=retries))
self.assertEqual(got, ["vk_compute_test: crashed (exit 3221225477)"])
self.assertEqual(calls, [0]) # the retries are spent first, then it is skipped
# A signal death is a negative subprocess returncode on POSIX; it is a crash skip too.
with tempfile.TemporaryDirectory() as tmp:
with mock.patch.dict(os.environ, {"VK_FUZZ_SKIP_CRASH": "1"}):
got = self._run_with_fake_gpu(
tmp, [(-11, "", "")], [],
lambda folder, retries: R.run_programs([["v_mov_b32 v8, 0"]], words=1, wave=32,
build=folder, work_parent=folder, retries=retries))
self.assertEqual(got, ["vk_compute_test: crashed (exit -11)"])
# Both harness errors stay fatal under VK_FUZZ_SKIP_CRASH: 1 is a CHECK failure, 2 a usage error.
for fatal in ((1, "", "FAILED vkCreateShaderModule"), (2, "", "usage: ...")):
with self.subTest(exit=fatal[0]), tempfile.TemporaryDirectory() as tmp:

View File

@ -18,6 +18,11 @@ wave64_text() rewrites the wave32 spellings of lane masks (vcc_lo, s20, s21) as
cf_diff), bypassing llvm-mc while keeping the same translation and per-lane Vulkan execution path.
For wave64 on a 32-wide GPU, LEONIDA_W64_EMULATE=1 passes --wave64-emulate to the translator.
LEONIDA_PC_TAIL_UBO=1 translates with rdna2spirv.py --pc-tail-ubo and passes the same variable to vk_compute_test
for 128-byte push-constant devices. VK_FUZZ_SKIP_CRASH=1 records any vk_compute_test exit other than 0, 1, 2 or 77
as a skip, including signal deaths (which Python reports as negative return codes); exits 1 and 2 stay fatal because
they are harness/check failures, not driver crashes.
opaque=True (the default of run_programs) keeps the driver from folding the program: a `v_mov_b32 vN, K` seed becomes
`v_xor_b32 vN, K ^ FILL, vF`, where vF is read from the output buffer, which vk_compute_test fills with 0xEEEEEEEE.
The program computes the same values at run time, but a compiler that sees literal operands folds them itself, and