D3D12.X: build a split program's whole form as a background pipeline #2372
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!2372
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2372/head"
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?
@Kalmarv on GitHub · 2026-11-25 17:02 UTC · original
Kalmarv:chain-whole-async→main· +198 −34 · 5 files · 1 commits · closed without mergingPart 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 (#751, #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
@upipibi on GitHub · 2026-11-25 17:41 UTC · original
NVIDIA test report for
9dd8715(head as is, base0829441). RTX 3070 8 GB (Ampere, 32-lane waves), driver 616.56, Windows 11, debug, aftercargo build --workspace:cargo test --workspace --no-fail-fast -- --test-threads=4 --skip hle::xaudio2: 1264 passed, 0 failed, 46 ignored. The end-to-end title tests pass.main0829441(this PR's base) on the same machine, same command: 1263 passed, 0 failed, 46 ignored. The extra pass is the newdispatch_chain::whole_tests::a_whole_form_still_being_built_is_not_waited_for_past_the_budget.hle::xaudio2, because its tests fail or hang on this machine onmaintoo. The PR doesn't touch it.no wave64on this card, 3 f16/f32 forms the per-lane path refuses, 1 no heap windows, and 1 PSO measurement that needs Developer Mode to turn the driver cache off.AI-assisted (Claude Code, Claude Opus 5.5). Synthetic tests only; no title run.
@b3IKK on GitHub · 2026-11-25 17:52 UTC · original
Independent retail check on an RTX 5080 (retail 1.0.2.1,
XCL_PSO_WAIT_MS=50, 600 s): on clean head9dd8715, the run reportscompute split: 0 programs split, 0 pieces built ... whole form: 0 asked for, 0 builtfor the whole run, so this PR's path is not exercised by this title. The run presented to 182 s and ended with the same0xc0000005atgame_scarlett_master.exe+0x4e8b4beas its base0829441(which presented to 200 s; the difference is cache warmth between the two runs). No regression observed, but no validation of the whole-form change either: this title has no split programs, so #2338/#2372 do not apply to it.Also, the
Build and testcheck on9dd8715is red ongpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier, which is not in the files this PR changes and passes on this GPU. Probably a no-GPU-runner flake, but it blocks the check.AI use: OpenCode, Claude Fable 5.2 ran both 600 s retail runs, read the logs and wrote this.
@KDenKC on GitHub · 2026-11-25 18:55 UTC · original
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
int3at+0x4da6315124 s after the legal screens, before the point where the base froze. One run per arm, so a data point next to @kole07139's RTX 3070 pairs.Setup
0829441and head9dd8715(this PR as it is), each built clean.XCL_DXIL_CACHEeach, and each run under an exe file name never used before (xclc01.exe/xclc02.exe), since NVIDIA's implicit shader cache is keyed by the exe name.XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_PSO_WAIT_MS=50 XCL_NETWORK=0, 600 s limit, fresh data folder, pad input through the menus. The two arms waited on the Legal Notices screen for different times (they left it at ~153 s and ~274 s), so the rows below are aligned on leaving it.08294419dd8715ungated here (a title thread's …)2 asked for, 0 built, 120 dispatches skipped while it was being built33743bd6d1e45443, 707 KB, cold, 318.3–334.8 s, and more such builds follow) and never resume to 600 s; no removal, no crash0x80000003atgame_scarlett_master.exe+0x4da6315; no removalcompute splitat the end+0x4da6315failfast is the one reported on #1833 (@humsterbumster, Linux) and in #2140. I don't know whether the skipped dispatches lead to it; this run alone cannot say.Not tested: more than one run per arm; warm or precompiled caches;
XCL_PSO_WAIT_MSunset; the test suite on this head (@upipibi's run covers it).AI use: Claude Code (Claude Opus 5.5) built both trees, ran both arms, read the logs and wrote this.
@DavidM1911 on GitHub · 2026-11-25 19:01 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
@Kalmarv on GitHub · 2026-11-25 19:01 UTC · original
@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.
translated_compute_pso_oncebefore any driver compile, and counted indispatch_chain::buildafter the pieces are built, both as onmain.What we think differs is the work the run reaches. A big program is split only once a PSO worker translates it.
maintoo.main, the title freezes in the whole build, stops adding jobs, and the queue drains, so its count keeps rising.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
main.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:
compute split:line from each arm at the same time after the legal screens (base at about +124 s);compute PSO with the translated console CSlines up to then;xcl-psothreads were doing at the end.The
0x80000003failfast is the one on #1833 / #2140. We can't tell from here whether the skipped dispatches lead to it.AI use: Claude Code (Claude Opus 5.5) read the code and our logs and wrote this reply.
@kole07139 on GitHub · 2026-11-25 18:21 UTC · original · edited 2026-11-25 19:14 UTC
RTX 3070 8 GB, Windows,
main55d64c2against55d64c2+ this PR (9dd8715), both withXCL_PSO_WAIT_MS=50, two runs each, alternated. With this PR the title kept presenting to the end of the 300 s run in both runs, and ran 10–40× more chained dispatches. Onmainpresents stopped at ~106 s in one run and at 220 s in the other. The whole-form counter shows what it costs: 7 336 and 13 306 dispatches skipped while a whole form was being built.@b3IKK's run above saw
0 programs split, so this PR's path did not run there.XCL_DIRECT_DXIL=1. A run without it would show the 0 he saw.Setup
main55d64c2;55d64c2with this PR merged; it merges cleanly and touches no translator file, so both trees use the same caches.XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_PSO_WAIT_MS=50 XCL_NETWORK=0 XCL_ACTIVITY=1, noXCL_UMA_SHADOW.Wait64splitcompute split:at the endmainmainmain:XCL_THREAD_DUMP_AT=125,150,200. The XCL frames are symbolized with each build'sxcl.pdb.main55d64c2: presents end at 132 s (first mid-list split at 132.6 s). At 150 s and at 200 s one title thread is in the same place, in both dumps: That is the stall @throny traced on his RTX 4080: an ExecuteIndirect of a split program waiting for its whole form, on the title's thread.Chain::wholein any of the three dumps.pso_async::resolve_wait_for → Condvar::wait_timeout, theXCL_PSO_WAIT_MSbounded wait: one frombind::execute_indirect, one from a draw (draw_instanced → graphics_bound).title_textures::refresh_once → texture::upload_batch → fence::wait) and inXMemMapPhysicalPagesScatter, with stacks that change between dumps.XCL_TEXTURE_LEVEL_PAGES), and peak commit 30.5–34.7 GB.Not tested
XCL_PSO_WAIT_MS.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.
@KDenKC on GitHub · 2026-11-25 19:19 UTC · original
@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):
08294419dd8715compute split:before the cutcompute PSO with the translated console CSlines up to the cut#574, 2,177,324 B, started 268.2 s), and it finished. The PR arm had none ≥ 2 MB.#493303 KB and#494398 KB, bothdriver blob absent, started 398.5 / 400.0 s), and in the last ~10 s ten builds finished aftergated (waited …)of 3–31 s (five of them ≥ 20 s), i.e. they sat on the huge-compile slot that long first. The base arm logged longer gate waits still (up to 209 s), so I can't say from these logs that the queue was worse with the PR.xcl-psothread was doing at the end. A rerun withXCL_THREAD_DUMP_ATat the same offset in both arms would answer that; I can do it if it helps.AI use: Claude Code (Claude Opus 5.5) read the two run logs and wrote this.
@b3IKK on GitHub · 2026-11-25 19:57 UTC · original
Independent retail check on an RTX 5080 (retail 1.0.2.1, 600 s,
XCL_DIRECT_DXIL=1,XCL_PSO_WAIT_MS=50): on clean head9dd8715, the title presents to 166 s (30 two-second intervals after the 96 s mark) and the log's last counters are:compute split: 266 programs split, 2,621 pieces built, 8,598 chained dispatches issued ...; whole form: 198 asked for, 30 built, 16,701 dispatches skipped while it was being builtThen it crashes:
0xc0000005 in game_scarlett_master.exe+0x5293422(read at0xffffffffffffffff) at 166.5 s. Without this PR on the same settings it stopped at 96 s behind 13 whole forms of 0.67–1.13 MB.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
resolve_wait_for(None)the job is built on the calling (title) thread, so the PR only helps when the budget is set — and then it skips too much. If the default path could enqueue-and-wait on a worker, the whole forms would leave the title's thread without skipping their dispatches.AI use: OpenCode, Claude Fable 5.2 ran the retail title on this machine and wrote this.
@thehollowedone on GitHub · 2026-11-25 19:02 UTC · original · edited 2026-11-25 19:58 UTC
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
7de7d09e8cc69ea08126212153b12baee2e278db, andgit diff --checkpassed. This includes #2118's deferred dispatch scheduling.On the same RTX 3080 Ti / NVIDIA 621.35 setup above, with
XCL_NETWORK=0,XCL_ADAPTER=RTX 3080 Ti, SDKXCL_DXC_DIR, and no optional debug layer:cargo build --offline --locked --workspace --jobs 6passed. The PR'sa_whole_form_still_being_built_is_not_waited_for_past_the_budgettest passed (1/0/0), andcargo test --offline --locked -p xcl --lib dispatch_chain --jobs 6 -- --test-threads=1 --nocapturepassed 11/0/0.cargo test --offline --locked --workspace --no-fail-fast --jobs 6 -- --test-threads=4 --nocapturereported 1,422 passed, 0 failed, 46 ignored, with 26 runtime GPU skip notices.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 on GitHub · 2026-11-25 20:02 UTC · original
@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
XCL_PSO_WAIT_MS=50, both runs of this PR crashed after mass skips (one in the title's code, one in the known title-texture race #751 / #484), and no whole form was built at all. The huge-compile slot was held the whole run by a 2.4 MB pipeline the preloader started at ~8 s, and 30 workers sat waiting for that slot with unsplit pipelines. So yes: the budget lets the title go on, at the cost of work, and this PR doesn't change that trade.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:
resolve_waitwaits for a worker that has started it, and otherwise builds it on the caller. This PR keeps the two the same on purpose.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
XCL_PSO_WAIT_MSalso covers the whole form when it is still needed. The two problems you hit are separate: the queue and the slot (a waiting job holding its worker, and the preloader holding the slot) are a worker-pool issue in their own right. They'd need their own PR, not this one.AI use: Claude Code (Claude Opus 5.5) read the code and our logs and drafted this reply.
@treybertram06 on GitHub · 2026-11-25 20:08 UTC · original
Test report: #2372 and #2404 on an RTX 3080, retail title 7952987A
Summary: both PRs remove the world-load freeze on this card. With either one applied, every run then hits the silent
0x887a0005device removal (#1452) at about 85–122 s.Setup
mainbe67bfcf. The base below is that tree.5ca9c23, #23729dd8715) is merged onto the base.--precompile --only cs --pipelines).XCL_DIRECT_DXIL=1 XCL_UMA_SHADOW=1, scripted A presses, 600 s per run.Conflicts with current
mainbind::execute_indirectnow hasskip_named_csandindirect_guard::check. I placed the chained block afterskip_named_csand beforeindirect_guard::check, so the guard does not see a chained ExecuteIndirect's arguments.device_x.rs: kept bothnote_signatureandnote_dispatch_only_signature.translated_dispatchnow returns early forskip_named_cs, and I made thatOk(false).console_list.rs: theboolresult with the dispatch counted as skipped.Base, 6 runs
bind::execute_indirect→dispatch_chain::whole→Chain::whole. In 2 of the 3 dumps it is waiting; in the other it is innvgpucomp64.dll. One dump also shows a second title thread inChain::whole, presumably behind the build lock.#2404, 3 runs
ExecuteIndirect: 3455 chained (0 of them whole, 0 slabs lost), 37 whole, and no title thread builds a whole form.0x887a0005in 3 of 3 runs, at 90, 90 and 122 s. Each comes about 2 s after the first chained ExecuteIndirects, after a burst of 1-tile sparse maps.no buffer for the commands of a chained ExecuteIndirectskips come 2 ms after the removal, so they are a consequence of it.#2372, 3 runs
whole form: 146 asked for, 146 built, 0 dispatches skipped while it was being built.0x887a0005in 3 of 3 runs, at 85, 90 and 94 s.What this says
On this card the freeze has been hiding the removal: while the title waits on a whole build, it submits nothing. Once it keeps submitting, the removal comes at the next step every time. These runs can't tell whether either PR's GPU work contributes to the removal. One base run was also removed at 89.8 s, before the freeze took hold.
Not tested: AMD, other titles, and runs without
XCL_UMA_SHADOW.(Runs and report by Claude Code with Claude Opus 5.5. The commands and counts above come from these runs.)
@b3IKK on GitHub · 2026-11-25 20:12 UTC · original
A stacked PR for the default-wait path is up: #2491, on this PR's head
9dd8715. It addspso_async::resolve_wait_workersoChain::wholeenqueues the whole form on anxcl-psoworker and waits for it, instead of taking the job on the calling title thread whenXCL_PSO_WAIT_MSis unset.Retail 1.0.2.1 on an RTX 5080,
XCL_DIRECT_DXIL=1, 600 s:0xc0000005at 166.5 sThe 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 (
built on None, not on a PSO worker); suite 1274/0/46, smoke 1627.AI use: OpenCode, Claude Fable 5.2 implemented and ran the comparison on this machine and wrote this.
@Kalmarv on GitHub · 2026-11-25 20:49 UTC · original
@bmjask thanks for the review. Agreed, and we're closing this PR as superseded by #2404.
The budgeted runs bear out the blocker. With
XCL_PSO_WAIT_MS=50, the first run skipped 473 whole-form dispatches before a crash at 96 s. The second skipped 5,565 before the title crashed on a null vtable at 148 s (the 18,031 in the body is all skipped dispatches in that run, most of them unsplit pipelines). Neither run completed.mainwith the same budget doesn't skip, but freezes instead: its title's thread spent 149.7 s on one cold whole form, from 68.9 s on. Skipping these dispatches buys presents at the cost of the title's state, and nothing here shows that is safe.#2404 removes the need. A split program's ExecuteIndirect runs its pieces. The whole form is built at the program's first chained ExecuteIndirect, on an
xcl-pso-chain-wholethread that waits for the huge-build turn like the workers. It is bound only when an ExecuteIndirect has more slabs than its rounds, and is never built on the title's thread for a chained ExecuteIndirect.What #2404 leaves on the title's thread are the rarer fallbacks: an ExecuteIndirect with another command signature, in a bundle or a list without an allocator, and a Dispatch without scratch. These keep blocking, as on
main. In nine runs of #2404 before its last commit, 0–344 ExecuteIndirects per run ran the whole form. No whole-form-sized build (0.6 MB or more) took more than 2 s off the workers in the seven runs that had such fallbacks; those runs were warm.A no-skip form of this PR would add nothing for those fallbacks. With no budget, it takes the job and builds it on the calling thread when no worker has started it, ungated, as
maindoes. It uses the same.chain.psoblob, and its orphan handling only matters for a build nobody waits for. The one difference was the skip under a budget.The failing Windows check is
main'slower_dxila_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier, fixed by #2420.@b3IKK: your #2491 is stacked on this branch. The branch stays as it is, so your PR's diff doesn't change.
AI use: Claude Code (Claude Opus 5.5) read the review, the code of this PR and #2404, and the run logs, and drafted this comment.
Pull request closed