Recompiler: canonicalize split compute pieces and prune unused bindings (#2088) #2711
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2711
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2711"
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?
@ZekkJJ on GitHub · 2026-11-26 07:59 UTC · original
ZekkJJ:dxil/split-piece-canonicalize→main· +1179 −125 · 4 files · 1 commits · draftCanonicalizes DXIL bitcode emission and prunes statically unused resource bindings on split compute dispatch-chain pieces so semantically identical pieces share identical DXIL containers and driver cache keys.
Part of #2088.
What is in it
crates/xcl/src/gpu/dxil/module.rs: deterministic canonical bitcode emission (Module::try_to_canonical_bitcode,BitcodePlan,PlanWalker) scoped to split compute pieces without altering unsplit compute or graphics bitcode.crates/xcl/src/gpu/dxil/shader.rs:Shader::finish_optimized_canonicalandShader::prune_unused_bindings.crates/xcl/src/gpu/dxil/module/split.rsandcrates/xcl/src/gpu/dxil/graphics_tests.rs: piece-local static binding pruning inmake_pieceplus determinism, dynamic indexing,Phi/undef, NaN/-0.0, and GPU parity tests.Tested
32.0.16.1656),rustc 1.98.1.cargo build --locked --workspace -j 2: passed (0errors).cargo test --locked -j 2 -p xcl --lib gpu::dxil:: -- --test-threads=1:189 passed; 0 failed; 3 ignored(34.89s;SKIPPED gpu::dxil::kernel::dispatch_chain_native_wave64_builds_whole: no wave64, ignoreddump_dxc_lowering,amd_reduced_seeds,debug_seed).cargo test --locked -j 2 -p xcl --test gpu_compute_e2e -- --test-threads=1:7 passed; 0 failed; 0 ignored(8.05s;SKIPPED heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows).cargo test --locked -j 2 -p xcl --test e2e -- --test-threads=1:4 passed; 0 failed; 0 ignored(11.89s).git diff --check b49be183..dfead370: passed (0errors).b49be183vsdfead370, 28 compute units / 50 split pieces / 33 unique PSOs, 3 alternating trials per arm):0validation failures across all trials; total serialized piece DXIL dropped from6,353,292 Bto6,238,132 B(-1.81%).90pieces ->32unique PSO builds,58cache hits,0validation failures) and 30 captured compute units (52pieces ->35unique PSO builds,17cache hits,0validation failures).Regression run
scripts/smoke.ps1execution on an unpacked retail build and full non-DXIL workspace test sweep before marking ready for review.Not tested
cargo test --workspaceondfead370(DXIL library,gpu_compute_e2e, ande2everified above), pairedscripts/smoke.ps1(no retail title directory on this machine), AMD / Intel hardware, Linux / Wine.AI use
Gemini); assisted with implementation, tests, benchmark validation, and PR preparation under author direction.@Lum7nt on GitHub · 2026-11-26 09:03 UTC · original
Tested on \
dfead3702a\ (\dfead370, clean PR head):ustc 1.100.0\ (\x86_64-pc-windows-msvc), DXC \1.8.2502.11\ (Windows SDK \10.0.26100.0), debug profile, \XCL_ADAPTER=nvidia.
o wave64, 3 per-lane #1426\ refusals, 2 no D3D12 debug layer, 1 \cannot disable the driver cache (0x887A002D), 1
o heap windows.
Not tested
AI use
dfead370, ran \gpu::dxil::\ and the workspace suite on this machine, and drafted this report.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.