Repository navigation
Conversation
A split compute program keeps its whole form for what the pieces cannot run: an ExecuteIndirect, and a dispatch with no allocator to keep its scratch, in a bundle, or whose scratch allocation fails. That form was built in `Chain::whole` on the calling thread, the title's, the first time it was needed, ungated (a title thread's huge compile skips the huge-build slots) and outside `XCL_PSO_WAIT_MS`. A retail title's ExecuteIndirect of split programs then held its thread for one 20-35 s whole build after another, with no present (reported on xcl-dev#2080). The whole form is now a lazy pipeline in `pso_async`, behind the chain's address as a stand-in's: it is sent to the PSO workers on first need, where the huge-build slots and the driver blob cache apply as before (the build itself, `compute_container` with the chain's root signature and its `.chain.pso` blob, is unchanged). Its callers wait for it as a bind waits for an unsplit pipeline: with `XCL_PSO_WAIT_MS` up to the budget, then the dispatch is skipped and counted until a worker has built it; without a budget, until it is built, built on the calling thread if no worker has started it, as before. `XCL_PSO_IMAGE_SKIP` spares it as it would spare the unsplit program. `forget` releases it, or marks it orphaned while it is being built. The `compute split:` log line counts the whole forms asked for and built and the dispatches skipped while one was being built. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
NVIDIA test report for
AI-assisted (Claude Code, Claude Opus 5.5). Synthetic tests only; no title run. |
|
Independent retail check on an RTX 5080 (retail 1.0.2.1, Also, the AI use: OpenCode, Claude Fable 5.2 ran both 600 s retail runs, read the logs and wrote this. |
|
RTX 3070 8 GB, Windows, @b3IKK's run above saw
Setup
Not tested
AI use: Claude Code (Claude Opus 5.5) merged the trees, ran the six runs, symbolized the dumps, read the logs and wrote this report. I checked it before posting. |
|
RTX 5090 A/B, both arms cold: with this PR no huge pipeline is built on a title thread any more (13 → 0), but this run ended in the title's own Setup
Not tested: more than one run per arm; warm or precompiled caches; AI use: Claude Code (Claude Opus 5.5) built both trees, ran both arms, read the logs and wrote this. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
@KDenKC thanks for the 5090 run. On the low split count: nothing in this PR decides or counts the split differently, as far as the code and our own logs show.
What we think differs is the work the run reaches. A big program is split only once a PSO worker translates it.
Our two budgeted arms were the same to 60 s (79 programs split each). By 140 s it was 92 with the PR and 108 on So this would be an existing limit the PR exposes: a job waiting for the huge slot keeps its worker. It isn't a change in what is split. Your two arms ran different lengths after the legal screens (~430 s and 124 s), so the totals can't be compared directly. If you still have the logs, three things would settle it:
The AI use: Claude Code (Claude Opus 5.5) read the code and our logs and wrote this reply. |
|
Independent Windows integration check of 9dd8715 on 2898511. The local merge and workspace build passed. Workspace tests reported 1,364 passed, 0 failed and 46 ignored, including 26 runtime skips. The bridged-mask barrier test that failed in the older Windows CI run passed on this integration. The dispatch-chain filter reported 10 passes, including one native-wave64 skip. The stock wait-budget test ran and passed. All five ExecuteIndirect tests passed with zero skips. RTX 3080 Ti (621.35), Windows 11 build 26300, Rust 1.99.1 MSVC and DXC 1.8.2502.11. Synthetic checks only. AI-assisted. Codex (GPT-6, exact variant unavailable) reviewed the local integration, ran the tests and drafted this report. Update after #2118 merged: I integrated the unchanged head 9dd8715 locally with main e0d93c8, without a commit. The clean merge produced tree On the same RTX 3080 Ti / NVIDIA 621.35 setup above, with This is a synthetic integration check. I did not run a paired retail smoke on this merged tree or resolve the reported budgeted retail crash; the passing suite does not establish that runtime outcome. AI-assisted. Codex (GPT-6, exact variant unavailable) ran the checks and drafted this update. |
|
@Kalmarv the three numbers, from the same two logs, cut at +124 s after each arm left the legal screens (base 277 s, PR 398 s):
AI use: Claude Code (Claude Opus 5.5) read the two run logs and wrote this. |
|
Independent retail check on an RTX 5080 (retail 1.0.2.1, 600 s,
Then it crashes: So the background whole form does move the bind past the compile, but the 50 ms budget skips 16,701 dispatches — the world is missing that work — and the title then crashes. 198 whole forms asked for and only 30 built in 166 s also shows the workers are far behind the budget. What this title needs from the PR is a default-wait path: enqueue the whole form on the workers and wait for the worker instead of taking the job on the caller. With AI use: OpenCode, Claude Fable 5.2 ran the retail title on this machine and wrote this. |
|
@b3IKK thanks for the RTX 5080 run, that's a useful data point. What the numbers show. With the budget, the title's thread no longer builds whole forms. It presented to 166 s, where it stopped at 96 s without this PR. But the workers are far behind: 30 of 198 whole forms were built in 166 s, so 16,701 dispatches were skipped, and then the title crashed in its own code. That matches our runs on an RTX 5070 Ti. With Enqueue and wait on a worker, with no budget set. We'd rather not take this, because it wouldn't give the title its frames back. With no budget, the title's thread waits for the whole form either way; the only difference is which thread runs the compiler. Its wait would get longer, not shorter:
This is also how an unsplit pipeline behaves with no budget: The fix for the stall at the default is to need the whole form less. #2404 runs an ExecuteIndirect of a split program through its pieces, and asks for the whole form only when the arguments need more slabs than its rounds (and for bundles, lists without scratch and other command signatures). This PR is planned to land after it. Then the 198 asks above become rare, and what stays here is that AI use: Claude Code (Claude Opus 5.5) read the code and our logs and drafted this reply. |
Test report: #2372 and #2404 on an RTX 3080, retail title 7952987ASummary: both PRs remove the world-load freeze on this card. With either one applied, every run then hits the silent Setup
Conflicts with current
Base, 6 runs
#2404, 3 runs
#2372, 3 runs
What this says Not tested: AMD, other titles, and runs without (Runs and report by Claude Code with Claude Opus 5.5. The commands and counts above come from these runs.) |
|
A stacked PR for the default-wait path is up: #2491, on this PR's head Retail 1.0.2.1 on an RTX 5080,
The stack removes the skips and the crash, but the bind now waits for 45 serialized 0.7–1.1 MB worker builds, so presentation stops at 92 s. #2491's test fails without the change ( AI use: OpenCode, Claude Fable 5.2 implemented and ran the comparison on this machine and wrote this. |
Part of #1269. Follows #2080 / #2107 / #2126.
A split compute program keeps its whole form for what its pieces can't run: an ExecuteIndirect, and a Dispatch with no allocator to keep its scratch, recorded in a bundle, or whose scratch allocation fails. On
mainthat form is built inChain::wholeon the calling thread, the title's, the first time it's needed. A title thread's huge compile skips the huge-build slots, andXCL_PSO_WAIT_MSdoesn't cover this path. Before the split, the same program was built through the async PSO path and its binds honoured the wait budget.@claudetools-gh found this on #2080 (comment): from ~135 s their title's thread sat in
bind::execute_indirect→dispatch_chain::whole→Chain::whole, building one 645–833 KB whole program after another, 20–35 s each,driver blob absent, with no present to the end of a 1,200 s run,XCL_PSO_WAIT_MS=50set. Their local patch built the whole form on a thread of its own and kept the title presenting. Just above it, @KDenKC measured the same cold whole builds at world load after a full--precompile(comment): 28 cold compute builds of 10–23 s, one after another, and no present from 188 s.With this change the whole form is built the way the unsplit pipeline would be: a lazy pipeline in
pso_async, sent to the PSO workers when first needed. The huge-build slots, the driver blob cache and the orphan handling apply to it as to any other background pipeline. Its callers wait for it as a bind waits for an unsplit pipeline: up toXCL_PSO_WAIT_MS, after which the dispatch is skipped and counted until a worker has built it. With no budget set it waits until the pipeline is built, and builds it on the calling thread if no worker has started it, asmaindoes now. So nothing changes by default; what this gives is thatXCL_PSO_WAIT_MSnow also works for split programs. Rebased onto the slab change (e9ddf17,0829441): the slabs and the bounded scratch aremain's, unchanged; only how the whole form is built and waited for differs.What is in it
crates/xcl/src/hle/d3d12x/real/dispatch_chain.rs:pso_async::submit_lazywhen the chain is built, under the chain's own address in place of a stand-in's.Chain::wholeresolves it withpso_async::resolve_wait_forand the bind's budget. It returns the pipeline,Building(skip the dispatch), or an error when the build failed.compute_containerwith the chain's root signature and the.chain.psoblob. So a blob that a precompile writes for the whole form is still a hit.forgetreleases the whole form, or marks it orphaned while it is being built, throughpso_async::released.compute split:log line adds the whole forms asked for and built, and the dispatches skipped while one was being built.crates/xcl/src/hle/d3d12x/bind.rs: ExecuteIndirect skips a dispatch whose whole form is still building and counts it as a skipped dispatch. Dispatch counts a fallback skip the same way.crates/xcl/src/hle/d3d12x/console_list.rs: a console-list dispatch skipped this way counts as a skipped dispatch. Before, an error there ended the list's translation.crates/xcl/src/hle/d3d12x/real.rs: underXCL_PSO_IMAGE_SKIP=1, a big image-only program's whole form is spared, as the unsplit pipeline would be (go_background).crates/xcl/src/hle/d3d12x/pso_async.rs:resolve_wait_forandwait_budgetare visible todispatch_chain.a_whole_form_still_being_built_is_not_waited_for_past_the_budget(WARP when there's no GPU). A whole form whose build is held is asked for with a 30 ms budget. The test checks four things:Buildingwithin the budget, built on axcl-psoworker and not on the asking thread;dispatch_chain::wholehand out the pipeline;forgetdrops the build's reference.Tested
cargo test --workspace -- --test-threads=4(debug) on9dd8715: 1273 passed, 0 failed, 46 ignored. 25 SKIPPED notices: 21 for no native wave64 on this card, three per-lane FP16 forms the per-lane lowering refuses, and one for no heap windows.cargo test -p xcl --lib -- <filter> --test-threads=4(debug) on9dd8715:dispatch_chain10 passed, 0 failed (the new test ran;dispatch_chain_native_wave64_builds_wholeskipped its GPU part, no wave64);split32 passed, 0 failed, 1 ignored (the opt-in benchmark);execute_indirect4 passed, 0 failed.The title with a budget, as evidence for the case this PR is for (its runs are not the regression pair, which is below):
scripts/smoke.ps1 -Seconds 300withXCL_PSO_WAIT_MS=50added, otherwise as the regression pair below (release builds,XCL_DIRECT_DXIL=1, the same private pipeline cache). @Eterst reported the same stop on #2080 with this budget set (comment): presents and submits stop for good at the title's first chained dispatches.main0829441withXCL_PSO_WAIT_MS=50:At 68.9 s the title's submitting thread, the one issuing its ExecuteIndirects, started a cold 790,016 B compute build, ungated (
huge, ungated here (a title thread's …)). It took 149.7 s, and at 218.6 s the same thread started the next, 1,146,200 B. From 66 s to the end the run logged 0 presents and 0 submits. Presents per 2 s: 0 8 60 59 36 41 60 60 60 60 60 60 60 60 59 45 49 60 61 60 44 51 22 3 2 10 23 24 34 53 21 17, then 0 in all 117 remaining ticks.This PR,
9dd8715, withXCL_PSO_WAIT_MS=50, run twice. Neither run reached its end, and neither crash is in this PR's code:big_compile_turn), on unsplit compute pipelines. At 96 s it crashed inmemcpy<tiling::Chain::detile_level<title_textures::subresources, on asubresources_onworker, reading title memory. That's the title-texture read racing a decommit (D3D12.X: title texture reads outside the coherent window use the safe copy #751, D3D12.X: tolerate concurrent page decommits in title texture reads #484); the same site crashed runs with no budget set on other PRs.Regression run
scripts/smoke.ps1 -Seconds 120, the same retail title, release builds from clean trees, run one after the other on the machine under Tested.main0829441(this PR's base):this PR,
9dd8715:PR vs
main: 1654 / 1798 frames (92 %), peak commit 30285 / 29956 MB (101 %); device removals 0 and crashes 0 in both runs.Both runs use
XCL_DIRECT_DXIL=1and noXCL_PSO_WAIT_MS. Each starts with the same private XCL pipeline cache, holding only the pipeline list; the driver's own cache was left alone. At 120 s the PR run loggedcompute split: 84 programs split, 772 pieces built, 92 chained dispatches issued in 92 slabs; scratch 68 MiB (most 68, largest dispatch 35 in one slab); whole form: 2 asked for, 2 built, 0 dispatches skipped while it was being built. The first whole form was asked for between 80 and 90 s, the second by 100 s. With no budget set both were waited for, as onmain, so none was skipped. Presents per 2 s, PR run: 0 18 59 55 30 53 60 60 60 53 60 60 60 60 60 59 39 56 60 60 60 60 60 60 60 60 33 51 15 5 6 4 9 6 1 12 31 42 34 4 7 11 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.main: 0 18 60 57 52 12 60 60 60 60 60 60 60 60 59 50 44 56 60 60 60 60 60 61 59 61 60 40 35 42 27 10 5 2 0 1 0 3 18 0 7 3 12 15 29 5 43 50 2 2 3 2 5 3 5 0 0 0 0.Not tested
XCL_PSO_WAIT_MS=50both runs of this PR crashed (above). Skipped dispatches under the budget can leave the title's state broken, as in the second run (a null vtable in the title's code). That's the budget's existing policy for any pipeline still being built:mainskips the binds of unsplit pipelines the same way, and in that run most of the skipped dispatches were theirs. This PR applies the policy to whole forms too, wheremainblocks the title's thread instead.mainand deliberate here.main, and logs its own warning; this path has no warning of its own.pso_asyncstill warns when a whole form goes late.XCL_ASYNC_PSO=0together withXCL_PSO_WAIT_MS: the whole form still goes throughpso_asyncand honours the budget, while unsplit pipelines are built at creation in that mode.pso_async's still-building count (the compiling overlay,background_pipelines). Lazy unsplit pipelines that are never bound already count there the same way.AI use
Claude Code (Claude Opus 5.5) wrote the change, the test and this description, and ran the tests, the regression pair and the budgeted runs, and read the crash sites from their logs.
🤖 Generated with Claude Code