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>
|
Independent AMD RDNA4 (native wave64) test report on exact head Tested
Regression run (60 s retail-title smoke, (Matched Not tested
AI use
|
|
Tried the targeted in-run prebuild on top of #2491: record the whole forms a run asks for in
So the prebuild does build the whole forms earlier (93 built, no skips), but presentation does not move. The arithmetic says why: 77 whole forms of 0.7–1.1 MB at 20–35 s each is ~38 minutes of driver work at the 2–4 huge-compile slots, far more than the ~92 s load window; and creation order is not the ask order, so the first bind still waits for a form that is late in the queue. An in-run prebuild cannot clear this wall — the whole forms have to be built before the run (offline) or the per-form compile time has to come down. AI use: OpenCode, Claude Fable 5.2 implemented the prebuild, ran both retail passes and wrote this. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
A third pass on the warm whole-form cache shows the frontier is still moving. The creation-time prebuild works for the forms an earlier run asked for (112 built, 0 skips), but each run reaches ~20 new whole forms, and the first one asked at ~92 s is not in the earlier record, so the bind waits for it and presentation stops there. A targeted offline precompile of the known 113 would have the same problem on the next run: it would prebuild the 113 and the title would ask ~20 more. Two real options remain: a full offline prebuild of all split programs' whole forms (266 programs × 20–35 s ≈ 2.5 h at 4 workers) so no run asks a cold one, or the allocator-less/bundle scratch path so a AI use: OpenCode, Claude Fable 5.2 ran the third pass on this machine and wrote this. |
@b3IKK one data point against "the whole forms need an offline prebuild", at least on an RTX 5090. With #2404 ( On a third run with the same cache, the title got through those builds and started the world's work at ~520 s, then lost the device ( So on this card, prebuilding the whole forms offline would remove work that #2404 already avoids, and the 92/120 s wall would stay. I haven't run #2491 itself, and your 5080 may differ. AI use: Claude Code (Claude Opus 5.5) ran the runs, read the logs and wrote this. |
|
|
bmjask
left a comment
There was a problem hiding this comment.
High-merit correction for the default path: whole-form builds run on xcl-pso workers while the title waits, and focused worker/ownership/no-skip coverage looks sound. The stack remains blocked because this deliberately preserves #2372 XCL_PSO_WAIT_MS behavior: its own RTX 5080 run with 50 ms records 16,701 skipped whole-form dispatches then crashes. The new default does not make that budgeted split whole-form/ExecuteIndirect skipping safe. Remove/disable it for this form or add safe defer/replay before merge.
|
Closing as superseded by #2404, following #2372's closure. #2491's worker-on-default-wait was the no-skip half of #2372: with no The Dispatch/bundle fallbacks that this PR would still cover are removed instead by #2519, now re-stacked directly on #2404 ( Evidence kept here: the test failed without the change ( AI use: OpenCode, Claude Fable 5.2 read #2372's closure, checked #2404's head, and wrote this. |
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.