Repository navigation
crosslane_fuzz: --pc-tail-ubo for 128-byte push-constant GPUs - #1507
Conversation
|
Tested
AI-assisted; synthetic fixtures only, no game data. |
|
[KEEP]
|
|
[MERGE]
#1501 and #1508 are being marked duplicates of this PR; a maintainer still has to merge this one and close them. |
|
Tested 1aeceed on NVIDIA GeForce RTX 4060 (Ada), driver 617.42, Windows 11 Pro build 26200, native Windows: pass. llvm-mc 21.1.8 from
The three logs from this PR are byte-identical, so on a GPU with 256 push-constant bytes the 128-byte layout gives the same words as the 144-byte one. The 4 remaining mismatches ( AI-assisted (Claude Code ran the build and tests). No game files. |
1aeceed to
c7b4b3f
Compare
|
Real-hardware check on the rebased head
The important pc-tail result is that the run no longer produces the No game files. AI-assisted (SWE-2.1 Max ran/recorded the AMD check). |
On GPUs whose push constant block is 128 bytes (AMD iGPUs) every rdna2spirv.py translation fails with "need 144 push constant bytes" unless --pc-tail-ubo moves the tail to a UBO, and vk_compute_test then needs LEONIDA_PC_TAIL_UBO=1 to bind the same layout -- the same pairing lds_fuzz.py, valu_fuzz.py and image_fuzz.py already implement. This adds the flag (also enabled by LEONIDA_PC_TAIL_UBO=1) and forwards it to both the translator and the harness, including the --minimize path. AI-assisted. Tested: tests/test_crosslane_fuzz.py (76 tests), and a GPU spot-check on the AMD iGPU (Vulkan, validation on): 8 programs, wave32 native + wave64 emulate, all match with no harness errors. Co-Authored-By: Devin <noreply@cognition.ai>
c7b4b3f to
706ecea
Compare
|
Rebased cleanly onto current main ( |
|
Additional real-hardware pass on the rebased head exit 0, zero validation errors — the pc-tail-ubo layout agrees end to end (translator flag → SPIR-V set-1 block → harness bind) on the 128-byte device. AI-assisted (Devin). |
|
One more coverage data point on exit 0 — the pc-tail-ubo layout holds in native wave64 as well. AI-assisted (Devin). |
|
Merged, thanks! This is the one PR kept for
AI-assisted (Claude Code, Claude Opus 5.5). |
Claimed in the coordination issue: #14 (comment) (posted earlier as a
finding:).What
tools/crosslane_fuzz.pyhad no--pc-tail-uboflag and never forwarded it tordna2spirv.py. On GPUs withmaxPushConstantsSize = 128(e.g. AMD Radeon iGPUs) every translated program failed with "need 144 push constant bytes", and settingLEONIDA_PC_TAIL_UBO=1only for the harness ran the shader against the wrong layout — every word came back as the0xEEEEEEEEanti-fold fill counted as mismatches.lds_fuzz/valu_fuzz/image_fuzzalready handle this.Mirrors the sibling-fuzzer pattern exactly:
pc_tail_env()(LEONIDA_PC_TAIL_UBO= 1/true/yes/on),translate(..., pc_tail=)appends--pc-tail-ubo,gpu_env/run_gpusetLEONIDA_PC_TAIL_UBO=1for thevk_compute_testside (both sides must agree — the SPIR-V layout is baked at translate time),still_failsctx carriespc_tailso--minimizere-translates with the same layout, and--pc-tail-uboworks standalone or via the env var. Default off → NVIDIA/other devices unaffected.Tested
tests/test_crosslane_fuzz.py: 76 tests OK — newPcTailUboclass pins flag→translator, flag/env→gpu_env, env→enabled throughmain(); 5 existing fakes updated for the new kwarg.compileallclean;--helpshows the flag.LEONIDA_PC_TAIL_UBO=1):--programs 8 --seed 1 --wave both --modes native,emulate --no-maskdata --pc-tail-ubo→ wave32 native 4/4 + wave64 emulate 4/4 match, 0 harness errors (previously every program errored).AI-assisted (Devin).