Shaders: record and prewarm chain-ABI whole PSOs demanded before world entry #2741
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#2741
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@KOLESNiii on GitHub · 2026-11-26 09:37 UTC · original
Part of #2088 and #2508. Related to the world-load roadmap #1833.
Problem
On
mainatb49be18, split compute normally uses its pieces, but computeExecuteIndirectand direct dispatch without usable scratch can callChain::whole. The whole program then uses the dispatch-chain root signature and.chain.psonamespace. 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 namesA reported RTX 5090 relaunch on
nvidia-devspent 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.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 #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.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.
@afpruivo on GitHub · 2026-11-26 11:13 UTC · original · edited 2026-11-26 11:58 UTC
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 #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 #2595.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.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 on GitHub · 2026-11-26 11:43 UTC · original
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 on GitHub · 2026-11-26 12:34 UTC · original
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).