Repository navigation
Recompiler: give a compute loop above the split target its own dispatch piece - #2107
Conversation
|
Tested Clean detached PR head
& 'L:/XclTooling/pr1975-b62e6e3/target/debug/build/xcl/97fdf2b9ff8e1482/out/xcl-97fdf2b9ff8e1482.exe' gpu::dxil::module::split::tests::dispatch_chain_oversized_loop_matches_whole --exact --test-threads=1 --nocapture1 passed, 0 failed, 0 ignored, 0 skipped, 1,128 filtered out, 0.48 s. Fixture and wrapper exited 0. The oversized loop occupied its own piece at a target size of 40, and the dispatch chain contained at least three pieces for both wave forms. All 96 native-wave32 words and 192 split-wave64 words matched in the whole-dispatch vs CPU reference and split-chain vs whole-dispatch comparisons. Not tested Native wave64, other adapters, planner ceiling rejection cases, dispatch timing, workspace suite, and retail smoke. AI use T3 Code / Codex ( |
d131645 to
d4b8717
Compare
|
Same as on #2080, plus this PR's tests. A run with vkd3d-proton as the host D3D12. 4 of the new dispatch-chain GPU tests crash the test process inside vkd3d-proton. Tested
Not tested
AI use
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
In the second XCLM run no graphics pipeline was built after world load (74 s): the workers were all on huge compute pipelines and the split pieces of xcl-dev#2080/xcl-dev#2097/xcl-dev#2107, which went to the lane taken first. Every draw went on with its stand-in (7936 of 19940 skipped) and the screen stayed black. A quarter of the workers (at least 2, XCL_PSO_GFX_WORKERS) now take graphics builds only, and compute pieces go to the front of the compute lane. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
AMD RDNA4 data for #2107: on the RX 9070 XT this change splits 347 more retail compute programs (462 → 809 of 2,689). The 12 measured build 9.1× faster split than whole (844 s → 93 s). Every build succeeded, and the PR's tests pass on this card. Setup
Census (
Measured
Tests on this card (
Not tested
AI use: Claude Code (Claude Opus 5.5) ran the census, timings and tests and drafted this. Counts and timings only, no game data. |
|
A follow-up for #2107 from the RDNA4 side. The retail program
Numbers and method: #1809 comment. AI use: Claude Code (Claude Opus 5.5) wrote this. Account owner away; counts and timings only. |
|
Combined with #2126 on the RX 9070 XT, this PR's 12 newly split programs plus AI use: Claude Code (Claude Opus 5.5) wrote this. Account owner away. |
|
Recheck on 697e8fd Windows 11 build 26300, RTX 3080 Ti (621.35), Ryzen 7 9800X3D, Rust 1.99.1 MSVC, DXC/DXIL 1.8.2502.11, debug.
The planner's four-times cutoff test passed on both builds. The oversized-loop GPU fixture matched the whole shader and the CPU reference for all 96 native-wave32 and 192 emulated-wave64 outputs on each build. This recheck did not repeat the timing measurements below or run the retail title. AI-assisted. Codex (GPT-6, exact variant unavailable) ran the recheck and drafted this update. Earlier timing run Independent GPU execution timing on d4b8717, RTX 3080 Ti / 621.35, Windows 11 build 26300, Ryzen 7 9800X3D, Rust 1.99.1 MSVC and DXC 1.8.2502.11. The stock
The test command was AI use: Codex (GPT-6, exact variant unspecified) extended and ran the synthetic test and drafted this report. |
|
Tested — RX 7800 XT (RDNA3), native Windows Clean release builds of #2080 at
Retail smoke One 150 s run per build, run sequentially with
Both reached the loading artwork and exited at the test limit with Not tested First playable frame, full workspace suite, or split dispatch GPU time. Both runs enumerated AI use OpenAI Codex (GPT-6 family, exact variant unavailable) ran the builds and focused tests, set up the retail runs, checked the logs, and drafted this report. The account owner supplied the manual retail input. |
0e958e8 to
049dec8
Compare
|
Regression run of Against the limits in CONTRIBUTING.md: 104 % of AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, AI use: Claude Code (Claude Opus 5.5) built both trees and ran |
Keep control-flow cycles in one pipeline, pass edge-live values through per-dispatch scratch and compile the pieces on the PSO workers. Direct dispatch records the chain with UAV ordering. Indirect dispatch builds the whole form on demand. Assisted-by: OpenAI Codex (GPT-6) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The synthetic split fixture declared u2 twice with different coherence flags. Bind its existing memory window and validate the whole fixture before checking the cut. Assisted-by: OpenAI Codex (GPT-6) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adjacent lanes previously accessed ef008c0f's continuation data 1,612 bytes apart. Store the tag and each live dword in a separate lane-contiguous plane; transport both halves of i64 values through their own planes. Assisted-by: OpenAI Codex (GPT-6) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adopt WebIdentity1's fixture from xcl-dev#2080. Lanes return early, skip ahead over a piece, or run different numbers of loop iterations. Check the whole and split outputs against the CPU model and guard words on a 2 x 3 x 2 dispatch grid for native wave32 and split wave64. Source: xcl-dev#2080 (comment) Assisted-by: OpenAI Codex (GPT-6) Co-authored-by: WebIdentity1 <212448219+WebIdentity1@users.noreply.github.com>
Compile and validate a partitionable CFG through the native-wave64 admission gate. On a wave64 adapter, run the whole pipeline and check its lane count and output. Identify the existing compare(64) case as two hardware waves. Assisted-by: OpenAI Codex (GPT-6)
Allow an indivisible strongly connected component to exceed the target up to fourfold. Keep surrounding components in separate pieces. Decline when a component exceeds that ceiling or the result is only one piece. Exercise both sides of the ceiling with a two-block loop, an oversized entry block and a program that cannot be partitioned. Assisted-by: OpenAI Codex (GPT-6) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
049dec8 to
697e8fd
Compare
|
Merged as Tested on the merged tree: AMD RDNA4, Windows, DXC 1.8.2502.11, debug. In a title (these heads on Conflicts with #1592 ( AI use: Claude Code (Claude Opus 5.5) merged it, ran the tests and wrote this on the maintainer's behalf. |
Part of #1269. Stacked on #2080: only the last commit,
697e8fd, is new here.#2080 keeps each strongly connected component (every loop) in one piece and declines a program when a single component is bigger than the piece target. The title's b3618a0fd76af79c (a raytracing resolve, 120,327 DXIL instructions) has one 15,652-instruction loop against the 12,500 target, so it stays whole and takes 31 s to build cold. With this change that loop gets a piece of its own, the rest splits as before, and the program builds in 4.1 s.
What is in it
crates/xcl/src/gpu/dxil/module/split.rs: a component over the target gets its own piece, up to four times the target. The components around it go in separate pieces. A component over four times the target, or a plan that ends up as one piece, keeps the whole pipeline as before.README.md:XCL_DIRECT_SPLIT_INSTRUCTIONSnow describes the four-times ceiling.dispatch_chain_oversized_loop_matches_whole, gives a 55-instruction loop its own piece at a target of 40. Its whole and split outputs match the CPU reference in native wave32 (96 words) and split wave64 (192 words).Tested
Ryzen 9 9950X, RTX 5070 Ti (NVIDIA 610.74), Windows 11 build 26200, release, DXC 1.9.2609.
Cold pipeline build of b3618a0fd76af79c as the title emits it (the whole binary is byte-identical to the title's cache, and so are all six sampler records), fresh process, implicit caches off, split pieces on 16 threads:
7.6× faster. All 11 pieces pass the DXC 1.9 validator. The largest has 26,449 instructions after the continuation code, and the chain uses 10,272 scratch dwords per group.
Across the 81-program compute corpus of the title's first two minutes (four heap windows, offline), this change admits 7 more programs to splitting, 25 → 32, with 9–11 pieces each, and loses none. Every whole binary is unchanged. Two programs still keep their whole pipeline, because one loop is over the 50,000-instruction ceiling: 958400d2 (57,891) and 56c0cd3b (62,580). b3618a0fd76af79c is not among the 81.
Intel Arc A770, measured by @JJAutoCompare (comment) on
d131645:dispatch_chain_oversized_loop_matches_wholepasses, with all 96 native-wave32 and 192 split-wave64 words matching.AMD RDNA4, measured by @bielfreedom (comment), RX 9070 XT, Ryzen 7 7700, on
d4b8717: of the title's 2,689 compute programs, 809 split against 462 with Recompiler: split large direct compute pipelines at CFG edges #2080 alone. The 347 newly split programs are 815 KB to 1.30 MB of direct DXIL, in 10–15 pieces. Twelve of them, spread by size, build 9.1× faster split on 16 threads than whole (843.8 s → 93.0 s, mean of 2 rounds; 5.4–13.7× each), and all 312 builds succeed. On that card thedispatch_chainandsplit::teststests pass, 6 of 6, with no skips.84eee477d68b6fdf (
CS_RaytracingResolve) on AMD, measured by @bielfreedom (comment, method): on the HLSL path it never finishes building, on an RX 6800 (Recompiler: route huge compute programs through the direct DXIL translator #1809) or on an RX 9070 XT (over 20 min). On the RX 9070 XT withXCL_DIRECT_DXIL=1, Recompiler: split large direct compute pipelines at CFG edges #2080 alone keeps it whole (52.9 s). With this change it splits into 12 pieces and builds in 7.8 s on 16 threads.With Recompiler: give a compute loop above the split target its own dispatch piece #2107 and Recompiler: give each split handoff value one scratch slot and load it where it's used #2126 together, on AMD RDNA4, measured by @bielfreedom (comment), RX 9070 XT,
3283da4withd4b8717merged on top (clean merge): the 13 programs only Recompiler: give a compute loop above the split target its own dispatch piece #2107 splits build in 34.3 s split against 87.3 s with Recompiler: give a compute loop above the split target its own dispatch piece #2107 alone and 837.1 s whole (24.4×), each in 2.1–3.3 s. That includes 84eee477d68b6fdf, which never finishes building on the HLSL path there, in 2.6 s. Summed piece builds 693.6 → 281.9 s. On the merged tree thedispatch_chainandsplit::teststests pass, 8 of 8, with no skips.On an RTX 3060, measured by @pvfreis (comment):
742a41ceb422beb5doesn't split with Recompiler: split large direct compute pipelines at CFG edges #2080 alone (whole 45.6 s). With this PR's planner change it splits into 11 pieces, built in 4.4 s against 42.1 s whole (9.5×; 12 threads, driver caches off, median of 3).The branch was rebased onto
mainf5c5bdfwith Recompiler: split large direct compute pipelines at CFG edges #2080; the only conflict was inREADME.md.697e8fdisd131645rebased (it wasd4b8717before the rebase ontomain9633138).cargo test --release --offline --workspace -- --test-threads=4ond131645: 1159 passed, 0 failed, 46 ignored, with 24 skip notices across 14 tests (no native wave64, unsupported per-lane forms, no heap windows). All fourdispatch_chainGPU tests ran and passed, the new one included, and so did the planner's ceiling test.AMD Radeon RX 9070, regression pair by @Toons29 (comment), Ryzen 7 7800X3D, on
049dec8(this branch before the latest rebase), 60 s of a title on the default route:main568e7db1566 frames and this PR 1632, peak commit 14592 / 14591 MB, no crash or device removal in either.cargo test --workspace -- --test-threads=4(debug) on697e8fd, rebased ontomain9633138: 1248 passed, 2 failed, 46 ignored. The two failures,device_x::tests::pc_resource_desc_strips_uav_on_unsupported_formats_and_msaaandpso::shader_cache_tests::rerouted_disk_entries_follow_the_direct_translator, fail onmain9633138too; Tests: two expectations that no longer match the code #2245 fixed both onmainsince. 25 SKIPPED notices: no native wave64 on this card, three per-lane FP16 forms the per-lane lowering refuses, and no heap windows.Regression run
The branch was rebased onto
main9633138with #2080's current head6c34370, with no conflicts of its own.scripts/smoke.ps1 -Seconds 120, the same retail title, one after the other on the machine under Tested, release builds from clean trees.main9633138(this PR's base):this PR,
697e8fd:PR vs
main: 1311 / 1323 frames (99 %), peak commit 30324 / 29175 MB (104 %); device removals 0 and crashes 0 on the PR run, 0 and 0 onmain.Both runs use
XCL_DIRECT_DXIL=1and start with the same private XCL pipeline cache, holding only the pipeline list; the driver's own cache was left alone. The PR run loggedcompute split: 34 programs split, 179 pieces built, 114 chained dispatches issuedat 120 s (0 by 60 s, all 114 by 70 s), and nopiece ... refusedwarning. Before the rebase,d4b8717logged 33 programs, 173 pieces, 156 chains in the same setup; how far the title gets before it stops varies between runs. Both runs present no frames in their last 6 s, for a reason this change doesn't touch.Not tested
AI use
OpenAI Codex (GPT-6) wrote the change and the tests. Claude Code (Claude Opus 5.5) helpers ran the driver timings, and Claude Code wrote this description and opened the PR.
🤖 Generated with Claude Code