Repository navigation
Conversation
… form A split compute program keeps its whole form for what its pieces cannot run (an ExecuteIndirect, a dispatch without scratch). The runtime builds that form under the dispatch-chain root signature (Chain::whole, chained, .chain.pso) on the title's thread the first time it is needed. #2338 prebuilds only the pieces, so every whole form was still compiled cold in the title. On a retail title (RX 9060 XT, XCL_DIRECT_DXIL=1), after a full compute precompile without the whole forms, the title's submit thread built 3-6 of them (0.8-1.15 MB of DXIL) at its world start, 41-55 s each, presenting nothing meanwhile; with them prebuilt, those binds loaded the blob in 3-4 ms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Full-suite run, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! — Devin |
|
Independent Windows integration check of Tested: Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti / 621.35, Rust 1.99.1 MSVC, DXC 1.8.2502.11, debug,
The merged #2371 path tries an offline whole PSO with the ordinary compute root signature; this PR also prepares the chain-root whole form used by AI use: Codex (GPT-6.2 Sol) reviewed the combined paths, ran these tests on this machine, and drafted this report. AI-assisted. |
|
NVIDIA world data for this PR: RTX 3090 (driver 621.40), retail 1.0.2.1. With this PR's precompile the cold compute builds on title threads at the world start went from 30 to 0, and the title presented in the world until the next wall (#2403). One run per state; the runtime is the same Setup
Result
So on NVIDIA, as in your RX 9060 XT runs, the whole forms were what the title waited on at the world start once the pieces were cached. Not tested: more than one run per state; AI use: Claude Code (Claude Opus 5.5) ran the precompiles and the runs on my PC, read the logs and drafted this. |
|
AMD Windows cost of this PR's offline pass: on an RX 9070 XT, the six whole forms in a 26-program set take 17–34 s each in AMD's driver. That doubles the Setup
The six extra pipelines are the whole forms of the six split programs in the set, built with
The other 76 pipelines (56 pieces and 20 unsplit programs) took 120.7 / 110.0 s with this PR against 109.6 / 110.5 s on Not tested: a title run and the reuse of these blobs at run time (I ran with the disk cache off). AI use: Claude Code (Claude Opus 5.5) built the binaries, ran the measurements and wrote this report; I posted it. |
|
Tested: current PR head merged onto current
Not tested: retail titles (no title data on this lane, counts only). AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting. |
|
On AI use: Claude Code (Claude Opus 5.5) ran the runs and drafted this; checked by me before posting. |
|
A follow-up from an RTX 3090 (driver 621.24, Windows Sandbox vGPU) on the NVIDIA integration base I checked six first-demand stalls against the sealed CLI precache. Each shader's translated record and all 67 split-piece PSOs were present. All six whole chain-ABI PSOs were absent. These six driver compiles took about 82 seconds total during the loading interval. A later sample of 40 whole variants showed the same missing-blob pattern. With the recovered driver blobs in a private six-key cache, I exercised an opt-in backport of this PR. On the same cache, the normal Credit to @DTsordas for the whole-variant precompile change. AI assistance: OpenAI Codex. |
|
RTX 3070 8 GB (driver 617.42), on a tree that has #2404 (two items of your "Not tested": NVIDIA, and together with #2404): with this PR's whole forms in the cache, the title kept presenting to the end of two 420 s runs, and one of them loaded 55 whole forms from this PR's blobs. Without them, one of two runs stopped presenting at 181 s, 99 s after world entry, while whole forms were built cold. With the PR, no compute pipeline was built cold after the world start. The next cold builds are graphics pipelines from about 300 s, up to 12 s each.
Tested
Not tested
AI use
|
|
Independent desktop NVIDIA verification of PR #2551 at head Environment
Targeted release tests & build (
|
| Command | Result |
|---|---|
cargo test --release -p xcl --test gpu_compute_e2e offline_split_compute_pipeline_is_reused_by_a_second_process -- --nocapture (3 consecutive runs) |
1 passed; 0 failed; 0 ignored; 5 filtered out × 3 (0.96s, 0.83s, 0.83s, 0 skipped) — runs live on RTX 4060 + DXC 1.9.2609.5, precompiling both split piece .chain.pso blobs and the whole-form .chain.pso, verifying second-process warm driver-cache reuse and single-blob corruption recovery |
cargo test --release -p xcl --test gpu_compute_e2e -- --test-threads=1 (3 consecutive runs) |
6 passed; 0 failed; 0 ignored × 3 (1.99s, 2.00s, 1.98s; 5 executed on RTX 4060 + 1 self-skipped heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows) |
cargo test --release -p xcl --lib shaders:: (3 consecutive runs) |
10 passed; 0 failed; 0 ignored; 1314 filtered out × 3 (0.20s, 0.19s, 0.18s; 9 executed + 1 self-skipped pso_measurement_compiles_an_exact_synthetic_record because Windows Developer Mode is off) |
cargo build --release -p xcl |
Clean build (exit 0, 0 new warnings) |
Paired quiet 60 s retail smoke (title: 29640639)
Exact parent & merge-base (e1d84b7d9153f86a97d2ec5d209d196046fc0bea, cached baseline on the same machine):
xcl-smoke v1
commit: e1d84b7d9153f86a97d2ec5d209d196046fc0bea
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1531 (PresentX 1531)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13982 MB
PR #2551 (3567b2efdc94617de71e50be77e107991a6bd41c):
xcl-smoke v1
commit: 3567b2efdc94617de71e50be77e107991a6bd41c
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1601 (PresentX 1602)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13991 MB
Runtime log observations (xcl.log)
9222log lines,0[ERROR]/ device-removal / panic lines.- Final draw/memory telemetry in log:
19558 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped); last memory sample13991 MB committed by the process; video memory 6115 MB local, 4650 MB non-local.
Limits of coverage
- Offline
--precompile --pipelineswhole-form + split-piece.chain.psoemission, second-process driver-cache reload, and corrupt-blob recovery were directly verified end-to-end on desktop RTX 4060 viaoffline_split_compute_pipeline_is_reused_by_a_second_process(3/3pass) andgpu_compute_e2e(5executed +1self-skipped × 3). shaders::tests::pso_measurement_compiles_an_exact_synthetic_recordself-skipped because Windows Developer Mode is off on this host, and the 60 s retail smoke ranxcl runwith warm caches rather than a full offline--precompile --pipelinessweep over a retail shader dump (confirming zero runtime regression ontitle: 29640639; frame-count delta vs. cached parent reflects single-run startup variance, not this PR).
AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).
|
Tested: Clean Not tested: Live whole-form ExecuteIndirect or scratch-fallback dispatch, driver timing, workspace suite and retail smoke. AI use: T3 Code / Codex ( |
|
One rebase detail for I reproduced the extra driver call on Windows with an RTX 5070 Ti Laptop, using OpenAI Codex (GPT-6) assisted with integration and verification. |
main gained 345 commits since 753e8b1, most of them bmjask's stack (xcl-dev#2959), plus xcl-dev#2872, xcl-dev#3085 and xcl-dev#3086 from this branch. Conflicts, per PR: - xcl-dev#2404 + xcl-dev#2633 (split chained ExecuteIndirect): main's xcl-dev#2959 took both over (ed98461, a05fbc4, 8626d5b: IndirectBuild/IndirectChain on a CBV root, one-command slicer, separate cache namespace). Main's side kept in dispatch_chain.rs, pso.rs (slicer, command signature, chain root), bind.rs (ExecuteIndirect path), device_x.rs (signature traits), pso_async.rs (no background whole build, so no build_waited_on), real.rs (ComputeBuild, driver_cache names) and shaders.rs (blob names). Dropped with them: slab_count, record_slicer, abi_signature_id names, the direct root-CBV constant blocks, list_x::predicated, the split.rs/runner.rs ExecuteIndirect test and the list_x chain-scratch test. Not in main: xcl-dev#2404 ran the pieces before any whole form was built; main runs the whole form (built on the title's thread) until the indirect set is ready. - xcl-dev#2707 (allocator reclaim): main has it (31930d8, 057f463, 8e7b566). alloc_pool.rs is main's, with xcl-dev#867's changes on top; bind.rs takes main's native_backing; xcl-dev#2707's tests and bind::push_uma_for_test go. - xcl-dev#867 + xcl-dev#2477 (Wine vtables and fences), adapted to main's new code: real.rs keeps the in-place patching, UnadoptGuard and FenceProxy beside main's native_queue_* helpers; guards in cl_reset, bind_pipeline_exact, clear_pipeline_exact, reset_pc_allocator, the title ExecuteCommandLists closure and native_queue_execute; Signal/Wait unwrap the title's fence (also in native_queue_signal/wait); list_x guards in reset_reserved_segment and KickoffX's submit closures; create_raw_fence for main's new internal fences in alloc_pool.rs (SubmissionGate), title_textures.rs, present.rs, vram.rs, sparse.rs, cpu_writes.rs; tests as xcl-dev#2477 had them; runner.rs is main's plus submit_list. - xcl-dev#1803 (heap addresses): kept, carried into main's PreparedSplit and PreparedAbiState (prepared_abi_io takes the heaps). - xcl-dev#1368 (NodeMask 0): kept in compute_container, before main's per-node blob names, so names and pipeline use node 0. - xcl-dev#1860, xcl-dev#2082 (cfg.rs, module/opt.rs): cfg.rs is 1567f72's version (xcl-dev#1860 on main's Succs); opt.rs is that plus xcl-dev#2082's arm and test. - xcl-dev#2229 (rodata): kept through main's kernel.rs entry points; translate_entry_rodata loses wave32_only as main dropped per-GPU tables (3cde0cc); pso.rs and coverage.rs call it with main's options (no_remap, split for graphics); recomp Options keeps rodata and no_remap. - xcl-dev#1975: kept in emit.rs and lower_valu.rs; its mesh barrier guard and its test dropped, main's wider guard (2ca9127) covers it; the now-unused lower::has_non_uniform_barrier goes. - xcl-dev#2070 (64 MB stacks): pso_async::WORKER_STACK on main's worker, helper and preload threads; shaders.rs's piece threads on worker_thread. - xcl-dev#2551 (whole forms prebuilt): split_whole_roots(false) is DirectChain, so the precompile builds every split program's whole form; main built it only for programs an earlier run used through ExecuteIndirect. - xcl-dev#688 (dxc.rs imports), xcl-dev#2762 (host.rs log line), xcl-dev#3090 (list_x tests), arch/window-title-commit (present.rs with_commit on main's compiling_text), README.md: both sides. - list_x.rs: main dropped title_textures::list_reset; main's side. - sparse.rs, vram.rs: main's quarantine_tiles_for and per-device retire state, with create_raw_fence. - xcl-dev#3090, xcl-dev#3092 tests: runner::device and Uma::block_len added from nvidia-dev (5 and 12 lines) so the lib tests compile. - xcl-dev#751: its commit is already in main (b84e037, via xcl-dev#2844); it leaves the README table with xcl-dev#2404, xcl-dev#2633, xcl-dev#2707, xcl-dev#2872, xcl-dev#3085 and xcl-dev#3086. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
merge-check |
|
merge-check claim |
|
merge-check |
|
main already prepares the whole form of a split compute program during precompile. Commits e938907 and 4cbefd1 (merged with #2959) build it in AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
xcl shaders --precompile --pipelinesnow also builds a split compute program's whole form under the dispatch-chain root signature (.chain.pso), next to its pieces. Part of #1833, follows #2338.A split program keeps its whole form for what its pieces cannot run (an
ExecuteIndirect, a dispatch without scratch). The runtime builds it inChain::wholewithchained = true, on the title's thread, the first time it is needed. #2338 prebuilds only the pieces, so every whole form was still compiled cold there.On a retail title (RX 9060 XT,
XCL_DIRECT_DXIL=1, all compute pipelines precompiled except the whole forms), the title's submit thread built 3–6 of them at its world start, 0.8–1.15 MB of DXIL each, 41–55 s each, and presented nothing meanwhile. With the whole forms precompiled, those binds loaded the blob in 3–4 ms and no compute pipeline was built cold after the world start. #2404 avoids the whole form for anExecuteIndirecton the GPU side; this covers the whole form wherever the runtime still builds it, and works with or without #2404.What is in it
crates/xcl/src/shaders.rs: after the pieces,make_with_cache_pathbuildsc.dxilwithchained = true(the cap and the cached-blob reuse apply as for a piece). The unit test now expects the whole form's.chain.psotoo, checks that the runtime's chain root signature accepts it, and reuses all three blobs on the second pass.crates/xcl/tests/gpu_compute_e2e.rs:offline_split_compute_pipeline_is_reused_by_a_second_processcounts the whole form's blob with the pieces' (5 pieces + 1 whole form).Tested
cargo test --workspace --no-fail-fast -- --test-threads=4at3567b2e: 1421 passed, 2 failed, 46 ignored. The two failures,gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1(seed 722) and_3(seed 1599), fail the same way onmaine1d84b7on this card; they are not touched here.d3d12SDKLayers.dll(3),f16_programs_on_the_gpuandf32_programs_on_the_gpuper-lane forms (6), no heap windows (1).main06c9f55+ an equivalent commit, plus local diagnostics and a local switch that leaves compute programs of 1.2 MB of DXIL or more unbuilt), not on this branch.Regression run
The 60 s smoke run ends before the world start, so it does not reach the whole forms; the numbers above the blocks come from the longer runs.
Not tested
AI use
🤖 Generated with Claude Code