Repository navigation
vk_fuzz_run: exit 2 when every --oracle hw,vk comparison skips - #6820
Conversation
|
Tested ee3e72b on Windows 11, CPython 3.14.7, CPU only: pass. I called all five command entry points with synthetic results for one successful hardware program and an empty Vulkan result table. Each command returned 2 on the head. Each returned 0 on parent I ran AI-assisted. |
LAKSHYA-cmd-tech
left a comment
There was a problem hiding this comment.
Independent review on Windows 11 x64, Python 3.12 (-I).
- Red-first verification on Windows: On parent revision
main(1cc6e3c12), when--oracle hw,vkran with mock VK skipping all cases, the tools returned 0 becausecounts[pass]was 0, hiding total VK skips. On this head,vk_fuzz_run.all_skippedaccurately detects when all VK comparisons were skipped, printing diagnostic and returning exit code 2. python -I -m compileall -q tools tests(exit 0)python -I tests/test_vk_fuzz_run.py(10/10 passed, coveringtest_all_skippedandtest_hw_vk_exits_two_when_all_vk_programs_skipacross all five fuzzers)python -I tests/test_pk16_diff.py(16/16 passed)python -I tests/test_vint_diff.py(19/19 passed)python -I tests/test_sdwa_diff.py(22/22 passed)python -I tests/test_wint_diff.py(19/19 passed)python -I tests/test_fmisc_diff.py(25/25 passed)python -I scripts/check_no_game_data.py(exit 0)git diff --checkclean (0).
LGTM. AI-assisted; synthetic test harnesses only, no game files or GPU used.
shayderrr
left a comment
There was a problem hiding this comment.
Summary
tools/vk_fuzz_run.py gains all_skipped(counts), true when no non-skip bucket has a positive count. All five fuzzers (pk16_diff, vint_diff, sdwa_diff, wint_diff, fmisc_diff) now call it on their Vulkan bucket and return exit 2 with "no Vulkan program ran: every one was skipped" instead of a false success. Tests drive each main() with a mocked oracle over all-skip and mixed counts, plus a guard test for --oracle vk without hardware.
Why merge
A --oracle hw,vk run where Vulkan skipped everything previously reported green; exit 2 makes the CI signal honest instead of masking an untested translation.
Verdict: Approve
Summary
Why mergeA Verdict: Approve |
Fixes SirKingg's post-merge review finding on #6306 (#6214#issuecomment-7103388097), claimed in #6750.
Problem
In
--oracle hw,vk(ortranslator,hw,vk),tools/pk16_diff.py,tools/vint_diff.py,tools/sdwa_diff.py,tools/wint_diff.py, andtools/fmisc_diff.pyonly checkedif not counts[pass]before returning0. If the hardware or translator oracle compared programs successfully, but every Vulkan GPU run incounts[vk]was skipped (or empty), the tool exited0even though no Vulkan comparison ran.Change
vk_fuzz_run.all_skipped(counts)intools/vk_fuzz_run.py(returnsTruewhen no key incountshasn > 0without askipprefix).want_vk = vk in backendsbefore strippingvkin all five fuzzers (pk16_diff.py,vint_diff.py,sdwa_diff.py,wint_diff.py,fmisc_diff.py) and returned2(printingno Vulkan program ran: every one was skipped) whenwant_vk and vk_fuzz_run.all_skipped(counts[vk]).tests/test_vk_fuzz_run.pywith unit tests forvk_fuzz_run.all_skipped, mocked--oracle hw,vkexit-code checks (all-skipped ->2, positive control with one match ->0) across all five fuzzers, and includedfmisc_diffintest_vk_without_hw_is_a_usage_error.Verification (AI-assisted; no GPU / no game files)
python -m compileall -q tools tests-> exit 0python -I tests/test_vk_fuzz_run.py -v-> 10 passedpython -I tests/test_pk16_diff.py-> 16 passedpython -I tests/test_vint_diff.py-> 19 passedpython -I tests/test_sdwa_diff.py-> 22 passedpython -I tests/test_wint_diff.py-> 19 passedpython -I tests/test_fmisc_diff.py-> 25 passedpython -I tests/test_tool_startup.py-> 2 passedpython -I scripts/check_no_game_data.py-> exit 0