Repository navigation
crosslane_fuzz: add --pc-tail-ubo like lds_fuzz and valu_fuzz (CROSSLANE-FUZZ-PC-TAIL-UBO) - #1508
PierreEbele wants to merge 1 commit into
Conversation
…ANE-FUZZ-PC-TAIL-UBO) crosslane_fuzz.py gets a pc_tail_env() helper (LEONIDA_PC_TAIL_UBO in 1/true/yes/on) and a --pc-tail-ubo flag. The flag is threaded through translate(), gpu_env(), run_gpu(), run_translator() and the --minimize path (still_fails()). rdna2spirv.py gets --pc-tail-ubo, and vk_compute_test gets LEONIDA_PC_TAIL_UBO=1, only when the flag or the environment variable asks for it. Without it, every translated program is a harness error on a GPU with 128-byte push constants. The tests mirror tests/test_lds_fuzz_cli.py. The existing fakes in tests/test_crosslane_fuzz.py take the new pc_tail argument. AI-assisted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Heads-up for maintainers: #1507 (whoalin1, opened 5 s before this one) makes the same change to AI-assisted. |
|
[KEEP]
|
|
[CLOSE] as duplicate of #1507.
|
|
Thanks for this, and for flagging the overlap with #1507 yourself! Closing as a duplicate: #1507 landed the same
AI-assisted (Claude Code, Claude Opus 5.5). |
Claimed in the coordination issue as: CROSSLANE-FUZZ-PC-TAIL-UBO (#14 (comment))
Depends on: none. It merges cleanly with #318 and #716, which also touch
run_gpu()in this file, and with #1397.What changes
This is @whoalin1's finding in #14 (02:02Z).
tools/crosslane_fuzz.pyhad no--pc-tail-ubo, so on a GPU with 128-byte push constants every translated program was a harness error.tools/lds_fuzz.pyandtools/valu_fuzz.pyalready support the flag, and this PR copies their pattern:pc_tail_env(), the same helper.LEONIDA_PC_TAIL_UBOset to1,true,yesoronenables the mode.--pc-tail-uboflag, also turned on by that environment variable.translate()passes--pc-tail-ubotordna2spirv.py.gpu_env()/run_gpu()givevk_compute_testLEONIDA_PC_TAIL_UBO=1. Both happen only when asked.run_translator()) and the--minimizepath (still_fails()). The hardware oracle path does not translate and is unchanged.Not in scope: the second half of the finding, which is how mismatches are counted when a run is done with the wrong layout. With this flag the layouts match.
Tests
On Linux arm64, in a sandbox with no network and no GPU:
PcTailUbotests intests/test_crosslane_fuzz.py, modelled ontests/test_lds_fuzz_cli.py. Withsubprocess.runmocked, they check that the translator command and thevk_compute_testenvironment get the flag only when asked. They also check that--pc-tail-uboorLEONIDA_PC_TAIL_UBO=1/yesturns it on throughmain(), and that0or an unset variable leave it off.tools/crosslane_fuzz.py:FAILED (failures=2, errors=2, skipped=2). The only failures are the new tests.OK (skipped=2). The 2 skips are the hardware-oracle tests.--self-testis OK.scripts/check_no_game_data.pyon both changed files: clean.Not run: a real 128-byte-push-constant GPU. None is available here.
AI-assisted.
🤖 Generated with Claude Code