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>