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>
Contributor
|
Independent AMD RDNA4 (native wave64) test report on exact head Tested
Regression run (60 s retail-title smoke, (Matched Not tested
AI use
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #2372 (
9dd8715).#2372 moves a split program's whole form into
pso_async, butChain::wholecallspso_async::resolve_wait_for(key, budget). With the default wait (XCL_PSO_WAIT_MSunset,budget = None) that function takes the job and builds it on the calling (title) thread — the stall #2372 is about. Only settingXCL_PSO_WAIT_MSsends it to a worker, and then the bind skips dispatches. On the retail 1.0.2.1 title on an RTX 5080 (XCL_DIRECT_DXIL=1,XCL_PSO_WAIT_MS=50, 600 s) that waswhole form: 198 asked for, 30 built, **16,701 dispatches skipped** while it was being built, followed by0xc0000005atgame_scarlett_master.exe+0x5293422.This adds
pso_async::resolve_wait_worker: the whole form is enqueued on thexcl-psoworkers and the caller waits for it, never taking the job itself.Chain::wholeuses it when the budget isNone; withXCL_PSO_WAIT_MSset, the existing budgeted/skip behavior is unchanged.What is in it
crates/xcl/src/hle/d3d12x/pso_async.rs:resolve_wait_worker(sent to the workers, waited for there).crates/xcl/src/hle/d3d12x/real/dispatch_chain.rs:Chain::wholeuses it forNone.whole_tests::a_whole_form_with_no_budget_is_built_on_a_worker_and_not_skipped: the build runs on anxcl-psothread, returnsWhole::Built, andWHOLE_SKIPSdoes not move.Measured on the retail title (RTX 5080, retail 1.0.2.1,
XCL_DIRECT_DXIL=1, default wait, 600 s):0xc0000005at 166.5 sSo the skips and the crash are gone, but the title still stops presenting at 92 s: its binds now wait for 45 serialized ~0.7–1.1 MB worker builds. The remaining lever is precompiling those whole forms (or more huge-compile capacity), not skipping them.
Tested
stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5, debug (scripts/test.ps1) and release (scripts/smoke.ps1).\scripts\test.ps1(cargo build --workspace+cargo test --workspace -- --test-threads=4): 1274 passed, 0 failed, 46 ignored (SKIPPED: the wave64 / direct-DXIL per-lane tests that need 64-lane hardware or a semantics mode this adapter refuses,no heap windows, andcannot disable the driver cache (Windows Developer Mode is required))cargo test -p xcl --lib -- whole_tests: 2 passed, 0 failedNonebranch put back toresolve_wait_for(key, None): 0 passed, 1 failed —built on None, not on a PSO workerRegression run
main (
426a5a7, clean tree, no local changes):PR (
caae07d, clean tree, no local changes):(The main block is
426a5a7, an ancestor of the currentmain, from the same machine and data folder.)Not tested
AI use
scripts/smoke.ps1pair, and ran both retail comparisons on this machine.