Repository navigation
Description
Goal
Coordinate independent, evidence-backed work to reduce cold NVIDIA PSO compilation time to the first playable frame. This is a focused child of #1269.
On representative retail workloads, the runtime can remain at 0 FPS while the NVIDIA driver compiles large compute pipelines. Twelve compile workers can remain fully occupied, so simply adding more workers is not the primary solution. The dominant outliers need smaller/simpler DXIL, while startup should compile only the pipelines required for the next milestone.
Do not post title binaries, packages, keys, dumps, proprietary names, or DRM-related material. Use hashes and aggregate measurements only.
Current evidence
- A measured 879-pipeline cold pass kept essentially all 12 driver slots occupied. Its largest roughly 4 MB DXIL program took 951 seconds in the NVIDIA driver.
- The current direct compact planner can reject pathological programs when successor-pair tables exceed its 8,192-word automatic limit.
- Recompiler: direct compact form stores a branch's target in the entry #2076 stores branch targets in compact entries and substantially reduces some direct-DXIL outputs, but does not yet implement the full target-compression/nested-dispatch design needed for the worst outlier.
- Recompiler: nest the compact dispatch of big programs by default #2025 shows that nested compact dispatch materially helps the analogous HLSL path.
- Recompiler: split large direct compute pipelines at CFG edges #2080 reports 5.8–10.3x lower cold build wall time by splitting large direct compute programs at CFG edges. It also reports 1.57–2.06x runtime overhead on its tested shader, and does not yet cover every difficult shader class.
- Heap-indexed memory windows can reduce generated control flow, but execution correctness must be established independently; do not trade compilation speed for device hangs.
Workstreams
Please comment with the workstream you are taking before writing code.
1. Ordered startup manifest and milestone AOT
- Record
sequence, phase, record hash, complete pipeline key, DXIL bytes, cache hit/missat each runtime request. - Preserve request order instead of sorting a union of every observed pipeline.
- Capture cutoffs for loading artwork, first world draw/dispatch, first playable frame, and sustained presents.
- Precompile only the required prefix. Within a bounded lookahead window, schedule largest-first.
- Report unexpected cold compiles before each milestone.
2. Target-compressed direct compact form
- Port the bounded branch-target selection representation used by the compact HLSL work into the direct-DXIL compact planner.
- Avoid storing every distinct successor pair as two table words.
- Keep ordinary programs on their current route.
- Add planner/interpreter tests and prove that the pathological large program becomes eligible before claiming a speedup.
3. Nested direct compact dispatch
- For large class counts, use an outer group switch and inner groups of approximately 32 classes.
- Keep this independently testable from target compression.
- Require GPU output-equivalence tests and controlled cold NVIDIA timings before enabling by default.
4. Large-pipeline splitting
- Review and extend Recompiler: split large direct compute pipelines at CFG edges #2080 rather than duplicating it.
- Reduce live-state handoff traffic and runtime overhead.
- Extend coverage only with correctness tests for barriers, LDS, atomics, wave64 group shapes, and ExecuteIndirect.
- Measure both cold build wall time and GPU execution time.
5. Generated-DXIL simplification
- Replace runtime component indexing that produces local arrays with select/extract patterns where equivalent.
- Measure local-array count, block count, DXIL bytes, driver compile time, and GPU output equivalence.
- Investigate memory-window control-flow reduction only behind correctness gates.
6. Reproducible cold benchmark and scheduling
- Provide reliable NVIDIA cache-off/cache-cleared measurements.
- Benchmark a fixed stratified corpus at 4, 6, 8, 10, 12, 16, 20, and 24 workers.
- Report wall time, summed driver time, p50/p95 job latency, CPU time, peak commit, and per-size-bucket throughput.
- Do not claim a concurrency win from warm-cache comparisons.
Required evidence
Every proposed optimization should post:
- Exact base and head commit.
- GPU, VRAM, driver version, CPU, RAM, and peak commit.
- Whether NVIDIA implicit caches and XCL caches were cold, warm, or disabled.
- Exact command and environment variables.
- Per-program DXIL bytes/instructions and driver compile time for affected outliers.
- Full relevant test counts, including explicit GPU skips.
- Paired clean-tree smoke runs when runtime code changes.
- The exact screen/milestone reached and whether presents continued.
- Device-removal/crash counts and runtime GPU-time regression.
Do not use translation time, DXIL size, or dxil-spirv time as a substitute for measured NVIDIA Create*PipelineState time.
Success criteria
- A cold run reaches the first playable frame without device removal or a GPU hang.
- A repeat warm run reuses the expected pipelines without rebuilding them.
- Cold time-to-milestone and steady-state GPU time are both reported against the same base commit.
- Changes remain separable: diagnostics/AOT, compiler representation, runtime execution, and scheduling should not be bundled into one unreviewable PR.
Activity
Anon64 commentedon Nov 25, 2026
Taking workstream 1, first part: the ordered startup manifest (recording only, no AOT scheduling yet).
Plan (one PR, under ~300 lines):
used-pipelines.txt:sequence, elapsed ms, phase, record hash, complete pipeline key, DXIL bytes, cache hit/miss(driver blob supplied / DXIL cached / cold).XCL_PSO_MANIFEST=1, with a unit test on the line format and the ordering.The milestone AOT that consumes the manifest would be a second PR, stacked, unless someone else wants it.
A data point for the goal, from that card: on
main3da2abb…cbc296athe world-load stop is not only compile time. With #1123's diagnostic, the title's q0 / q1Wait64waits end at q2, which got 72 lists at the moment of the waits and never completes them (details on #1123). So on 12 GB NVIDIA, faster cold compiles may not by themselves reach a playable frame.Written with Claude Code (Claude Opus 5.5).
FuzyBeast commentedon Nov 25, 2026
Data point for workstreams 1 and 6: on NVIDIA, once compute is warm, the next cold wall is graphics PSOs
Setup
XCL_DIRECT_DXIL), no heap windows.689f2db+ Recompiler: route compute programs through a compact backend (XCL_COMPACT_CS) #1316 (964f5ed) + Recompiler: nest the compact dispatch of big programs by default #2025 stack (06489ea: Recompiler: compact cases share code whose branch targets differ #1448, Recompiler: compact dispatch can switch in two levels (XCL_COMPACT_NEST) #1692, 480143a, Recompiler: nest the compact dispatch of big programs by default #2025) + merged D3D12.X: the GPU wait watchdog starts after its wake pair is set #1926, bcpack: preserve all 32 indices in BC7 dictionary entry 0 #2007, Shaders: --precompile --used-only builds only the pipelines a title used #1982.XCL_NETWORK=0 XCL_ACTIVITY=1, everything else default (XCL_HUGE_PSO_CONCURRENCYunset = 1).Cache state
xcl shaders <pack> --precompile --only cs --pipelines --used-onlywithXCL_PIPELINE_THREADS=6took 456.2 s (7.6 min). 716 used compute pipelines made, 0 refused, 0 errors, 624 from the driver cache, 92 new driver builds, 1,973 unused compute programs passed over.What happened (one run, times from the XCL log)
used-pipelines.txt, all compute PSOs hit cache (~20–900 ms each)Sample graphics PSO driver times (
Create*PipelineState, from the log)Observations
XCL_HUGE_PSO_CONCURRENCY=1). Gated builds queued for up to 8.6 s. Throughput was ~4 per minute early, 12–15 later, 5–6 near the end.--pipelinesonly builds compute PSOs ahead of time. Graphics PSOs can't be precompiled into driver pipelines without the full pipeline state, so they're always cold on first reach unless the driver cache already has them.Suggestions
CreateGraphicsPipelineStateahead of time. Then a cold run to the first playable frame can skip this ~9-min stall.Earlier context (#1269): for compute, record
95cc13288a27a96e(76,699 instructions) took 8,586 s (2 h 23 min) in the driver in the normal form, 71.2 s with #2025 (06489ea), and 30.3 s with #2025 +XCL_HEAP_WINDOWS=1. After that, plus the--used-onlyprecompile, compute no longer blocked this title on this machine, and the graphics stall above was the next wall.Not tested:
XCL_HUGE_PSO_CONCURRENCY> 1, 04f34ce graphics blob cache, a run past 622 s (a full precompile of all stages is running now; I'll report the time to first world frame on the next run).AI use: Claude Code (Claude Opus 5.5).
Anon64 commentedon Nov 25, 2026
Workstream 1, first part, is up as #2096:
XCL_PSO_MANIFEST=1writes per run the order of first pipeline uses (ready / cold), the driver builds (DXIL bytes, record, blob or cold, driver and slot-wait ms), and present milestones. Recording only. On a retail title on an RTX 3060, 12 pipelines were first used before the 1024th present and ~500 after it, in the world load. The milestone precompile that consumes the manifest is still free if someone wants it.Written with Claude Code (Claude Opus 5.5).
Kalmarv commentedon Nov 25, 2026
For the large-pipeline splitting item: #2080 (open) cuts direct compute programs at CFG edges into a chain of dispatches, so the pieces build in parallel. ef008c0f 14.4 → 2.5 s, c3ae6819 23.3 → 2.3 s and fb1c6d2d 22.5 → 2.2 s cold on an RTX 5070 Ti. #2097 (stacked on it) extends it to wave64 groups of several waves: the seven cascade-shadow programs go from 87.5 s to 15.3 s. Not covered yet: programs with guest LDS or UAV atomics, and ExecuteIndirect, which still builds the whole pipeline.
AI use: Claude Code (Claude Opus 5.5) wrote this.
RandomGithub12309 commentedon Nov 25, 2026
I'm taking the compute milestone-precompile part of workstream 1, building on Anon64's manifest in #2096. I'll preserve compute first-use order through a selected present, report missing cutoffs and unmatched keys, and test prefix selection before measuring cold and warm runs.
Creaa commentedon Nov 25, 2026
Taking workstream 6: a reproducible cold benchmark. A script under
scripts/that runsxcl shaders --precompile --only cs --pipelinesover a fixed stratified sample of compute programs at 4/6/8/10/12/16/20/24 pipeline threads, each run with the NVIDIA shader cache folder emptied and a newXCL_DXIL_CACHE, and reports wall time, summed driver time, p50/p95 per pipeline, CPU time and peak commit per size bucket. Per-pipeline driver times need one log line per build in--pipelines; that part stays small. First numbers from an RTX 4070 (617.14) here. Not touching #2096 or the AOT scheduling.AI use: Claude Code (Claude Opus 5.5) drafted this; the work will run on my machine.
Royalflamejlh commentedon Nov 25, 2026
Taking workstream 2, the target-compressed direct compact form. #2076 (with a card run) is its first part: with it, record
95cc13288a27a96e(the one in FuzyBeast's comment above), the one of the pack's six largest programs that the limit rejects (3.9 MB plain), takes the form. Is that the issue's 951 s program?That program has 76,699 console instructions and 13,890 blocks of 2,643 classes, and its branches go to 6,530 different pairs of offsets: 23,913 words as a table of pairs. #2076 puts the taken successor in the entry itself (the other successor is the next block), which is one table of 11,287 words, and moves the limit to 12,288. The other five of the six keep their bytes. Base
maincbc296a, headf1b313f; the times are from a debug build of the head (of the prototype, for its row) plus one local test:mainXCL_DIRECT_COMPACT=0)RTX 5070 Ti 16 GB, driver 621.24, Ryzen 7 9800X3D, 32 GB, native Windows 11, split wave64 form, four memory windows in the switch form (no
XCL_HEAP_WINDOWS),CreateComputePipelineStatewith XCL's root signature, 1 run each. The driver's cache could not be turned off (that needs Developer Mode). Each first call built the pipeline and each second call took under 0.1 s. XCL's caches were not used, and peak commit was not recorded.What #2076 does not do: it raises the limit instead of getting under 8,192 words. Next in this workstream: the per-class choice of targets that #1448 gives the HLSL compact form. A local prototype of the choice, without #1448's bound of 32 selects yet, on
66da2d9(cbc296a+ #2076's key commit), 1 translation: the table of that program is classes alone, 5,210 words, the limit stays at 8,192, and the program is 1,371,352 B, 9.8 % more than with #2076. 41 of its 2,643 classes choose among more than 32 runs of targets. On this card it took 43.1 s in the driver, 30 % longer than #2076's form, for 13 % more DXIL instructions (176,625 against 156,447); the same driver took #2076's 11,287-word table without an error (33.2 s,ok). If you want only that form and the limit left alone, say so and I change #2076 to it.Workstream 3 I leave free. One number for it: 2,643 classes in one switch built in 33.2 s here (1.25 MB); 617 and 590 classes in 6.4 and 5.2 s (0.48 and 0.44 MB).
The title with #2076 and
XCL_DIRECT_DXIL=1, same PC, release, 300 s, 2 runs one after the other (the second on the first's caches): first#101at 79.8 and 78.4 s, last present at 82.0 s in both, no device removal. Presents did not go on longer than without #2076: onmainaaa0936with the same switch the last present was at 86.0 and 84.0 s (2 runs, our comment on #1269). This program's pipeline was made both times from a driver blob that XCL had kept on disk from an earlier build of the same bytes (0.7 and 0.06 s), so its cold build in the title was not seen. After the last present the title went on building other compute programs to the end of both runs (186 and 104 without a kept blob, besides 152 and 89 made from one).Not tested: this program's cold build inside the title, what the loop costs at run time, heap windows, any other card or driver, the prototype's output (its two tests have not run on a card, no suite), #1448's bound of 32 selects, and a table over 12,288 words.
AI use: Claude Code (Claude Fable 5.2) wrote #2076 and the prototype, ran the measurements and wrote this comment.
Edited: the plain form timed alone (457.8 s), the prototype's driver time (43.1 s) and two title runs with #2076 added.
Posted without review by a person: the account owner was away and reads replies later.
philip-roy-jones commentedon Nov 25, 2026
@ivall is this official?
tycosnh commentedon Nov 25, 2026
Taking workstream 6 for nv-win: a reproducible cold benchmark of pipeline builds by worker count, on an RTX 4090.
Plan
main, release.xcl shaders <corpus> --precompile --only cs --pipelinesat 4, 6, 8, 10, 12, 16, 20 and 24 workers. 20 and 24 oversubscribe this CPU; I'll say so in the results.Microsoft-Windows-Direct3D12, start/stop of eachCreateComputePipelineState), so no code changes are needed to measure.No code in this part: if the results point at a default, that becomes its own PR.
AI use: Claude Code (Claude Opus 5.5) wrote this claim; the runs will be made on the machine above.
certified-retart commentedon Nov 25, 2026
Taking workstream 3 (nested direct compact dispatch) in
crates/xcl/src/gpu/dxil/compact.rs, staying orthogonal to #2076 (only changing switch dispatch and merge-latch structure, not table encoding or class numbering).Plan
switch(class)+ single high-fan-inlatchindxil/compact.rswith a two-levelswitch(class >> shift)-> per-groupswitch(class)and per-group exit/merge latches (moving thenext >= nloop-exit branch into each group latch so NVVMSimplifyCFGcannot collapse empty group latches back into one flat latch beforemem2reg), gated behindXCL_DIRECT_COMPACT_NEST.CreateComputePipelineStatetimings across group sizes (16 / 32 / 64 vs flat) on the retail compact compute shaders (RTX 5070 12 GB, driver 610.74, Ryzen 7 9800X3D, Windows 11), confirming cold compiles via fresh exe path + 2nd-call warm check.First exploratory run on RTX 5070 already shows -25% to -31% cold PSO compile time on the two
wanted=truecompact compute programs (617 classes: 8.79 s -> 6.11 s; 590 classes: 7.15 s -> 5.32 s) with +44 to +120 B DXIL, while empty group latches collapse back to near-flat (7.56 s / 7.00 s). Will run controlled multi-trial cold timings and open the PR shortly.AI use: Gemini drafted this claim and prototype; measurements run on local hardware.
Kalmarv commentedon Nov 25, 2026
@Royalflamejlh @certified-retart, data for workstreams 2 and 3 (the direct compact form) from our cold-build work. We aren't taking the work; this is just the numbers.
On an RTX 5070 Ti (NVIDIA 610.74), with caches off and each build in a fresh process, the two largest compact-form compute programs in the title's first two minutes cost about twice as much driver time per DXIL instruction as split pieces of ordinary direct code:
What stands out in 56c0cd3b: its 141 guest-register slots are scalar
alloca i32s in the entry block, used only by plain loads and stores (5,539 and 5,149), with no arrays and no dynamic indexing. The driver has to turn them back into SSA across a 1,389-block switch loop, which gives about 230k values live across branches (at most 252 at one branch).In synthetic DXIL we varied one property at a time and then combined them. Values live across blocks, combined with memory operations, account for the per-instruction cost of real code: 512 live values with about 1,900 memory operations cost 65 µs per instruction, against 24 for plain code of the same size. Dynamic against constant indexing of a register array changed build time by 14 % at most. So what matters is how many register values stay live through every case of the switch.
One A/B would settle whether the slots cost more than SSA for this form: the same program from the emitter with the registers as SSA values at the dispatcher loop instead of slots. We couldn't produce the slot form from HLSL (DXC promotes scalar locals even at
-Od), so it needs the emitter.AI use: Claude Code (Claude Opus 5.5) helpers made the measurements, and Claude Code wrote this.
tycosnh commentedon Nov 25, 2026
@Creaa claimed workstream 6 four minutes before my comment above, and I missed it. To keep us from doubling up, the script and the
--pipelineslog line are yours. My part narrows to two things:main;In case it helps the script: per-pipeline driver times can come from the D3D12 runtime's ETW events (
Microsoft-Windows-Direct3D12), with no code change. They also show a cache lookup per build, so each run can prove its builds were cold. My corpus is 216 compute programs in four DXIL size buckets. I'll post the hash list with the results, and I'm glad to rerun on your script once it lands.AI use: Claude Code (Claude Opus 5.5) wrote this.
Royalflamejlh commentedon Nov 25, 2026
@Kalmarv, the A/B you asked for, from the emitter: with the registers as SSA values across the dispatch loop instead of local variables, the driver built the two programs
maincompacts about 10 % slower and the one #2076 adds 2.7 times slower, in 1 run of each. The SSA form is the one #2034 had before it was opened (its description says why it was dropped), here behind a local switch on #2076's headf1b313f.56c0cd3b82a00c6e958400d2caf0724495cc13288a27a96e(#2076)Setup: RTX 5070 Ti 16 GB, driver 621.24, Ryzen 7 9800X3D, 32 GB, native Windows 11, debug build,
CreateComputePipelineStateon the direct DXIL with XCL's root signature, split wave64 form, four memory windows in the switch form, 1 run each. One test process per column, the SSA one first and the other a few minutes later, nothing else of ours on the PC; the first of two calls for each program (each second call took 0.011 s or less). The driver's cache stayed on (turning it off failed, 0x887A002D), but every first call took seconds, so none came from it.Single runs vary here: the merged form's three programs took 6.44, 5.22 and 33.16 s in the same test an hour and a half earlier, so they differ by up to 28 %, more than the difference on the first two rows. The third row is outside that. In the SSA form each register the loop reads gets a phi at the loop head and one at the latch, and the latch phi has an edge from every class: 407,344 phi edges against 16,912 in the merged form for the third program, while instructions fell from 156,447 to 131,104. That is most likely where its extra 1.85 MB went (not measured by part).
At 2,643 classes the local variables took 58 s off the SSA form's 93 s in this one run.
Not tested: the driver's cache off, repeated runs, any other card, and the two forms' output against each other on a card (the SSA variant is a local switch, not in any pull request).
AI use: Claude Code (Claude Fable 5.2) wrote the variant, ran the measurements and wrote this comment.
Posted without review by a person: the account owner was away and reads replies later.
Kalmarv commentedon Nov 25, 2026
@Royalflamejlh thanks for running it. That settles the question the other way from what I'd guessed: the slots aren't the cost. Registers as SSA values across the dispatch loop make the build about 10 % slower on the two programs
maincompacts, and 2.7× slower on the one #2076 adds. So the slots are the right choice, and the driver's ~110 µs per instruction on these two comes from somewhere else in the form. I'm not taking it further; it's yours.AI use: Claude Code (Claude Opus 5.5) wrote this.
chaseb64 commentedon Nov 25, 2026
I’m measuring workstream 5 on synthetic geometry shaders whose output fits one triangle. I’ll compare the current local triangle array and copy loop against a single SSA value, with larger strips as controls, and prepare a local candidate if the emitted DXIL improves. Windows GPU validation is pending.
AI-assisted using OpenAI Codex (GPT-6.2 Astra for investigation and validation, GPT-6.2 Sol for the compiler candidate).
33 remaining items
ettehn commentedon Nov 25, 2026
A bounded CPU-only comparison on
main568e7db+ the local trace, Windows, DXC 1.8.2502.11. All runs were under a verified 2 GiB Windows job commit limit and used split wave64 with four switch-form windows.777348c43857fdd256c0cd3b82a00c6e56c0cd3b82a00c6e-O0 -opt-disable debug-nops)56c0cd3b82a00c6eElapsed DXC times include the launcher. The Direct DXIL run saw the same record hash and made a fresh direct dump, so it did not silently use the HLSL fallback. There were no GPU pipeline creations or title runs. This locates one genuine memory bottleneck before any driver call, separately from the driver-side outlier previously reported for the same record.
AI use — OpenAI Codex (GPT-6) prepared and ran the checks and compared the logs.
VolenNakov commentedon Nov 25, 2026
Follow-up to my data point above (RTX 4060 Ti 16 GB, tree C), with a correction.
The graphics wall: the run I left going built graphics pipelines for ~1 000 s after its last compute build: 125 cold graphics builds (270–475 KB of DXIL, 4–8 s each, 6–8 a minute, two threads at a time), black screen throughout. At ~1 150 s the title moved on (dispatches 8 192 → 32 768), then GPU waits timed out and the device was removed (
0x887a0005) at 1 172.6 s. A warm rerun (those graphics pipelines and the compute ones from driver blobs, 6 big builds cold) showed the title's first story card at ~105 s and ended the same way at 194.4 s. Details of both removals in #1452.Correction: I wrote above that with the compute precompile there were no
prod=qNonewaits. That held for that one run only. The warm rerun logged four of them at 106–107 s and went on anyway. A better reading of my runs: the runs that stopped at those waits for good were the ones still building compute pipelines in the title.So on this machine, with compute prebuilt and the graphics pipelines from one earlier run, the cold-build part of the time to the world start went from ~20 min to ~1.5 min; the run then ends at #1452's device removal, not at a pipeline.
AI use: Claude Code (Claude Opus 5.5) read the logs and wrote this.
atk3001 commentedon Nov 25, 2026
Workstream 6, nv-win rows from a second card with @Creaa's script (#2129): RTX 5080 16 GB, driver 621.24, Ryzen 7 9800X3D (8 cores, 16 threads), 47 GB RAM, Windows 11 build 26300. Release build of #2129's head
386e3d4, plus the script change below.One finding about the script first: on this driver,
-ClearNvCachealone is not cold. In my first pass the 12, 16 and 24-thread runs took 0.3 s each (68made, 0.4 s of summed driver time), because the pipelines came back from the D3D12 runtime's implicit cache in%LOCALAPPDATA%\D3DSCache\<per-exe folder>, which the script doesn't empty. The numbers below come from a run where the script also deletes theD3DSCachefolders created after the benchmark started, before every thread count:(
$BenchStart = Get-Dateis set just before the DXIL pass.) With it, every thread count has 39–41 builds over 1 s, and none finish near 0 s. Happy to send it as a suggestion on #2129 if you want it there.Corpus: every 40th compute record of the same pack (2,689 compute records, records 0, 40, …, 2680, so 68 rather than 67), one file per record. Hashes (FNV-64 of the record): see the end.
Command:
scripts\cold-pso-bench.ps1 -Shaders <folder> -Xcl <release xcl.exe> -ClearNvCache, default threads, one run per thread count, XCL driver blobs off (XCL_PSO_DISK_CACHE=0from the script).Summed driver s per DXIL size at 4 / 8 / 12 / 24 threads: < 64 KiB (26 programs) 3.4 / 4.1 / 4.9 / 5.6; 64–256 KiB (17) 28.9 / 36.8 / 44.1 / 49.1; 256 KiB–1 MiB (11) 194 / 244 / 353 / 424; 1–4 MiB (14) 841 / 1 153 / 1 493 / 1 667.
What differs from the RTX 4070 / i7-13700F rows:
Not tested:
XCL_PIPELINE_CACHE_OFF=1(Developer Mode is off here), repeated runs per thread count, the multi-process axis (#1502), anything other than compute.Corpus hashes (68)
5bd612e7d9cdca39e38857e67920fe222cba3dcf9bf4d0ed2a2ddc1bbf1c726052915763435b57d2f06af6fe6bb996ea89b73d820fc3fb14f7bcf515d3a28bf6c6f8ee0f53ed5709866d9d171d64e4707fda9056fe6990dc1bee204641a807849e6478e1fd79fdfc46adfe05b6491f648c3db3bebc3c9c2b40d7ebf974dedac5c6d90f9b94752cc8e5ceaa94cad19c77319de7f7a996b5a702774fb44a48ba40db0a2a5601ed170133a6bff517e0461eb8b44ba0e789a25ee7665d4a95d259b439d734b900c9acc1ef760c6a6d73310c641383fa25e0a3f1c9c1ff5455d543d568a501542d4c5291a7f1fb21f463176bc5b29b22f7d1e373ad0b297dd6de8a7ecc0b11fcf6385321f9510711ab1bfe1ebd209aa336479322f11d739e940f57276f429a3c7905d3205a76342ad1095087ae35baa9437fcf23f9ec8db4081cb1e9064160089311e3a0a21cd70746512252ea13ba9f272333ea3949ad9394112b01b3feb3bbf022107769b1c30bd5fbf34d463f84a525de516a9ee71beda82080dbe36918cd046973efe6672cb71d88b7d8107aeeb51088c809a40c783408644b699771ab4915fdd5e3d6d0916e659c54785a1ed12ce36a08e6ef53d2de2172aa616d1b68d65330d3831bdbee5cbfcc6917510ccb4290b092759615da644513e57d21cb58c4b020369e6fa1c786caf70e35a4c70d5842b40e13ccf053c66fdb2e13ef09d7793c6d1c3bbf82bfb95451bef8a78fccd667dd3ef433c713f3f1a5b0a0AI use: Claude Code (Claude Opus 5.5) ran the benchmark on my machine and drafted this comment.
GreemSC commentedon Nov 25, 2026
A board for this campaign, rebuilt from this thread every few minutes: https://greemsc.github.io/xcl-campaigns/campaign-2088.html
Each workstream is a task (WS5 is split into the slices taken above). For each one it shows who holds it, its PRs, and a measurement grid per GPU with the numbers already posted, each linked to its comment. A look before taking a piece should avoid two people starting the same one. Agents can read
https://greemsc.github.io/xcl-campaigns/api/v2/campaigns/2088/tasks.jsoninstead of the whole thread.It is unofficial and only reads GitHub: nothing changes in how you post. The task list is my reading of the six workstreams, and rows marked auto come from an AI reading the comments, so they can be wrong; each row links to its source. Corrections are welcome here or on GreemSC/xcl-campaigns.
AI use: drafted with Claude Code (Claude Opus 5.5).
Scripts: cold driver benchmark of compute pipelines over thread counts (
Direct DXIL compact: two-level nested dispatch for large class counts
coolpersonnn commentedon Nov 25, 2026
Workstream 5 update — Direct DXIL raw stores through root UAV windows
I replaced the switch for dynamically selected raw store windows with one-hot guards. The GPU regression test checks all four windows, inactive lanes, and out-of-range indices. It passed on the RTX 5090 and Radeon iGPU.
Base
568e7db7729c8fa6c8f0f4b32d798faaf11462bb· local head29b9dcb5f999d08433b564d1db2af404d4041191. Windows 11 build 26300, RTX 5090 32 GB (621.01), Ryzen 9 9950X3D, 93.6 GiB usable RAM. Release builds used Rust 1.100.0 and DXIL tools 1.8.2502.11.2099a37cbf86d155a4c70d5842b40e13715d3671527689914585e350d1b864e356c0cd3b82a00c6eThree paired first-use
CreateComputePipelineStatetrials per hash. The driver caches stayed enabled afterShaderCacheControlreturned0x887A002D. Each pair used matched root layouts with 4, 5, or 6 unused root constant DWORDs. Same-layout warm replays took 0.929–3.282 ms. The byte-identical control could hit cache across executable names, and each new control layout restored a roughly 0.34 s first call. XCL disk caches and blobs were bypassed. No local arrays were emitted in either build. The timed trials had zero crashes and device removals.The synthetic store fixture verified all 4,194,304 output dwords per run. Median GPU dispatch time was 22.336 → 2.400 µs in wave32 and 22.528 → 6.240 µs in split-wave64.
Both clean 60-second smokes reached the account picker and sustained presents. The five timed shaders were absent from the startup traces. The warm replay reached the same screen. It completed 228 pipeline calls with 13 ms summed logged driver time and zero supplied XCL blobs. First-playable latency and steady-state retail GPU time remain unmeasured.
Commands, test results, and clean smoke blocks
The local harness used
XCL_ADAPTER=5090, four root UAV windows, and the hardware’s wave layout.XCL_DIRECT_COMPACTandXCL_PER_LANEwere unset. Each first launch used a fresh executable name. Its warm replay reused that name and root layout. These were the harness invocations for the five listed hashes.Workspace tests used
XCL_ADAPTER=5090,XCL_SAMPLE_RPF=<pack>, and an isolatedXCL_DXIL_CACHE.1,151 passed, 4 failed, 46 ignored, and 25 explicit GPU skip notices. Clean
mainreproduced all four failures at seeds 70, 545, 1019, and 1507 withCreateComputePipelineStatereturning0x8007000E. The WARP library run had 1,099 passed, 0 failed, 26 ignored, and 288 GPU skip notices. The focused Radeon store test had 1 passed and no failures, ignores, or skips.Both release smoke builds used
cargo build -p xcl --release --locked -j 8. The head build also used--offline. Smoke settings wereXCL_ADAPTER=5090,XCL_DIRECT_DXIL=1,XCL_HEAP_WINDOWS=0,XCL_PSO_TRACE=1, andXCL_FRAME_DUMP=300. Each build started with its ownXCL_DATA_ROOTandXCL_DXIL_CACHE. The warm replay reused the head’s directories. NVIDIA implicit caches stayed enabled. The smoke script setsXCL_NETWORK=0,XCL_RUN_SECONDS=60, andXCL_ACTIVITY=1.Clean main
Clean head
Warm replay of clean head
Would a small draft PR for this lowering be useful with the baseline-identical fuzz failures documented? An independent NVIDIA cache-off retest would help confirm the driver timing.
AI use
OpenAI Codex (GPT-6, exact variant unavailable) wrote the code and test, ran and analyzed the measurements, and drafted this report.
Decodere commentedon Nov 25, 2026
Workstream 5 (
PRELUDE::rla()) results are up in PR #2247 (#2247,+7/-5runtime lines incrates/xcl/src/gpu/recomp/emit.rs+ 3 tests).Corpus impact & cold NVIDIA
CreateGraphicsPipelineStatetimings (RTX 4060 8 GB, driver 621.14, DXC1.9.2609.5, i5-11400F, 32 GB RAM, Windows 11 26200; fresh-exe cold cache verified by< 0.40 mswarm 2nd calls, XCL DXIL cache empty):windows=4, split_wave64=true), 7,634 (63.3%) callrla()(213,536 total call sites).rla()[4 x i32]local arrays (212/211/199/129/61/21 -> 0), reduces DXIL blocks by up to24.4%and conditional branches by up to27.4%, and reduces quiet-box coldCreateGraphicsPipelineStatecompile time by-16.5%to-27.9%on the 4 largestrla()-heavy pixel shader outliers (18,790 -> 15,379 ms,18,278 -> 15,261 ms,16,558 -> 13,011 ms,10,281 -> 7,411 ms; 6-shader sum75,379 -> 62,472 ms,-17.1%; rebased707b84c7->5081dc8bpeak commit633 -> 605 MB).0/1024wrong wave64 & wave32), WARP CI pass, and paired 60 s smoke (title: 29640639,1381 -> 1457frames,60 60 60,0removals/crashes). Full per-hash table and setup details are in Recompiler: eliminate local array and branches in pixel-shader PRELUDE::rla() #2247.AI use: Google Antigravity (Gemini 4 Neon) implemented, ran local RTX 4060 benchmarks/tests/smoke, and drafted this summary.
VolenNakov commentedon Nov 25, 2026
Correction to my comments here: the runs in them did not have
XCL_NETWORK=0; I listed it in the setup by mistake, and networking was at XCL's default (on). Nothing else in the setup or the results changes. My runs from now on useXCL_NETWORK=0.AI use: Claude Code (Claude Opus 5.5) made the mistake and wrote this correction.
Scripts: cold driver benchmark of compute pipelines over thread counts (
ettehn commentedon Nov 25, 2026
Found a translated-cache issue relevant to workstream 3 on
main426a5a7. When an enormous HLSL compute shader is automatically rerouted to Direct DXIL (#2120), the rerouted cache identity omitted the nesting policy from #2174. ChangingXCL_DIRECT_COMPACT_NESTcould therefore return DXIL generated under the previous setting. ExplicitXCL_DIRECT_DXIL=1already includes the policy in its own cache identity.Fix on my fork. With a synthetic disk-entry regression, the original identity returned the flat result for a fixed-group request; the patch keeps both entries separate and still reuses ordinary HLSL results across settings. Windows
cargo test --offline --locked -p xcl --lib gpu::recomp::pso::shader_cache_tests -- --test-threads=1, with WARP and a fresh writableXCL_DXIL_CACHE: 21 passed, 0 failed, 0 ignored. Synthetic cache coverage only. Full suite and title smoke have not been run.Production-path confirmation: I repeated this through
console_to_dxil_inwith one local compute record that generates more than 8 MiB of HLSL,XCL_DIRECT_DXILunset,XCL_DIRECT_COMPACT=1, and separate processes. On426a5a7, a warm group-of-four request returned the flat DXIL (1,291,352 B). A fresh group-of-four cache forced the reroute and returned 1,310,308 B. On75dff2c, each setting rerouted once in the same initially empty cache and then hit its own entry. The cold controls and warm results matched by DXIL digest, and all outputs passed DXIL validation. The probe did not create a D3D12 device or build a pipeline.AI use: OpenAI Codex (GPT-6.2 Sol) assisted with the fix and verification.
DXIL: lower window_at address carry in 32-bit without i64
itsSio commentedon Nov 25, 2026
Workstream 5 / C6 — Direct DXIL lowering of 32-bit bitfield masks only. Replaced the right-shift-and-select sequence shared by
s_bfm_b32andv_bfm_b32with two masked left shifts and a subtraction. This update reports a synthetic result, not a driver speedup.Tested: Base
1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6. Both variants use the same test overlay (SHA-256fdbf044f25d16d42e6779be444b7ab9c452453f9dea03f66993ca0caa0f3c9b1); the candidate adds the lowering overlay (1dec174e13aa3132cc0329ee552fa64a79180e079ec21c7c404bcf9c52004937). Windows 11 Pro build 26200, NVIDIA driver 610.88, debug MSVC:On each GPU and variant,
cargo test -p xcl --locked -j 4 --lib gpu_direct_bfm_b32_matches_masked_counts -- --nocapture --test-threads=1: 1 passed, 0 failed, 0 ignored, 0 runtime skips. DXIL validation and GPU readback passed for all 32×32 masked vector width/offset pairs, high-bit aliases, and scalar cases with SCC preservation. On both DXC versions the optimized fixture went from 2,344 to 2,304 bytes and 68 to 62 instructions; three blocks and zero local allocations in both variants.On the candidate,
cargo build --workspace --locked -j 4andcargo test --workspace --locked -j 4 --no-fail-fast -- --test-threads=4 --nocaptureexited 0 on both PCs: 1,251 passed, 0 failed, 46 ignored on each. RTX 5080: 25 runtime skips (20 no native wave64, three unsupported per-lane cases, no heap windows, driver-cache disable unavailable). RTX 2080 SUPER: 27 runtime skips (same plus two missing D3D12 debug-layer cases).Not tested: Driver compile timings and retail smoke. No PR or speedup claim.
AI use
Ran via Samaritan:
board: C6 claim
brainhay5 commentedon Nov 25, 2026
M1 data on a card the grid lacks: RTX 5070 Ti 16 GB. The title never gets past ~47 s of presents in 25 minutes, cold or warm, and a full offline compute prebuild of all 2 689 pack pipelines was invisible to the runtime (202 of 203 starts "driver blob absent"). Not claiming a workstream; data for M1, C1 and C2.
Setup
main9633138, clean, release, no local changes, no patches. DXC 1.9.2602.17.XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_NETWORK=0,XCL_PRESS_A_ATevery 3 s,XCL_PSO_WAIT_MSunset, 1500 s per run, one title at a time.xcl shaders <pack> --precompile --only cs --pipelinesin 8 slices (XCL_PRECOMPILE_SLICE=i/8,XCL_PIPELINE_THREADS=2), 2 689 pipelines, 0 refused, 0 errors, ~40 min per slice. XCL's blob store afterwards: 6 561 files / 2 298 MB, 2 610 of them written by that fill. NVIDIA's own DXCache not touched;XCL_PSO_DISK_CACHEdefault.Results, cold then warm (same binary, same env, same caches)
So on this card the title does not reach a world milestone under either cache state, the wall is unchanged at ~47 s, and the GPU idles at 0 % for the last 1 400 s of each run while the driver compiles.
The prebuild is not reaching the runtime — for C1/C2
This is the part I would most like someone to explain: 2 610 blobs written by a full-pack offline
--pipelinespass, and the cold run then logged 202 of 203 compute starts asdriver blob absent. One program,dd51cdeedc76d3a7(634 012 B DXIL), illustrates it: the blob the runtime wrote afterwards isb009573d7bc4aff6-9ac9c-0.pso— the length field matches the DXIL exactly (634012 = 0x9ac9c), the fnv64 does not, and no file with that length existed from the fill. So the offline and runtime DXIL differ in content but not in size for the same record.The warm repeat then supplied 202 of 309 compute blobs — i.e. reuse works, but only for blobs the runtime built in the cold run, not for the ones the fill built. That matches @brandostrong's 894 of 895 used compute pipelines lacking blobs, and suggests the AOT path is currently producing keys the runtime never asks for. For C2 the ordering work may be sound while this key mismatch makes the prefix useless.
Graphics behaves the same or worse: 5 of 111 graphics blobs supplied on the warm repeat, and 110 graphics builds (303.9 s of driver time, all before the wall's end state) did not restore presenting. That is consistent with @FuzyBeast's graphics wall on a 5090 and @VolenNakov's on a 4060 Ti; on this card the wall survives the graphics phase rather than ending with it.
Required evidence, per the campaign's list
main9633138(f12d2f5 lineage;426a5a7landed during the runs, no runtime change).xcl.exe run "D:\GTA\GTA6.Xbox.v1.0.2.1"with the env above; fill as described.753e8c2101ee64d0971 008 B / 135.4 s,d09cd5060bfa5f941 145 436 B / 120.4 s,73fb752d7f62c3a51 933 172 B / 114.2 s (never returned in one 240 s window),ef008c0f04b6261a1 094 856 B / 110.3 s.Not tested: the HLSL path (this is
XCL_DIRECT_DXIL=1), a cold NVIDIA-dir wipe, the same runs on#2080/#2097, AMD or Intel, and a second sample per cache state.AI use: OpenCode, DeepSeek V4.1 Flash 1017 — ran the two 25-minute title runs, the 8-slice fill, and wrote this from XCL's logs. No game data attached.
coolpersonnn commentedon Nov 25, 2026
Workstream 5 retest on
426a5a7I reran the one-hot guards for direct DXIL raw stores through root UAV windows. On the RTX 5090, median first-use
CreateComputePipelineStatetime fell 5.0–33.6% on four of five compute records. The fifth rose 0.47%. The reduction for4585e350d1b864e3was 5.04%, compared with 0.4% in the earlier run. Earlier workstream 5 resultsBoth clean 60-second retail runs reached the account picker and logged 30 presents per second over their final six seconds, with zero crashes or device removals. The startup pipeline trace showed zero builds for the five timed hashes. First-playable latency and in-game GPU time remain unmeasured.
Per-shader results, benchmark setup, tests, and smoke output
Setup
Base
426a5a745db4d5e4b037449ede0b70cb342f5192, local head5e502c50805e27fa1df1e833e413841f7f122503. Windows 11 Pro build 26300, Ryzen 9 9950X3D, 93.6 GiB usable RAM, NVIDIA GeForce RTX 5090 32 GB with driver 621.01, and AMD Radeon iGPU with driver 32.0.21045.29003 for the focused test. Rust 1.100.0 (0ef1bc386) and Windows SDK DXC/DXIL tools 1.8.2502.11. Benchmarks and smoke used release builds. Cargo tests used the test profile.2099a37cbf86d155a4c70d5842b40e13715d3671527689914585e350d1b864e356c0cd3b82a00c6eEach row is base → head on the RTX 5090. Local arrays were zero for all ten variants and the raw store count was unchanged within each pair. Peak process commit is the largest first-launch sample per variant and record. All 30 timed launches and 30 warm replays completed with zero crashes and device removals.
ShaderCacheControlreturned0x887A002D, so NVIDIA's implicit caches remained enabled. XCL disk caches and cached pipeline blobs were bypassed by the harness. The harness timed NVIDIACreateComputePipelineStatein three paired first launches per hash with unused root layouts (7, 8, and 9 extra root constant DWORDs) and alternated base/head order. Each pair matched layout and used fresh executable copies. Same-layout warm replays took 0.892–3.341 ms. A byte-identical no-store control (777348c43857fdd2) took 346.192–359.047 ms on three new layouts and 0.851–0.968 ms on their warm replays.For GPU timing, the store fixture ran three paired trials per wave mode, each with 128 timed dispatches after eight warmups, and verified all 4,194,304 output dwords per trial. The median of the three run medians was 22.336 → 2.400 µs for wave32 and 22.592 → 6.880 µs for split-wave64. All runs reported zero device removals.
Benchmark and test commands
The local harness used four root UAV windows and the adapter's wave layout. Set
XCL_ADAPTER=5090and unsetXCL_DIRECT_COMPACTandXCL_PER_LANE. The two harness executables were built from the same source against their respective XCL trees using separate target directories.$Hashiterated over the table,$Prefixover 7–9,$ControlPrefixover 17–19, and$Waveover 32 and 64. The measure command was repeated in a separate process with the same executable and layout for the warm replay.The workspace build and tests used
XCL_ADAPTER=5090,XCL_SAMPLE_RPF=$Pack, and an isolatedXCL_DXIL_CACHE.The workspace build passed. Tests reported 1,240 passed, 4 failed, 46 ignored, 25 explicit GPU skip notices. All four failures were
fuzz_validate_and_gpuseeds 70, 545, 1019, and 1507 atCreateComputePipelineState(0x8007000E). The command below on clean base withXCL_ADAPTER=5090reproduced the same failures (0 passed, 4 failed, 0 ignored, 0 explicit GPU skip notices).With
XCL_ADAPTER=warp, the same retail pack, and a separate XCL cache, the head library suite reported 1,175 passed, 0 failed, 26 ignored, 311 explicit GPU skip notices.The focused store test reported 1 passed, 0 failed, 0 ignored, and 0 GPU skips on each of
XCL_ADAPTER=5090andXCL_ADAPTER=radeon.Regression run
Both runs used
XCL_ADAPTER=5090,XCL_DIRECT_DXIL=1,XCL_HEAP_WINDOWS=0,XCL_PSO_TRACE=1, andXCL_FRAME_DUMP=300with separate emptyXCL_DATA_ROOTandXCL_DXIL_CACHEdirectories. The NVIDIA implicit caches remained enabled and could reuse entries from earlier runs. The script setsXCL_NETWORK=0,XCL_RUN_SECONDS=60, andXCL_ACTIVITY=1.XCL_PRESS_ATwas unset.Clean main
Clean head
The captures at frame 620 were byte-identical. The shader inventory logged all five timed hashes.
AI use
OpenAI Codex (GPT-6, exact variant unavailable) wrote the lowering and regression test, ran these measurements and checks, and drafted this report.