Repository navigation
Description
Part of #2088 and #2508. Related to the world-load roadmap #1833.
Problem
On main at b49be18, split compute normally uses its pieces, but compute ExecuteIndirect and direct dispatch without usable scratch can call Chain::whole. The whole program then uses the dispatch-chain root signature and .chain.pso namespace. Ordinary whole PSOs use a different ABI. Used-pipeline history identifies the shader set and cannot tell the precompiler which call needed this fallback. Indirect demand · Direct fallback · Cache names
A reported RTX 5090 relaunch on nvidia-dev spent 468.5 of 491 seconds of awaited cold compute on 20 whole forms, even though their shaders were in the used history. On an RX 9070 XT, warming six extra whole forms in a 26-program #2551 sample raised offline driver time from about 110 to 230–247 seconds. These are separate observations. They motivate testing selective warming on the same runtime and adapter. Relaunch trace · Offline cost
#2551 adds whole-form creation for every selected split shader. #2096, #2104 and #2409 cover startup ordering and compute replay by first-use shader key. #2404 and #2519 remove demand for the whole form on some paths. This issue is for recording and replaying the specific fallback requests that still occur. Prior discussion
Implementation plan
Use small PRs against main. Start with opt-in capture, then targeted replay, then fresh-process and retail validation. Coordinate with #2551 for whole-form creation and #2737/#2739 for persistence reporting.
- Capture first demand. Pass a reason from the indirect caller and direct scratch fallback to a common capture point before
Chain::wholecan wait or create a PSO. Distinguish indirect, bundle, missing recording allocator, and scratch unavailable where the caller can establish the reason. Record even when the whole PSO is already ready. Include a sequence, timestamp and present count, source record hash, final whole-DXIL digest and byte length, effective flags and node mask, and a stable chain root-signature identity derived from its ordered static samplers and ABI version. Record effective translation options and adapter, driver/runtime and build identities in the capture metadata where available. Use D3D12.X: XCL_PSO_MANIFEST=1 writes the order a run asks for its pipelines (#2088) #2096's ordering if available, or an opt-in versioned local sidecar with a user-selected sequence cutoff. Deduplicate the first demand by final identity. Keep file I/O outside the whole-build lock and store only replay metadata. - Validate and plan replay. Extend the offline shaders command with an explicit capture path and sequence cutoff. Resolve selected record hashes against the existing shader input in one pass, including supported compute containers. Reuse the runtime translation path and compare the rebuilt whole DXIL, effective flags, node mask, and chain root identity before native creation. Keep distinct requests separate even when they share the source hash. Reuse the runtime cache key builder and report missing records, changed forms, configuration mismatches, and ambiguous disk keys per item. On current main the disk name omits node mask and sampler identity. Start with zero node mask and an isolated cache for the experiment, reject collisions and other unsupported descriptors, and expand coverage only with matching runtime/offline key support such as Shaders: --pipelines blobs are made as a title's run asks for them #2515/D3D12.X: share dispatch-chain root signatures per device and key compute blobs on NodeMask #2723. A missing or mismatched row should leave the replay incomplete.
- Create only selected native whole PSOs. Share the chain-root descriptor construction with Shaders: --precompile --pipelines also builds a split program's whole form #2551 where practical. Pass the recorded effective flags rather than the current offline zero defaults. Submit the selected whole DXIL with the chain root signature to the same adapter and compatible device setup, writing through the existing driver cache. Start in first-demand order under the existing size and concurrency limits. Separate successful native creation, successful create with a supplied blob, explicit rejection and cold retry, newly persisted blob, and unavailable or failed blob writes. Treat capped, mismatched, or unpersisted entries as incomplete. Preserve the regular shader precompile path, chain pieces, and runtime fallback behavior.
- Prove identity and reuse. Add a synthetic fixture where ordinary whole, chain whole, and chain pieces have distinguishable identities. Test exact cutoff, deduplication, missing inputs, multiple final identities for one record, and mismatches in ABI, effective flags, node/samplers or final DXIL. Test that an unsuccessful replay cannot be reported as complete. In a fresh Windows process using the real runtime fallback path, show that the selected blob is supplied to a successful native create without an explicit cold retry and that the dispatch output matches. Exercise an unselected sibling and both an indirect call and a direct fallback where the fixture permits.
- Measure world entry. Capture the load corridor once and hold the runtime build, adapter/driver, title profile, save, graphics cache, chain-piece cache and implicit driver-cache policy fixed. Compare the usual prewarm, demand-only whole warming, and Shaders: --precompile --pipelines also builds a split program's whole form #2551's all-selected-whole warming on copies of the same initial cache. Report offline time and peak commit, exact demand coverage on relaunch, awaited cold whole-build time, remaining graphics/queue stalls, time to the first textured world frame and input response, skipped dispatches, and device removals. If demand changes across launches, publish the uncovered keys and measure coverage before automating another replay. Repeat on NVIDIA and AMD as hardware becomes available.
The first success criterion is exact blob reuse with matching dispatch output. The retail result should show whether selective replay reduces world-entry time or moves the critical wait elsewhere.
AI use was OpenAI Codex (GPT-6, exact serving variant unavailable) for static analysis, evidence review, and drafting.
Activity
afpruivo commentedon Nov 26, 2026
RTX 3090 24 GB,
nvidia-devaf2cecc4: the stop at the world start is the cold whole-form builds this issue describes. #2551 merged on top lets the title submit work to 316 s instead of 108 s, but 30 whole forms are still built cold, and the device is removed at 341 s. One run per row, so read it as a direction, not a rate.Setup
title: 3c290c16), 480 s,XCL_DIRECT_DXIL=1 XCL_DRED=1, scripted A presses.xcl.exein the 1 GiB shader-heap profile from xcl run:xcl nvprofileputs xcl.exe in an NVIDIA profile with a bigger shader heap (#2403) #2590.--precompile, then--precompile --only cs --pipelines --used-onlyfrom the same build).Where the title stops on
af2cecc4XCL_THREAD_DUMP_AT=110,150), symbolized with the build's PDB. At both dumps a title thread is inbind.rs:1414(execute_indirect) →dispatch_chain.rs:128→:82(Chain::whole, waiting onbuild_whole). This is the same stack as in RTX 3070: no crash, black window, 80k graphics pipelines queued, long driver PSO waits (nvidia-dev) #2595 (comment).Ruled out
XCL_TWO_PASS_MB=4096nothing is refused, and the title stops at the same point.With #2551 (
3567b2ef) merged ontoaf2cecc4(merges cleanly; local commit, not pushed). The precompile made 3,875 pipelines, 0 refused.af2cecc4af2cecc4+ #2551#101)Chain::wholeat the dumps0x887a0005at 341 s, no DRED breadcrumbs--used-onlyhistory can't tell the precompiler which programsChain::wholewill need.Also seen:
gpu_compute_e2e::async_compute_pso_registers_real_pso_and_not_standinfails on plainaf2cecc4as well, so not because of #2551. It was already reported fornvidia-devin #42 (comment).Not tested: more than one run per row; the 30 cold programs one by one; what removed the device at 341 s; AMD.
AI use: Claude Code (Claude Opus 5.5) ran the builds and runs on my machine, symbolized the dumps, read the logs and drafted this. I checked it before posting.
Decodere commentedon Nov 26, 2026
I'm claiming Step 1 (capture first demand) of
#2741onmain(b49be183).Plan as separate small PRs against
main:ChainWholeReason(Indirect,Bundle,MissingRecordingAllocator,ScratchUnavailable) to a common capture point beforeChain::wholewaits or builds, deduplicating by final identity (source record hash,final whole-DXIL digest + byte length,effective flags,node mask,chain root-signature identityfrom ordered static samplers + ABI version) and writing the versioned local sidecar outside the whole-build lock (recording even when already ready, with optional sequence cutoff and metadata header)..chain.psoblobs and prove fresh-process blob reuse + matching dispatch output (Steps 2–4).Machine: NVIDIA GeForce RTX 4060 (8 GB, driver 621.14), Intel Core i5-11400F, 32 GB RAM, Windows 11 26200.
AI use: Google Antigravity assists with planning, code changes, tests, and verification on the owner's machine.
Decodere commentedon Nov 26, 2026
Opened Part 1 PR: #2786 (
7587c013,base: main,Part of #2741).Implements the opt-in first-demand
Chain::wholecapture sidecar (XCL_CAPTURE_CHAIN_WHOLE,schema_version: 1UTF-8 JSONL header + deduplicated demand records, zero overhead when unset) so world-entry fallbacks can be reproduced and prewarmed cleanly in Part 2 (next).D3D12.X: add opt-in first-demand capture sidecar for Chain::whole fal…
Decodere commentedon Nov 26, 2026
Opened Part 2 PR (Steps 2–4): #2819 (
fd317b9c,base: main,Part of #2741).xcl shaders --replay-chain-whole <sidecar.jsonl>(--replay-cutoff) with strictschema_version: 1validation matching#2786(3b6609fb), single-pass console shader matching, collision/identity guards, and native whole-form.chain.psoprewarming under the live pipeline cap.#2786(merges cleanly in either order) plus a fresh-process GPU E2E test provingExecuteIndirectand direct fallbackDispatch(allocator == 0) both hit the warmed whole-form.chain.psowithhits == 1, stale == 0while an unselected split-eligible program hashits == 0.