mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:50:52 +01:00
[PR #1507] [MERGED] crosslane_fuzz: --pc-tail-ubo for 128-byte push-constant GPUs #1536
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1536
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1507
Author: @whoalin1
Created: 11/25/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @aslan2142
Base:
main← Head:crosslane-pctail-ubo📝 Commits (1)
706eceacrosslane_fuzz: --pc-tail-ubo for 128-byte push constant GPUs📊 Changes
2 files changed (+100 additions, -16 deletions)
View changed files
📝
tests/test_crosslane_fuzz.py(+73 -5)📝
tools/crosslane_fuzz.py(+27 -11)📄 Description
Claimed in the coordination issue: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7150962619 (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).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.