Recompiler: preserve split dispatch for auto-compact compute #2810
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!2810
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2810"
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?
@CryingLaughing on GitHub · 2026-11-26 14:07 UTC · original
CryingLaughing:perf/preserve-ordinary-compute-chain→main· +165 −32 · 3 files · 1 commits · closed without mergingPart of #2745.
Automatic compact lowering can select a small whole compute shader and lose a split dispatch plan available in ordinary lowering. The opt-in
XCL_DIRECT_PREFER_SPLIT=1keeps the compact whole as a fallback and retains compatible ordinary pieces for eligible direct wave32 dispatches.What is in it
Tested
Head
fe87896d84ad581ac8a25b275d0889eaf938f2b0, parentb49be1836844fe0b0cdb3211dce3cb7fb4e21ac7. RTX 4080 driver 621.01, i5-13600K, Windows 11 25H2 build 26200.9974, Rust 1.100.0 x64 MSVC and DXC 1.8.2502.11.cargo build --workspace --locked -j 4andcargo test --workspace --locked -j 4 -- --test-threads=4 --show-output. 1,437 passed, 0 failed, 47 ignored across 37 harnesses. This includes 29 explicit capability skips in the pass count.A bounded native test overlay passed 1/0/0 with zero capability skips. Both the five-piece dispatch and the compact whole fallback matched all 784 UAV words. The pieces created zero whole PSOs. The fallback created one.
A separate CPU fixture passed 5/0/0 through the normal compute entry point. Automatic lowering kept the same 4,524-byte compact whole with preference off or on. With preference on, it also kept the same 24 pieces and 384-dword stride as forced ordinary lowering. Setting the split limit to zero disabled the chain.
Independent RTX 5070 Ti Laptop verification by ettehn used the exact head with a test-only auto-plan injection and a low split limit. The retained 49-piece chain and compact whole matched all 784 UAV words in each of four cases. The compact whole stayed byte-identical to preference off. Independent GPU check
Regression run
Independent retail smoke by Anon64 compared release builds of main and this exact head on an RTX 3060 12 GB (driver 581.80), Core i9-14900KF, and Windows 11 build 26200. The 60-second runs used the same title. The head retained 102.9% of the baseline frames and used 101.7% of its peak commit, with zero crashes or device removals. The run did not establish whether the title reached the changed code.
main:
PR:
Not tested
@Anon64 on GitHub · 2026-11-26 14:44 UTC · original
Regression run of
fe87896on a newer retail title: no device removal, no crash, frames and commit within the limits.Setup: RTX 3060 12 GB (NVIDIA 581.80), i9-14900KF, Windows 11 26200, release builds of main
b49be18(this PR's base) and of this PR's exact head,scripts/smoke.ps1 -Game <title>for 60 s withXCL_NETWORK=0and A pressed every 4 s from 20 s. Main ran before and after a batch of 11 PRs and peaked at 23,855 and 23,844 MB, so the baseline held steady over the batch.main:
this PR:
102 % of main's frames, 101 % of its peak commit. One run each.
Not tested: the suite on this head; whether the title reaches the code this PR changes in its first 60 s; AMD.
AI use: Claude Code (Claude Opus 5.5) ran these runs on this machine and wrote this report.
@ettehn on GitHub · 2026-11-26 14:45 UTC · original
Focused GPU correctness check on
fe87896d84ad581ac8a25b275d0889eaf938f2b0, complementary to the smoke run above. Windows 11 x64 build 26200, RTX 5070 Ti Laptop (621.24), Rust 1.97.1 MSVC, DXC 1.8.2502.11.I extended the committed
automatic_compact_can_keep_an_ordinary_compute_chainfixture locally to execute both forms. It uses the fixture’s injected auto-plan callback and a deliberately low split limit (12), yielding 49 retained pieces (1,024 scratch dwords/group). The compact whole stayed byte-identical to the preference-off form. On the GPU, the compact whole and the retained chain each matched all 784 UAV words in four cases: skip the first, middle, or last store region, or skip none. This includes untouched guard words.cargo test --locked --offline -p xcl --lib -j 2 automatic_compact_can_keep_an_ordinary_compute_chain -- --test-threads=1 --nocapture: 1 passed, 0 failed, 0 ignored, no capability skips withXCL_ADAPTER=NVIDIAandXCL_REQUIRE_GPU=wave64. This exercises a synthetic wave32 shader. The production auto-selection threshold, GPU compile timings, and a retail title were outside this check. OpenAI Codex (6.2sol) assisted with verification.Pull request closed