D3D12.X: an ExecuteIndirect of a split program runs its pieces #2404
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!2404
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2404"
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:53 UTC · original
Kalmarv:chain-indirect→main· +1127 −15 · 9 files · 14 commits · openPart of #2088.
On NVIDIA with
XCL_DIRECT_DXIL=1, a retail title's world load stalls on whole-program compiles. Each per-material ray-tracing resolve program is split into 9–14 pieces, and those build fast. The title then dispatches the program throughExecuteIndirect, andbind.rsfalls back to the program's whole form (690–950 KB of DXIL), compiled synchronously on the title's thread. In a 600 s run onmain0829441(RTX 5070 Ti), 11 of these compiles took 16–40 s each, one after another, from 326 s to past the end of the run.This makes such an
ExecuteIndirectrun the program's pieces. The title's group counts are written on the GPU, so the CPU cannot cut them into slabs when recording. A one-thread compute pass (the slicer) reads the title's arguments and count on the GPU. For a fixed number of rounds it writes, for each slab ofdispatch_slabs, one command per piece: the root constantsrecord_dispatch_chainsets, then the slab's group counts. Each piece then runs oneExecuteIndirectper round with a command signature on the chain's root signature, with UAV barriers between them, in the bounded scratch split dispatches already use. Unused rounds dispatch nothing.All of the title's
ExecuteIndirects of split programs (150 in a 360 s run) used one command signature: one Dispatch, stride 12,MaxCommandCount1, no count buffer. Their group counts were 0 when recorded during load.What is in it
Rebased onto
mainb49be18. The hashes in this list are the rebased commits. Under Tested,77cfec2,d76f773and809da30are the same commits before the rebase (now9125edb,f0cef78and3ca9071).D3D12.X: an ExecuteIndirect of a split program runs its pieces(4aadaab):gpu/recomp/pso.rs: the slicer (HLSL compiled once per device), the chain's command signature, a one-Dispatch command signature for the whole form,record_slicer,record_dispatch_chain_indirectandslab_count, with a test thatslab_countmatchesdispatch_slabs.hle/d3d12x/real/dispatch_chain.rs:execute_indirect. The number of rounds comes from the arguments the CPU sees when recording and the most slabs an earlierExecuteIndirectof the program needed, plus a quarter (2 toXCL_SPLIT_INDIRECT_ROUNDS).ExecuteIndirect. Otherwise it leaves those arguments empty, so exactly one of the two has groups. The whole form'sExecuteIndirectis recorded first, and the rounds follow after a UAV barrier. Nothing is predicated: on NVIDIA Ampere cards, the predicated form of this ran the first piece in some skipped rounds and never ran the whole form. On an RTX 3080 Ti the whole form ran right after the slicer alone, but not after the pieces'ExecuteIndirects (review of this PR).ExecuteIndirects of the program get more rounds.compute splitline counts chained, whole and lostExecuteIndirects.hle/d3d12x/bind.rs,device_x.rs: the call site, and which command signatures are a single Dispatch.Tests: a split program's ExecuteIndirect matches the whole program(dbc793d):runner::dispatch_split_indirectrecords it the way the runtime does.dispatch_chain_divergent_forward_edges_3dcompares the memory with the whole program's output and checks the slicer's slab count for:With more slabs than rounds, it checks the slicer's flag and that the output matches with a whole form. That output would not match if the rounds also ran, because the whole form would then read words the pieces had already changed. Without a whole form, it checks that only the rounds' groups run.
D3D12.X: a chained ExecuteIndirect drops slabs only past 32 before its whole form(9125edb), indispatch_chain.rs, after review:ExecuteIndirectof a program with none read back yet gets the most rounds: the arguments the CPU sees when recording read 0 while a title loads.XCL_SPLIT_INDIRECT_ROUNDSdefaults to 32, not 16.ExecuteIndirect. It is built on anxcl-psothread, so a huge one waits for the huge-build gate. It is bound only on an overflow.ExecuteIndirect's rounds and for the gate.In ten title runs of the earlier head
5ca9c23, six lost slabs: 158 over 73,714 chainedExecuteIndirects. All of them came from one program with 17 slabs per run: 15 at its firstExecuteIndirect(2 rounds), then 1 at each later one (16 rounds) until its whole form was built. With this commit none of them would have been lost. More than 32 slabs before the whole form is built are still lost, counted and warned about. Waiting for the whole form when recording would make it exact, but the precompile does not build the whole forms of split programs, so that is a cold 16–40 s compile on the title's thread. A follow-up records which programs a title runs as chainedExecuteIndirects, so that the precompile builds their whole forms; the runtime can then wait.D3D12.X: a chained ExecuteIndirect under the title's predication is not read back(f0cef78), indispatch_chain.rs,bind.rsandlist_x.rs, after review. Under the title's predication the slicer may be skipped, and its zeroed words were then taken as a count: the program counted as measured with 0 slabs, so its nextExecuteIndirectwhose arguments read 0 got 2 rounds instead of 32. Such anExecuteIndirectis no longer read back. Tests: the device test also records one predicated and one plainExecuteIndirect, and thelist_xpredication test checks the state the call reads. Reported by @thehollowedone.Tests: the predicated ExecuteIndirect test binds the chain's root signature(70f687a): the device test off0cef78bound no root signature for the twoExecuteIndirects it records, which gave 258 messages under the debug layer with GPU-based validation (953, 744, 712). It still passed.D3D12.X: once a split program's whole form is built, its last ExecuteIndirect sizes the rounds(3ca9071), indispatch_chain.rs, with a unit test. Each round of a chainedExecuteIndirectis one barrier and oneExecuteIndirectper piece, also when empty, and on the RTX 5070 Ti such a step takes 14.4 µs of GPU time (144 µs a round for 10 pieces; measured with timestamps, review of this PR). The rounds followed the most slabs anyExecuteIndirectof the program had. Once the whole form is built, an overflow runs it, so the rounds now follow the last one read back. The cost per step comes from the barrier before anExecuteIndirectwhose signature sets root constants (0.41 µs with a Dispatch-only signature). A follow-up PR removes the root constants from the pieces'ExecuteIndirects.Tests: the chained ExecuteIndirect device test binds descriptor heaps(0755bd7): under GPU-based validation the device test gave 4 errors (1419) at809da30. Itsbindset the chain's root signature, which indexes the descriptor heaps directly, on a list without heaps. It now sets two shader-visible heaps first, as a title's list has them.D3D12.X: a chained ExecuteIndirect takes on a list the pool does not track(50205bc), inalloc_pool.rsanddispatch_chain.rs, with a unit test.ExecuteIndirectran the whole form. XCL makes such lists itself: a mid-list split's next list is created on the PC allocator the title's allocator stands for, and the pool is not told.ExecuteIndirects. #2333 keeps such a recording with the title's allocator, which the pool knows nothing of. So the pool can take that allocator for free, and the recording (scratch and commands buffer) is then released while the list still records or runs on the GPU, i.e. memory freed under the GPU. So this PR will not take #2333'sresolve_allocatorforExecuteIndirect;dispatchstays #2333's.ExecuteIndirects that declined in a run did so for this reason.D3D12.X: a list made or released at an address drops the chain scratch(073f8ea), indispatch_chain.rsandlist_x.rs, with a unit test. The chains of one recording share one scratch, found by the list's address. Addresses are reused (#2588): a list created where a released one was could share the old list's scratch with work the GPU may still be running.list_xnow forgets the entry when a list is created and when it is released.D3D12.X: a PC allocator put aside lets go of its chain recordings once free(551a75e), inalloc_pool.rs, with three unit tests.reclaim_idle_inresets idle put-aside allocators, except a title's own allocator once put aside, and in their run that case held 2,258 of 11,061 recordings at 170 s. Their candidate, Royalflamejlh/xcl@f4608d7, differs from this commit:Reset) a put-aside allocator, which frees its command memory as well, but only at a Reset of the same title allocator, and only one that was submitted and is done. This commit releases only the chain recordings (scratch and commands buffer), at any title Reset. The allocator itself is still reset when it is reused (or by #2138).50205bc, that covers the lists the pool had not seen, which f4608d7 (on #2333's filing) does not, so the release cannot free a recording under a live list.D3D12.X: a title thread does not wait behind a background whole build's turn(97a70a7), inpso_async.rsanddispatch_chain.rs, with a unit test, after review (@pvfreis, review).want_wholebuilds the whole form on anxcl-pso*thread, so a huge one waits inbig_compile_turnfor a background slot and 3 GB of free commit, holdingChain::build_whole, and nothing told it a title thread waited. A title thread that needed the same form (bind.rs, ordispatchwithout scratch) waited behind that turn, without the wanted cap or the commit skip. Now such a thread counts itself inChain::waitingwhile it waits, and the background build runs inpso_async::build_waited_on, sobuild_is_wantedis true on its thread while one does: the build goes as one the title waits for.D3D12.X: the split-program counter line says what holds chain recordings(99ca688), inalloc_pool.rsanddispatch_chain.rs, with a unit test. Logging only. Every 10 s, with thecompute splitline, a second line splits the recordings held by the PC allocator they are under:compute split: N of M recordings held, under K PC allocators: put aside with a list on it …, put aside with submits on the GPU …, put aside and free …; in use and busy …, in use and free …; not the pool's …(M: all recordings made). In @pvfreis's and @Royalflamejlh's runs of97a70a7the recordings held kept rising (583 of 771 at 190 s, review; 7,410 under 115 allocators at 270 s, only 2,297 of them under ones put aside, review). This line says what holds them; the runs here do not reach that part of the title.D3D12.X: whole forms of split programs are built in turn, not a thread each(c9904d7), indispatch_chain.rs, with a unit test, after review (@Royalflamejlh).want_wholestarted an OS thread for each whole form, and each waited for its turn inbig_compile_turn: at 280 s, 199 of 200 such threads were waiting. The whole forms now queue in three lanes, one for each slot set ofdriver_compile(under 256 KiB, huge, giant). A lane has at most one thread, which builds its forms one after another and ends when its queue is empty. A form whose program was released before its turn is not built. A title thread that needs a whole form still builds it itself.D3D12.X: a chained ExecuteIndirect keeps the most rounds until the whole form is built(5b9d4ff), indispatch_chain.rs, with its unit test changed, after review (@Royalflamejlh).9125edb's 32 rounds held only until a program's first read-back. After it, the most slabs read back set the rounds, so a program whose earlierExecuteIndirects had 1 slab got 2 rounds, and its next one, of 22 slabs, lost 20 (2 of 3 runs in that review). Until the whole form is built, a chainedExecuteIndirectnow recordsXCL_SPLIT_INDIRECT_ROUNDS(32) rounds whatever was read back. Once it is built, the last one read back sizes them, as with3ca9071. The cost is the empty rounds until the whole form is built (14.4 µs per piece step on the RTX 5070 Ti, as under3ca9071; #2633 makes that step 0.41 µs).1142 changed lines (1127 added), over the ~400 target: 121 are the GPU test and its runner, about 390 are unit tests, and 52 are the slicer's HLSL. The runtime part cannot be split further without leaving a commit whose
ExecuteIndirectpath runs nothing or is not called. The last seven commits fix how this PR's own recordings are kept, how its own background builds of the whole form wait and are run, and how many rounds it records before one is built, or count what holds its recordings, so they go with it.Tested
5b9d4ff(this head), on the GPU (debug):cargo test --workspace --no-fail-fast -- --test-threads=4: 1447 passed, 0 failed, 47 ignored (the two new tests among them). 25 SKIPPED notices, as on551a75ebelow.dispatch_chainandalloc_poolunit tests,--test-threads=1: 21 passed.dispatch_chain,split,execute_indirectandslabfilters with the debug layer and GPU-based validation,--nocapture, on the local build described below,--test-threads=1: 50 passed, 0 failed, 1 ignored. 1 SKIPPED:dispatch_chain_native_wave64_builds_whole(no wave64). During the tests: 1 error, 884, frommain'ssplit_compute_program_prebuilds_and_caches_chain_pieces(a deliberately invalid blob); 275 warnings, 195 of 1328 and 80 of 926, as on551a75e.--test-threads=1):the_recordings_held_are_split_by_what_holds_their_allocator,whole_forms_wanted_together_are_built_one_after_another_on_one_threadandonce_the_whole_form_is_built_the_last_execute_indirect_sizes_the_rounds: 1 passed each. WithInTurn::pushstarting a thread for each item, aswant_wholedid: failed, 5 threads for 5 whole forms. With97a70a7's rounds: failed, 2 rounds, not 32, after a read-back of 1 slab.97a70a7, on the GPU (debug):cargo test --workspace --no-fail-fast -- --test-threads=4: 1445 passed, 0 failed, 47 ignored (the new test among them). 25 SKIPPED notices, as on551a75ebelow.a_title_thread_does_not_wait_behind_a_background_whole_build_waiting_for_its_turn, three runs: 1 passed each. With the count left out (Chain::waitingnot raised, as on551a75e): failed, "the title thread waited for the background build's turn" (still waiting after 5 s).dispatch_chainunit tests,--test-threads=1: 7 passed. Thedispatch_chain,split,execute_indirectandslabfilters,--test-threads=1: 48 passed, 0 failed, 1 ignored, 1 SKIPPED (dispatch_chain_native_wave64_builds_whole, no wave64).pso_asyncandbig_compile: 25 passed.551a75e(rebased ontomainb49be18), on the GPU (debug):cargo test --workspace --no-fail-fast -- --test-threads=4: 1444 passed, 0 failed, 47 ignored. 25 SKIPPED notices: 21 for no native wave64 on this card, three per-lane FP16 forms the per-lane lowering refuses, and no heap windows.a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier, which failed on68a284aandd76f773, passes on this base.dispatch_chainunit tests,--test-threads=1: 6 passed, 0 failed.dispatch_chain,split,execute_indirectandslabfilters,--test-threads=1: 47 passed, 0 failed, 1 ignored. 1 SKIPPED:dispatch_chain_native_wave64_builds_whole(no wave64).list_x: 41 passed.alloc_pool: 8 passed (the four new tests among them).--nocapture, on the local build described below: 47 passed, 0 failed, 1 ignored. During the tests: 1 error, 884, frommain'ssplit_compute_program_prebuilds_and_caches_chain_pieces, which feeds the driver a deliberately invalid blob; and 275 warnings, 1328 and 926 as below. The device test's 4 errors (1419) at809da30are gone.cargo check -p xcl --lib --testsbuilds each of50205bc,073f8eaand551a75e. The first of551a75e's tests failed with the release taken out ("a free allocator put aside still held its chain recordings"; run on an earlier version of the same commit, with the same test and release), and passes with it.551a75e, on an RTX 2060 (NVIDIA 595.91) under Wine (wine-staging 11.21) + vkd3d-proton30b0eb9, a releasewindows-gnutest build,--test-threads=1, noXCL_D3D12_DEBUGor GPU-based validation set; correctness only: thedispatch_chainunit tests 6 passed; thedispatch_chain,split,execute_indirectandslabfilters 47 passed, 0 failed, 1 ignored, SKIPPEDdispatch_chain_native_wave64_builds_whole(no wave64);list_x41 passed;alloc_pool8 passed.97a70a7: @LocranKing, RTX 3060 Ti 8 GB (NVIDIA 621.40), Ryzen 5 5500, Windows 11 build 26300, rustc 1.100.0, debug (review).cargo test --workspace --no-fail-fast -- --test-threads=4: 1445 passed, 0 failed, 47 ignored, 27 SKIPPED: 21 no wave64, 3 per-lane FP16/FP32 forms, no heap windows, and two0x887A002D(texture_states'suploads_start_from_each_subresources_state, no D3D12 debug layer;shaders'spso_measurement_compiles_an_exact_synthetic_record, no Developer Mode). Those two aremain's tests of files this PR does not change. A 60 s smoke on their own title, from release builds:mainb49be181409 frames, peak commit 14,032 MB;97a70a71567 frames, 14,026 MB; no device removal or crash. It covers boot, intro and menus, not the world.97a70a7: @pvfreis, RTX 3060 12 GB, 31.9 GB RAM, one release run each of97a70a7andmainb49be18from an empty cache, both with one local logging line (review). With this PR: 177 chainedExecuteIndirects, 0 whole, 0 slabs lost, no whole forms compiled, presenting again after a stall of about 33 s; recordings held rose from 54 at 140 s to 583 of 771 at 190 s, and their 37 GiB guard stopped the run at 192 s, with commit +322 MB/s and non-local video memory +214 MB/s over 170–190 s. Onmain, title threads compiled whole forms from 126.5 s to the 210 s limit and presenting stopped at 112 s. What holds the recordings is open;99ca688's line is for that.97a70a7: @Royalflamejlh, Linux + NVIDIA, 300 s runs from the same caches (review). With this PR: presenting after the title's burst in 3 of 3 runs, 15,299–35,755 chainedExecuteIndirects, 0 whole; 20 slabs lost in 2 runs (5b9d4ffabove); non-local video memory 4.1 → 12.3–13.9 GB, their memory guard stopped 2 of 3. Without it: no presents after 76 s in 2 of 2, a title thread compiling a whole form in all four dumps.97a70a7+ #2551: @KDenKC, RTX 5090 32 GB (NVIDIA 621.24), Windows 11, release (review): 0 slabs lost and 0 whole in 4 runs; the pool's PC allocators made kept growing with the resets (to 549 by 183 s, 710 by 440 s). Their runs ended in #2403's removals and one device hang they are still looking into.5b9d4ff: @thehollowedone, RTX 3080 Ti (NVIDIA 621.35), Ryzen 7 9800X3D, Windows 11 build 26300, rustc 1.99.1 (review).cargo test --workspace --no-fail-fast -- --test-threads=4: 1447 passed, 0 failed, 47 ignored, 25 SKIPPED.dispatch_chain_divergent_forward_edges_3d,--test-threads=1: 1 passed, no SKIPPED notice, the 32- and 64-thread cases on the card. Synthetic tests only, no title run.97a70a7(this PR's previous head): @jennydeth, RTX 3060 12 GB (NVIDIA 32.0.16.2101), Ryzen 5 5600X, Windows 11, rustc 1.100.0, release (review).cargo test --workspace --release --no-fail-fast -- --test-threads=4: 1445 passed, 0 failed, 47 ignored, 29 SKIPPED (21 no wave64, 3 per-lane FP16/FP32 forms, 3 no D3D12 debug layer, no heap windows, andpso_measurement_compiles_an_exact_synthetic_record). A 600 s smoke pair with default settings:mainb49be182171 frames, peak commit 35,030 MB;97a70a72211 frames, 36,162 MB; no device removal or crash. No program is split with default settings, so this pair does not reach this PR's code. WithXCL_DIRECT_DXIL=1(900 s, warm driver cache), one run of97a70a7logged 397 chainedExecuteIndirects, 0 whole, 0 slabs lost. Every direct run ended in a0x887a0005removal (DRED: page fault at VA 0x0) between 99 and 115 s,main's run too, as in #2403, so the removal is not from this PR.5b9d4ff: @jennydeth, RTX 3060 12 GB (NVIDIA 32.0.16.2101),XCL_DIRECT_DXIL=1, 900 s, warm caches, one run at the default shader heap and one with #2590's 1 GiB profile (review). Both: 2,474 pieces built, 0 whole, 0 slabs lost; 3,020 and 4,582 chainedExecuteIndirects by 160 s. Both lost the device (0x887a0005, DRED: page fault at VA 0x0), at 166.0 s and 163.6 s. At the default heap that is the removalmainb49be18has with these switches (114.8–216.0 s in their three runs). With the 1 GiB profile, two runs ofb49be18kept the device and this one run lost it; why is open.5b9d4ff+ #2707 (dff6edc7, #2707's side of thealloc_pool.rsconflict) + #2551: @KDenKC, RTX 5090, one run to #2403's removal at 161.4 s (review). At 160 s, against5b9d4ffalone: 32 PC allocators (47), 848 recordings under busy allocators in use (1,719), 530 put aside with a list on it (559). So #2707 lowers the allocators but not those held by lists: a list stays on its allocator until the title resets it elsewhere or releases it.mainb49be18+ #2301 with this PR's5b9d4ffmerged on top: @Natakout, RTX 3060 12 GB (NVIDIA 621.14), i9-13900K, Windows 11 build 26200, release,XCL_DIRECT_DXIL=1, 480 s runs from warm caches (review). Without this PR, presents stopped 3 to 31 s after the title's#101in 5 of 5 runs; a symbolized dump showed one title thread compiling a whole form inChain::wholeand another waiting onbuild_whole. With it, no stall there in 2 of 2, and both lost the device 2 and 11 s after#101(#2403's code heap). With #2590's 1 GiB profile, 5 runs: the world rendered at about one present every 2 s for 70 to 240 s, then the GPU hung (0x887a0006) in all 5. WithTdrDelay/TdrDdiDelayat 60 s, no removal in 4 runs of 480 s, with world frames of about 0.5–2 s of GPU each (report); so these read as timeouts of long frames, not shown to come from the split. They list this PR among the five things their 3060 needs to get past#101. With splitting off (XCL_DIRECT_SPLIT_INSTRUCTIONS=0) their world ran about 4× faster.5b9d4ff: @ClosetPie107, RX 9070 16 GB (RADV, Mesa 26.3.1), Ryzen 5 9600X, Linux, Proton Experimental with a patched vkd3d-proton (ec207194), releasewindows-gnu(review).dispatch_chain: 16 passed;module::split: 8 passed; 0 failed, 0 SKIPPED. A 300 s run of the retail title withXCL_DIRECT_DXIL=1: exit 0, 1,800 presents, no crash or device removal; at 290 s 221 programs split, 2,355 pieces built, 24,395 chainedExecuteIndirects, 0 whole, 0 slabs lost, scratch 1,648 MiB (most 1,655). Not the full suite, Windows or NVIDIA.77cfec2with #2333 (RTX 4060 Ti 16 GB, Linux, Wine + vkd3d-proton, 1 run each; review). Recordings held went from 11,061 under 156 allocators at 170 s to 3,316–5,563 under 59–82 allocators between 120 and 200 s, and non-local video memory from 8.7 GB at 169 s to 7.1 GB at 166 s. Their memory guard still stopped that run at 204.5 s for low system RAM.77cfec2,d76f773and809da30, without the GPU:cargo build --release -p xcl: builds on each. Its 2 warnings are deprecations in files this PR does not change (real.rs:3797,xgameruntime/mod.rs:547).cargo clippy -p xcl --lib --tests: no warning on a line this PR changes, on each. It stops at 3approx_constanterrors (6.283_185_3forTAU) inlower_valu.rs,lower_wide.rsandrecomp/lower.rs, which this PR does not touch.cargo test -p xcl --libon the unit tests of the chain that need no GPU: 4 passed, 0 failed on each (slab_countagainstdispatch_slabs, the bounded scratch, the firstExecuteIndirect's rounds, the gate). Ond76f773and809da30alsoset_predication_buffer_state_transitions_and_lifecycle, and on809da30once_the_whole_form_is_built_the_last_execute_indirect_sizes_the_rounds: 1 passed each.cargo fmt: the tree is notrustfmt-clean. The changed lines follow the code around them.d76f773, on the GPU (debug):dispatch_chain_divergent_forward_edges_3d --test-threads=1, three runs: 1 passed, 0 failed each.dispatch_chainunit tests,--test-threads=1: 4 passed, 0 failed (the device test included).dispatch_chain,split,execute_indirectandslabfilters withXCL_D3D12_DEBUG=1,--test-threads=4: 42 passed, 0 failed, 1 ignored. 1 SKIPPED:dispatch_chain_native_wave64_builds_whole(no wave64).cargo test --workspace --no-fail-fast -- --test-threads=4: 1292 passed, 1 failed, 46 ignored. Failed:gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier, as on5ca9c23andmain68a284a(below). 25 SKIPPED notices, as below.--nocapture, on a local build of the test runner that switches GPU-based validation on and prints every layer message (neither is an XCL option): 42 passed, 0 failed, 1 ignored. The messages printed during the tests showed 258 errors (953, 744, 712), all from the device test added ind76f773;54a936afixes that test. Also 266 warnings: 1328 (a buffer's initial state ignored) and 926 (a root view's address in a heap).809da30, on the GPU (debug):dispatch_chain_divergent_forward_edges_3d --test-threads=1, three runs: 1 passed, 0 failed each.dispatch_chainunit tests,--test-threads=1: 5 passed, 0 failed.dispatch_chain,split,execute_indirectandslabfilters withXCL_D3D12_DEBUG=1,--test-threads=4: 43 passed, 0 failed, 1 ignored. 1 SKIPPED:dispatch_chain_native_wave64_builds_whole(no wave64).--nocapture, on the same local build (GPU-based validation and the messages are switched on there, not by an XCL option): 43 passed, 0 failed, 1 ignored. During the tests: 273 warnings, 1328 and 926 as above, and 4 errors, all 1419 and all from the device test: itsbindsets the chain's root signature on a list without descriptor heaps (a title's list has them). No other test gave an error.5ca9c23(onmain68a284a):cargo test --workspace --no-fail-fast -- --test-threads=4(debug): 1289 passed, 1 failed, 46 ignored. Failed:gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier, which fails onmain68a284atoo, with the same assertion and output (lower_dxil.rs:1155); main's CI fails since #2074. 25 SKIPPED notices: no native wave64 on this card, three per-lane FP16 forms the per-lane lowering refuses, and no heap windows. An earlier version of this description gave the filters withXCL_D3D12_DEBUG=1as a debug-layer pass. The runner registers no message callback, so such a run shows no layer messages; it showed nothing.5ca9c23. In them noExecuteIndirectneeded more slabs than its rounds.XCL_DIRECT_DXIL=all: this branch, against a 300 s run ofmain68a284awith the same environment.mainrun (300 s) did not get that far: from 168 s to its end, a title thread was in the call for an unsplit 1.39 MB compute build.235 programs split, 2007 pieces built, 439 chained dispatches issued in 3326 slabs; scratch 654 MiB (most 654, largest dispatch 2109 in one slab); ExecuteIndirect: 1303 chained (0 of them whole, 0 slabs lost), 28 whole.ExecuteIndirects (from 499 s on) took one of the paths that keep the whole form; which one is not logged.main68a284awith this PR and #2097: past the loading screen into the intro cutscene, the first such run here on NVIDIA. The device was removed at 154 s (0x887a0005, local video memory full); the cause is open (#505 comment).GetCachedBlob).Regression run
scripts/smoke.ps1 -Seconds 60, the same retail title,XCL_DIRECT_DXIL=1, a private XCL cache started from the sameused-pipelines.txt. Both ran back to back in one queue job on the machine under Tested, from release builds of clean trees. That job ran in the queue's title lane, beside 2 other jobs (builds, suites or precompiles; no other title run or timing job runs at the same time there).mainb49be18(this PR's base):this PR,
5b9d4ff:compute splitcounter at the end of each run:main:compute split: 171 programs split, 1811 pieces built, 0 chained dispatches issued in 0 slabs; scratch 0 MiB (most 0, largest dispatch 0 in one slab)compute split: 171 programs split, 1811 pieces built, 0 chained dispatches issued in 0 slabs; scratch 0 MiB (most 0, largest dispatch 0 in one slab); ExecuteIndirect: 0 chained (0 of them whole, 0 slabs lost), 0 wholeNeither side of this 60 s pair reaches a chained
ExecuteIndirect.551a75ealone, 120 s, same setup, in an earlier title-lane job beside other jobs (nomainside: our harness failed it), reaches 6: 1324 frames, peak commit 30,050 MB, 0 device removals, 0 crashes, and the countercompute split: 92 programs split, 935 pieces built, 51 chained dispatches issued in 51 slabs; scratch 390 MiB (most 390, largest dispatch 9 in one slab); ExecuteIndirect: 6 chained (0 of them whole, 0 slabs lost), 0 whole.Its scratch is 390 MiB because a chained
ExecuteIndirecttakes the whole scratch budget (XCL_SPLIT_SCRATCH_MB, 256 MiB) for its list: its group counts are not known when it is recorded.Not tested
97a70a7changes in a title: the wait it removes was found by reading the code, and the runs here reach no title thread waiting for a whole form.97a70a7(above), and whether551a75estopped the growth @dhillonjagdeep650-boop saw (review). Two 240 s runs of97a70a7here, one from an empty cache and one from our seeded cache, both with @pvfreis's switches, issued 0 chained dispatches and held 0 recordings, so this card does not show it.99ca688's line is for a run that does; I asked for one each.5b9d4ff's empty rounds before a whole form is built, in a title.Dispatchon a list the pool does not track still runs whole; that is #2333's.XCL_PSO_WAIT_MS), the path of #2617. This PR does not change whether a call is put off, or skipped there. It changes what a put-offExecuteIndirectof a split program records at the submit (its chain, on the segment). The Reset of a list's own allocator there (record_deferred,reset_own_alloc) now also releases the recordings of free allocators put aside. #2617's hang is onmainwithout this PR (RDNA2); none of our runs of this PR setXCL_PSO_WAIT_MS.77cfec2and at this head5b9d4ffit passed on an RTX 3080 Ti (review, review). At809da30it passed on an RTX 3080 (review) and on two RTX 3070s (review, review). The RTX 3070 Laptop is not confirmed, and we have no Ampere card.ExecuteIndirects took (no scratch left, bundles or another signature).AI use
🤖 Generated with Claude Code
@GreemSC on GitHub · 2026-11-25 18:51 UTC · original
Test report on AMD / Linux (RDNA3, RADV): with #2404 + #2097 no title thread builds a whole form any more, and with
XCL_PSO_WAIT_MS=50on top the title kept presenting to the end of both 180 s runs (+85 / +88 s after the first#101, against +4 / +7 s without the PRs).Setup: RX 7900 XT 20 GB (Mesa 26.2.5 RADV), Linux 7.2, Proton-CachyOS Wine 11, a local vkd3d-proton build; 24 GB RAM, the game capped at 16 GB. Retail 1.0.2.1,
XCL_DIRECT_DXIL=1, A pressed every 4 s from 22 s, 180 s runs, caches as left by earlier runs. Release build ofmain68a284a+ #1732 (2fb4601, has #871 and #877) + #684 (e56dbc3) + #1860 (bcc71b6) + thesparse.rspart of #203 + local logging, then this PR (5ca9c23f) and #2097 (d5c2781d).#101#101bind::execute_indirect → dispatch_chain::whole → driver_pso(whole forms, median 5.3–5.7 s each on RADV); in one run a second inpso_async::resolve_for_bindXCL_PSO_WAIT_MS=50dispatch_chain::wholewhole; one or two inpso_async::resolve_for_bind → build_computeXCL_PSO_WAIT_MS=50XCL_PSO_WAIT_MS=50as well: 13,249 / 17,508 chained, 0 whole, 0 slabs lost.#101the last tree presents 0.5–0.6 frames per second. Peak RAM + swap 15.7 GB, right under our 16 GB cap.SYNC_GRAPHcells: two Wait64 cells (0x42437fe00/fe08) had their value recorded (0x620) but never submitted while the title thread that recorded it was inChain::whole, so the bridgedprod=qNonewaits of the same runs were not the block.Not tested: what is on screen (no screenshots of these runs; longer runs with captures are going now), Windows, NVIDIA, this PR without the other carried PRs, a cold cache.
AI use: Claude Code (Claude Opus 5.5) ran the builds and runs on this machine, read the logs and thread dumps, and wrote this report.
title_memory_budget_mbis 13,824 MB regardless of the adapter's memory #1337@thiagocalile on GitHub · 2026-11-25 19:12 UTC · original
Independent test and smoke report for head
5ca9c23ffd858e487b7611211492afc456fadbadon an AMD Radeon RX 6600 (8 GB VRAM, RDNA2, native wave64).Tested
32.0.21045.29003,XCL_ADAPTER=radeon), AMD Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (10.0.26200.0), Rust1.100.0(stable-x86_64-pc-windows-msvc), DXC1.8.2502.11.XCL_ADAPTER=radeon cargo test --no-fail-fast -p xcl --lib -- split --test-threads=4: 32 passed, 0 failed, 1 ignored (0skipped).Regression run (
scripts/smoke.ps1, release builds,XCL_ADAPTER=radeon)main(2898511):PR
#2404(5ca9c23):Not tested: NVIDIA/Intel GPUs, Linux/Wine, or world load past the 60 s smoke window.
AI use: Antigravity (Gemini 4 Neon) ran the builds, tests, and smoke runs and drafted this report; the account owner reviewed and approved posting.
@emirduran707 on GitHub · 2026-11-25 19:13 UTC · original
Independent AMD RDNA4 (native wave64) test report on exact head
5ca9c23ffd858e487b7611211492afc456fadbad(clean detached checkout, no local changes).Tested
stable-x86_64-pc-windows-msvc), DXC 1.9.2602.17; tests debug, smoke release.cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4: 1287 passed, 3 failed, 46 ignored; 8 SKIPPED (6 inlower_dxil::tests::{f16,f32}_programs_on_the_gpurefused by per-lane form;heap_window_out_of_memory_falls_back_to_the_switch_form;pso_measurement_compiles_an_exact_synthetic_record). All native wave64 GPU tests anddispatch_chaintests ran and passed.main:gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1(seed 722) andfuzz_validate_and_gpu_3(seed 1599) on this GPU, plusgpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier(from50a9fde/ #2074, fixed later onmainin #2420).Regression run (60 s retail-title smoke,
XCL_NETWORK=0, release)(Matched
main68a284abaseline on the same machine today: 1573 frames, 14420 MB peak, 0 device removals, 0 crashes.)Not tested
AI use
@thehollowedone on GitHub · 2026-11-25 19:15 UTC · original
Independent Windows/NVIDIA result on clean 5ca9c23. RTX 3080 Ti (621.35), Ryzen 7 9800X3D, Windows 11 build 26300, Rust 1.99.1 MSVC, DXC/DXIL 1.8.2502.11.
XCL_ADAPTER=RTX 3080 Ti,XCL_D3D12_DEBUG=1,XCL_NETWORK=0; offline Cargo, no sample data.cargo test --offline --locked -p xcl --lib dispatch_chain_divergent_forward_edges_3d --jobs 6 -- --test-threads=1 --nocapturefailed reproducibly on the untouched head: 0 passed, 1 failed, 0 ignored, 0 skipped. The earlier whole, split, slabbed, and non-overflow indirect cases in that fixture pass. At the first overflow fallback (threads=32,most=1,rounds=11), the slicer result matches the expected[partial=1, 0, slabs=12, 0], but the whole-form output does not appear: output word 0 remains17instead of100000. This also reproduces with the D3D12 debug layer enabled. I have not established whether this is a fixture-only problem or affects runtime fallback.Adjacent controls on the same head:
cargo test --offline --locked -p xcl --lib execute_indirect --jobs 6 -- --test-threads=1 --nocapture4 passed, 0 failed, 0 ignored, 0 skipped;cargo test --offline --locked -p xcl --lib slabs_cover_a_dispatch_once_within_their_size --jobs 6 -- --test-threads=1 --nocapture1 passed, 0 failed, 0 ignored, 0 skipped.Not tested: full workspace, retail title, other GPUs. AI-assisted. Codex (GPT-6, exact variant unavailable) ran the checks and drafted this report.
@b3IKK on GitHub · 2026-11-25 19:18 UTC · original
Independent retail check on an RTX 5080 (retail 1.0.2.1, 600 s,
XCL_DIRECT_DXIL=1, default wait): on a clean tree68a284a+ this PR's2b19fec/5ca9c23+ #2097's8524858/d5c2781, the run reportscompute split: 152 programs split, 1,413 pieces built, 159 chained dispatches issued in 1,318 slabs; ... ExecuteIndirect: 51 chained (0 of them whole, 0 slabs lost), 0 ...at 600 s. Without the stack, the same title's direct runs fell back to ~900 KB whole forms built on title threads at 93, 135, 176, 224, 265, 303, 357, 398, 437, 474, 505 and 580 s — exactly the wall this PR describes. So the ExecuteIndirect whole-form fallback is gone here (0 whole, 0 slabs lost).
Caveat on presentation: this first stack run presented to 116 s (14 two-second intervals after 96 s), but it ran on a new base with a cold direct cache (8 cold compiles). A second run is warming it; I will report the number when it finishes. The
0 wholeExecuteIndirect count is the PR working as intended.AI use: OpenCode, Claude Fable 5.2 built the stack, ran the retail title on this machine and wrote this.
@SlopTart on GitHub · 2026-11-25 19:18 UTC · original
Tested: current PR head merged onto current
origin/main(clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo targetx86_64-pc-windows-gnurun under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29).gpu_suite, cold cache: 160 passed / 4 failed. Three are the known baseline trio on this lane; the fourth is the newgpu_promoted_uav_clear_values_pass_create_committed_resourcefailure that current main carries (reported here), not caused by this PR. Everything else is green.Split-program ExecuteIndirect is in the area that produced the
d3d12core.dll + 0x1AB118crashes on #2338/#2344/#2349; no crash reproduces at this head on this lane.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.
@DavidM1911 on GitHub · 2026-11-25 19:28 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: 1038 passed, 1 failed in one parallel run; the failing test passes on a single-threaded rerun (1039/0). Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.Thanks!
@b3IKK on GitHub · 2026-11-25 19:28 UTC · original
Follow-up after a second (warm) run of the same stack: the ExecuteIndirect whole forms are still 0 of them whole, 0 slabs lost (
392 chained), and the split counter grew to294 programs, 2,778 pieces. Presentation did not improve: 92 s, with 31 cold split pieces of 291–372 KB starting every 5–10 s from 6 s to 185 s. So this PR does exactly what it says — the ExecuteIndirect fallback is gone — but on this title the remaining cost is the split pieces themselves, not the whole forms. The next lever is a warm/offline precompile of those pieces (#2338's path), not the ExecuteIndirect path.AI use: OpenCode, Claude Fable 5.2 ran the second stack run on this machine and wrote this.
@ivall on GitHub · 2026-11-25 19:43 UTC · original
Read in full (body, thread, diff). The approach is the one I want for #2088: it removes the whole-form compiles from the title's threads, and the retail reports above agree on that (0 whole). Before it can be merged:
dispatch_chain_divergent_forward_edges_3dfails every time at the first case with more slabs than rounds. The slicer's words are right (partial1, 12 slabs), but output word 0 stays 17, so the whole form's result is missing. It passes here on AMD RDNA4 and on your RTX 5070 Ti, so it looks driver- or card-dependent. Merging it would make that test red on such cards, and in a title the slabs past the rounds would be lost whileread_backcounts them as run whole. Does the predicate reach the pieces and the whole form with the same value there (did the pieces run in that case)? @thehollowedone, could you say how many words differ from the expected output, and whether it also fails with the twoSetPredicationcalls taken out around the whole form?dispatch_chain::execute_indirect,bufferis already referenced by the recorded slicer dispatch and transition whenbind()?or thefirst compute piecelookup returnsErr. It is then released while the list still uses it. It should be kept inRECORDINGS(or an equivalent) before the first call that can fail.dispatch_chain.rs; #2333 goes first (one test fix is pending there). The CI failure is the olda_bridged_mask_write…check, fixed onmainby #2420, so a rebase clears it too.#2372would come after this one, for the cases that still need the whole form.@pvfreis's first point (the
xcl-chain-wholethreads skip the huge-build gate) can be a follow-up; with #2372 the whole form would go through the PSO workers anyway.Tested on AMD RDNA4 (native wave64), Windows, DXC 1.8.2502.11, debug,
main06055a7with #2097 and this PR (5ca9c23) merged locally: whole suite 1413 passed, 2 failed, 46 ignored, 7 SKIPPED; withXCL_DIRECT_DXIL=1,gpu:: hle::d3d12x943 passed, 2 failed, 24 ignored. The two failures arefuzz_validate_and_gpu_1and_3, the same onmainhere.dispatch_chain list_x::tests --test-threads=8: 10 of 10 runs pass.Not tested: a title run with this PR, NVIDIA.
AI use: Claude Code (Claude Opus 5.5) read the thread and the diff, ran the tests and wrote this on the maintainer's behalf.
@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.)
@KDenKC on GitHub · 2026-11-25 20:40 UTC · original
Tested
5ca9c23in the retail title, merged ontomain2898511, RTX 5090 (driver 621.24), on a cache that already had one--precompile --only cs --pipelinesdone. This is the measurement for the #2088 closing bar, with the details there.Tested
XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_NETWORK=0, defaultXCL_PSO_WAIT_MS. Local merge06b3082(+501/−11, no conflicts).ExecuteIndirect: 382 chained (0 of them whole, 0 slabs lost), 0 whole(600 s run) and362 chained (0 …, 0 …), 0 whole(240 s run).ExecuteIndirect of a split program skipped, no lost-slab warning, no device removal, no crash, 0 GPU-wait timeouts.Not tested
scripts/smoke.ps1on this merge.AI use: Claude Code (Claude Opus 5.5) reviewed the diff, built and ran it, read the logs and wrote this.
@thehollowedone on GitHub · 2026-11-25 20:17 UTC · original · edited 2026-11-25 20:42 UTC
For the requested RTX 3080 Ti overflow check on #2404 head
5ca9c23: the unmodifieddispatch_chain_divergent_forward_edges_3dfailed in four single-threaded runs at the first overflow case (split 32, 1 group per slab, 11 rounds). Of 400 compared words, 376, 368, 360, and 328 differed. The 16 guard words stayed intact. The slicer tail assertion passed ([1, 0, 12, 0]). In those runs 8, 16, 24, and 56 output words changed from their initial values to the expected values, all at indices divisible by four; the other output words remained at their initial values. That shows some compute output, but the readback alone cannot establish which dispatch wrote it or whether the pieces and whole form observed the same predicate.I then removed only the two
SetPredicationcalls around the whole-formExecuteIndirectin the test runner (runner.rs, lines 1707 and 1710), leaving the chain call, the whole-formExecuteIndirect, and its command arguments in place. It still failed in three of three runs: all 400 readback words were zero, including the guards. This matches the separate RTX 3070 observation above. The edit was diagnostic only and is not proposed as a fix.Windows 11 build 26300, NVIDIA RTX 3080 Ti / 621.35, Rust 1.99.1;
cargo test --offline --locked -p xcl --lib dispatch_chain_divergent_forward_edges_3d --jobs 6 -- --test-threads=1 --nocapture. Each run: 0 passed, 1 failed, 0 ignored. Synthetic fixture only; no retail run for this check. AI-assisted: Codex (GPT-6, exact variant unavailable) made the local diagnostic edit, ran the tests, and drafted this report.Update after predicate-isolation controls (same head and GPU): The two-call deletion above left the chain's earlier
SetPredicationactive through the finalCopyBufferRegion. Since D3D12 also predicates copies, the all-zero readback cannot establish what the shaders wrote. That experiment still fails, but its output should not be read as zero shader output.SetPredicationwithSetPredication(NULL)(keeping the final clear, the piece chain, and wholeExecuteIndirect) still failed in four runs: 344, 352, 384, and 336 of 400 words differed; the guard words stayed intact. Clearing the predicate before the fallback alone does not make this fixture pass.ExecuteIndirectand readback, but omitting the pieceExecuteIndirectloop only when a whole form is available, made the completedispatch_chain_divergent_forward_edges_3dtest pass (1/1, both 32- and 64-thread fixtures). This is a diagnostic control, not a proposed runtime behavior: it skips work that normal calls need.XCL_D3D12_DEBUG=1. I queried the D3D12 InfoQueue after each synthetic dispatch: it recorded routine buffer initial-state warnings, but no error or corruption messages. This was the standard debug layer, not GPU-based validation.These controls narrow the failing path to the piece indirect-command sequence before the fallback. They do not establish whether the cause is command recording, synchronization, or a driver interaction. All edits stayed in the scratch test worktree; no retail run or PR patch was made.
@b3IKK on GitHub · 2026-11-25 21:24 UTC · original
Combined test on an RTX 5080 (retail 1.0.2.1,
XCL_DIRECT_DXIL=1, default wait, 600 s):68a284a+ #2097 (8524858/d5c2781) + this PR (2b19fec/5ca9c23) + #2519 (the list-keyed scratch for no-allocator/bundle dispatches).68a284a+this-PR runs), so the two changes together remove the whole-form wall.0x887a0005at 98.1 s, whenCreatePlacedResourceXof 1024×512 textures (formats 71/72/98) fails. This is the same device removal you report on the 5070 Ti at 153.7 s, now at 98 s here — not a whole-form stall.So this PR does what it says for ExecuteIndirect, and the next wall is the device removal / GPU fault. Note: the stack's suite has one failure,
gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier, the same test that failed in #2372's CI; it passes on this GPU in other trees, so it looks like a parallel/DXC flake rather than this PR.AI use: OpenCode, Claude Fable 5.2 built the stack, ran the retail title on this machine and wrote this.
@b3IKK on GitHub · 2026-11-25 21:28 UTC · original
Device-removal isolation for the combined stack (
68a284a+ #2097 + this PR + #2519): with the full scratch path the title presents to 98 s, then0x887a0005; theCreatePlacedResourceXfailures come after. With bundles excluded from the scratch (onlyallocator == 0direct lists) it still removes, at 99.752 s, with only 11dispatchchains and 0 ExecuteIndirect chained. So the ExecuteIndirect path is not the trigger here, and neither is the bundle half; the first fault is a GPU suspend after the pieces for allocator-less direct dispatches, consistent with your 5070 Ti DRED page fault at VA 0. I am testing whether the owned path records the pieces under the wrong root signature (params 6/7) and will report; the full analysis is on #505.AI use: OpenCode, Claude Fable 5.2 ran the isolation passes on this machine and wrote this.
@b3IKK on GitHub · 2026-11-25 21:36 UTC · original
DRED on the combined stack with #2519 (
9820c9b, retail 1.0.2.1, RTX 5080,XCL_DIRECT_DXIL=1, default wait): the device is removed at 91.7 s with an empty DRED page-fault output (VA 0x0, no allocations) and no breadcrumb nodes, at the title's own 9,067-dispatch/2 s burst; at the 90 s snapshot ExecuteIndirect was 0 chained, 0 whole, and no driver compile happened in the last 12 s. So this PR's ExecuteIndirect path is not what removes the device — it is the shader-code budget of #2403. Details on #505/#2403.AI use: OpenCode, Claude Fable 5.2 ran the DRED pass and wrote this.
@thehollowedone on GitHub · 2026-11-25 21:39 UTC · original
Follow-up to my earlier RTX 3080 Ti failure report on head
5ca9c23. The stockdispatch_chain_divergent_forward_edges_3dtest still fails here withXCL_D3D12_DEBUG=1. An isolated, test-only experiment passed the same full fixture in 6/6 separate processes on the RTX 3080 Ti: both 32- and 64-thread cases, the fitting cases, and all three overflow fallback cases. No skips. Six overflow InfoQueue checks in the final process reported zero D3D12 ERROR/CORRUPTION messages.The experiment has the GPU slicer append two 32-bit indirect counts: piece count = 1 when all slabs fit, otherwise 0; whole count = the effective title command count on overflow, otherwise 0. Each piece
ExecuteIndirectuses the first count, and the whole fallback uses the second. This replaces XCL's internalSetPredicationin the synthetic runner. It allows production to keep the title's own predication state while selecting the split or whole path using GPU-written counts. The production path is unchanged in this experiment, so this is a verified mechanism, not a verified retail fix. The whole callback would need to receive the generated count buffer while retaining its existingfresh_indirect_argumentshandling.Two other correctness gates remain. When the whole PSO is not ready, an overflow still discards slabs; count gating alone cannot recover them. Also,
record_slicerrecords GPU use beforebind()?, but the command buffer is retained in the allocator'sRECORDINGSonly after binding succeeds. I built a separate local error-path fix that retains the buffer before recording and initializes readback metadata only on success; it passed a focused test, but it lacks a regression that exercises the failing bind path. Neither local experiment was committed or posted as a PR.Still to test on a production change: title predication on and off, counted and empty commands, the native whole callback, another GPU, full workspace tests, and the required paired smoke runs. No game files or retail diagnostics were used here. AI-assisted: Codex (GPT-6, exact variant unavailable); GPT-6.2 Astra reviewed the D3D12 reasoning.
@thehollowedone on GitHub · 2026-11-25 21:51 UTC · original
Independent RTX 3080 Ti follow-up on the new #2404 head
77cfec2: the formerly failingdispatch_chain_divergent_forward_edges_3dfixture passed in 4 separate processes withXCL_D3D12_DEBUG=1, covering its 32/64-thread fit and overflow cases. The newa_chained_execute_indirect_keeps_its_commands_when_binding_failstest also passed. The zero-Dispatch-argument selection appears to resolve the Ampere fixture that I reported on the prior head.I found a separate readback error in the new head. A title predicate can suppress the slicer's
Dispatch, leaving its command-buffer tail unwritten.Recording::read_backstill setschain.measured = trueafter a successful bind. In an isolated GPU regression, I set a suppressing predicate, recorded a production chain, prefilled the tail with a sentinel, submitted and fence-waited. The sentinel remained unchanged, proving the slicer did not write it; the stock code nevertheless treated it as a measurement. With a zero tail, the next CPU-zero call gets 2 rounds instead of the intended cold 32. A nonzero stale tail can report false lost slabs. Passing the already tracked title-predication state intoexecute_indirectand settingchecked = bound.is_ok() && !predicatedmade that same regression pass locally. This is a proposed narrow correction, not a committed change.cargo build --offline --locked --workspacepassed.cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4on this unrebased PR head: 1,292 passed, 1 failed, 46 ignored, 25 GPU skip notices. The sole failure wasa_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier(3 barriers versus 1); it also failed 3/3 isolated runs on this head and passed on clean current maine1d84b7. #2404's merge base is older68a284a, before the merged #2420 test fix. The Windows CI merge check is green; the PR branch still needs the requested rebase. The PR description checks currently fail.The new 32-round cap and early background whole build reduce the cold-loss window, but the code still acknowledges that slabs beyond the cap are dropped before the whole PSO is ready. I did not run a retail title or the required paired smoke checks. AI-assisted: Codex (GPT-6, exact variant unavailable).
@kanade333 on GitHub · 2026-11-25 21:53 UTC · original
RTX 5080,
main6d12f58+5ca9c23: no whole-form stall; this run went further into the world than the reports above and reached the PR's fallback paths: 33 slabs lost, 69 whole-form runs, ~0.5 presents/s, then0x887a0005at 403 s. One run.Tested
5ca9c23ontomain6d12f58, no conflicts.--precompile --only cs --pipelineson6d12f58and three runs of plain6d12f58on the same cache.XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_DRED=1 XCL_NETWORK=0 XCL_ACTIVITY=1, defaultXCL_PSO_WAIT_MS, 420 s.6d12f58, same cache, 3 runs): presents stop at 74 s, 94 s and 96 s. Just before that, the title's threads start whole-form compute builds of 650–950 KB of DXIL, alldriver blob absent. Each takes 16–86 s, about 300–340 s in total per run.ExecuteIndirect: 2576 chained (0 of them whole, 30 slabs lost)at 90 s;… (2 of them whole, 33 slabs lost)at 100 s;67394 chained (69 of them whole, 33 slabs lost)at 400 s.compute splitat 400 s:295 programs split, 2494 pieces built, 126236 chained dispatches issued in 894035 slabs.0x887a0005). DRED: page fault at VA 0x0, no allocations, none recently freed. In the second before the removal there are 4 warnings:ExecuteIndirect of a split program skipped: no buffer for the commands of a chained ExecuteIndirect, the only ones in the run. Peak local video memory 19.9 GB, commit 44.4 GB.Not tested
scripts/smoke.ps1on this merge.AI use: Claude Code (Claude Opus 5.5) built the merge, ran the title, read the logs and wrote this report.
@thehollowedone on GitHub · 2026-11-25 22:11 UTC · original · edited 2026-11-26 09:05 UTC
Current-head RTX 3080 Ti recheck: 5b9d4ff, based on
mainb49be18. Windows 11 build 26300, NVIDIA 621.35, Ryzen 7 9800X3D, Rust 1.99.1 MSVC, DXC/DXIL 1.8.2502.11. Clean exact-head checkout; worktree-local DXIL cache; synthetic tests only.cargo build --offline --locked --workspace: passed.cargo test --offline --locked -p xcl --lib dispatch_chain_divergent_forward_edges_3d -- --nocapture --test-threads=1: 1 passed, 0 failed, 0 ignored, no skip. The fixture ran on the RTX 3080 Ti, covering its 32- and 64-thread cases.cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --quiet: 1,447 passed, 0 failed, 47 ignored across 37 test targets; 25 GPU skip notices. Skips are not counted as GPU coverage.The prior Ampere fixture failure no longer reproduces at this head. I did not run a retail title or paired smoke checks. This test result does not resolve the already documented case where more than 32 slabs can be dropped before the whole PSO is ready.
Earlier RTX 3080 Ti check on d76f773
Independent RTX 3080 Ti check of d76f773, Windows 11 build 26300, NVIDIA 621.35, Ryzen 7 9800X3D, rustc 1.99.1 MSVC, with
XCL_D3D12_DEBUG=1:dispatch_chain_divergent_forward_edges_3d: passed 1/1, no skips (32- and 64-thread fit and overflow cases).a_chained_execute_indirect_keeps_its_commands_when_binding_fails: passed 1/1, no skips.dispatch_chain::execute_indirect, preloads a sentinel in the slicer's output, submits the command list and waits for the GPU fence. The sentinel remains unchanged,chain.measuredstays false, and the next cold call retains 32 rounds. The same test failed on the prior head77cfec2before this guard.This verifies the no-readback guard when
execute_indirectis told the title predicate is active. It does not drive the title-facingSetPredicationBufferXhook end to end; thelist_xtests separately check its predicate state. I did not run the full workspace suite or paired retail smoke ond76f773.AI-assisted: Codex (GPT-6.2 Sol) ran the current-head tests and drafted this update. The earlier d76f773 check used Codex (GPT-6, exact variant unavailable).
@b3IKK on GitHub · 2026-11-25 22:37 UTC · original
Data on the new head from an RTX 5080 (retail 1.0.2.1,
XCL_DIRECT_DXIL=1, release, 400 s), stack77cfec2+ #2519's list-keyed scratch + #2422/#2526 with a 200 MB code budget:5ca9c23the title spent 101.0–101.2 s building 64 whole compute PSOs of 0.84–1.15 MB DXIL on its thread (no buffer for the commands of a chained ExecuteIndirect×4,ExecuteIndirect whole compute PSOmany). On77cfec2those lines are 0, and the whole count at 100 s is 19 instead of 64.0x887a0005). The 19 remaining wholes are not the scratch budget: 388 MiB live against the 384 MB total, and 834 MiB withXCL_SPLIT_SCRATCH_TOTAL_MB=768, give the same 19 and removal at 102.2 s.77cfec2(local commit8391434).XCL_HEAP_WINDOWS=1without a precompiled heap-window cache stalls at 98 s (0 presents for 500 s while translating); kanade333's 402 s run had--precompile --only cs --pipelines.No action requested — this is the new head's behavior on my machine for the record.
AI use: OpenCode, Claude Fable 5.2 ran the stack, read the logs and wrote this.
@treybertram06 on GitHub · 2026-11-25 22:44 UTC · original
@Kalmarv RTX 3080 10 GB (Ampere, driver 621.40), Ryzen 9 5900X, Windows 11 26300, Rust 1.100.0, debug, DXC 1.9.2609.5, at
809da30:cargo test -p xcl --lib dispatch_chain -- --test-threads=1, in 3 separate processes: 13 passed, 0 failed, 0 ignored each time.dispatch_chain_divergent_forward_edges_3dpasses in all three.dispatch_chain_divergent_forward_edges_3dalone withXCL_D3D12_DEBUG=1: 1 passed, 0 failed.SKIPPED:dispatch_chain_native_wave64_builds_whole: no wave64(32-lane waves only).The same test failed on this card at
5ca9c23. These counts are for the lib tests only. I didn't run the title on809da30; the removals in my earlier report fit #2403, as you say.(Claude Code, Claude Opus 5.5.)
@razormontana on GitHub · 2026-11-25 23:23 UTC · original
I reran the ExecuteIndirect overflow fixture on a native Windows RTX 3070. The earlier failure reproduced in all three runs of the old commit. All three runs of the newer commit passed, as did a separate run with the D3D12 debug layer loaded. Earlier RTX 3070 report
Tested
CARGO_BUILD_JOBS=1 CARGO_INCREMENTAL=0 CARGO_PROFILE_DEV_DEBUG=0 cargo test --offline --locked -p xcl --lib --no-run. Ran the resulting libtest executables withXCL_ADAPTER=3070.--exact gpu::dxil::module::split::tests::dispatch_chain_divergent_forward_edges_3d --nocapture --test-threads=1at old head5ca9c23ffd858e487b7611211492afc456fadbadfailed 3/3 at the first wave32 whole-form overflow case. It used 11 rounds for 12 slabs. The slicer-tail assertion passed, all 384 data words stayed at their initial values, and all 16 guard words stayed intact.809da308a6431254a6fc2f88780abebb473acbcdpassed 3/3 with zero skips. The wave32 and split-wave64 fit and overflow readbacks matched the CPU reference, covering 384 and 768 data words respectively and 16 guard words. A fourth run withXCL_D3D12_DEBUG=1passed and loadedD3D12SDKLayers.dll10.0.22621.5262 in the test process.809da30, thedispatch_chain --nocapture --test-threads=1filter reported 13 passes, zero failures, zero ignored, and one explicit native-wave64 skip within the pass count. Neither revision reported device removal or hit a guard limit.Not tested
Retail, performance, native wave64, and the full workspace suite. The debug-layer run did not collect D3D12 InfoQueue messages.
AI use
Yes, Codex GPT-6.2 Sol reviewed the exact source, ran the tests, checked the logs, and prepared this report.
@Royalflamejlh on GitHub · 2026-11-25 23:50 UTC · original
On Linux + NVIDIA,
77cfec2chained 2 splitExecuteIndirects and left 26 to 30 whole in 3 of 3 runs, and the title presented nothing after its burst, as without this PR (2 of 2). As you wrote,execute_indirectreturnsOk(false)whenalloc_poolgives the list no allocator (:351at809da30,:338at77cfec2); in a fourth run with a log line added, all 32 declines were that case. With #2333 merged under it, andexecute_indirectgiven #2333'sresolve_allocatorin that merge, every call chained, and once the cache was warm the title presented from 2 s after its burst (2 runs).Setup: RTX 4060 Ti 16 GB (NVIDIA 615.71.09), Wine 11.21 Staging, vkd3d-proton
v3.1-90-g30b0eb9bwith the relaxed-vtable patch from #175 and a local dxil-spirv patch,VKD3D_CONFIG=ignore_shared_fence.maine0d93c8+ #684, #751, #2082, #1860, #1599, #1798 (local merge), + this PR at77cfec2, then + #2333a7b93a8, which also brings #2368. That merge was by hand:execute_indirecttakes #2333'sresolve_allocator, asdispatchdoes there; a plain merge keeps itsunwrap_or(0).XCL_DIRECT_DXIL=1 XCL_HUGE_PSO_WANTED_CONCURRENCY=6 XCL_DXC_THREADS=4 XCL_PSO_DISK_CACHE=0, 300 s unless the table says otherwise; first-run screens completed once, no story progress. The first three rows each started from a copy of one cache; the #2333 runs share one copy, in the order shown.ExecuteIndirectat the endXCL_PSO_WAIT_MS=50)RECORDINGS(chainedDispatches, chainedExecuteIndirects and #2333's kept whole forms together): 672 at 70 s and 11,061 under 156 allocators at 170 s, while chainedExecuteIndirects went from 563 to 70,341. Non-local video memory went from about 4.5 GB at the burst to 13.0 GB at 157 s and 14.8 GB at 683 s in the two runs our memory guard stopped, and to 8.7 GB at 170 s in the third; how much of that is these buffers we did not measure.XCL_DIRECT_DXIL=1only, 300 s, 1 run) it chained 22, left 9 whole, and presented nothing after its burst.Not tested:
809da30; #2333 without that change toexecute_indirect; #2333 on Windows; #2519.AI use: Claude Code (Claude Opus 5.5) made the runs, merged #2333 under this PR, added the two log lines, read the logs and wrote this.
Posted without review by a person: the account owner was away and reads replies later.
@upipibi on GitHub · 2026-11-25 19:49 UTC · original · edited 2026-11-25 23:55 UTC
Update: this report covers
5ca9c23only. On809da30the same card passes: #2404 (13 passed, 0 failed, 3 processes); razormontana's RTX 3070 also passes there, including a run with the D3D12 debug layer: #2404.@ivall On point 1, a second NVIDIA card: the same failure on an RTX 3070 8 GB (Ampere, driver 616.56; thehollowedone's 3080 Ti is on 621.35), Windows 11, debug, without the D3D12 debug layer.
cargo test -p xcl --lib dispatch_chain -- --test-threads=1at5ca9c23as is, 3 runs: 8 passed and 1 failed each time,dispatch_chain_divergent_forward_edges_3datsplit.rs:1101, "whole form for 1 groups, 11 rounds". That is the first of the overflow cases this PR adds to the test.How many words differ, from the assertion's
left/right(384 output words plus 16 guard words): in runs 1 and 2, 16 output words hold the expected100000+i(indices 32-60 and 224-252, every 4th), and in run 3, 24 do (also 256-284). All the other output words still hold their initial value (index + 17), and the 16 guard words are intact. Word 0 stays 17.Added 20:13Z, corrected 20:50Z. Run alone (
--exact) on this card, the output words that got their expected value: 0, 0 and 0 in three runs without the debug layer; 0, 8, 0, 56, 0, 0 and 8 in seven runs withXCL_D3D12_DEBUG=1. All other output words kept their initial value and the 16 guard words were intact every time. In those runs the device was not removed (GetDeviceRemovedReasonS_OK, every fence completed), and the debug layer, with its messages captured through an info-queue callback, logged no errors, only aCreateCommittedResourceinitial-state warning.With the twoWithdrawn: as @thehollowedone found, the pieces' own predicate (SetPredicationcalls taken out, the read-back buffer is all zero.pso.rs:1387) stays set through the read-back copy, so that result shows the copy being skipped, not what the shaders wrote.(Edited 20:20Z: corrected the counts above. I had first counted the 16 guard words as matching output words, and the time of the addition was a placeholder.)
AI-assisted (Claude Code, Claude Opus 5.5). Synthetic tests only.
@dhillonjagdeep650-boop on GitHub · 2026-11-26 01:28 UTC · original
@Royalflamejlh @Kalmarv The same on Windows with an RTX 3080 Ti: on today's
mainthe put-off ExecuteIndirects run whole, and #2333'sresolve_allocatorinexecute_indirectmakes them chain, but then their recordings pile up. One run per row.Setup: RTX 3080 Ti 12 GB (driver 617.42), Ryzen 7 5800X, 48 GB RAM, Windows 11 Pro 26300, release; retail 1.0.2.1, scripted A,
XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_COHERENT_MB=512 XCL_TEXTURE_LEVEL_PAGES=1 XCL_PSO_WAIT_MS=50 XCL_DEFER_PRIVATE_HOME_TILES=1 XCL_DRED=1 XCL_NETWORK=0, compute pipelines prebuilt with the same build. Tree:maine1d84b7+ this PR atd76f773+ #751, #684, #2097, #1803, #2229, #2384 (switch off), #1975, #1182, #1916. A guard of mine ends a run above 11.8 GB local.a7b93a8), andexecute_indirecttakesresolve_allocatorRECORDINGSholds0x887a0005at 110.8 s, DRED with no page fault and no breadcrumbs (#2403's kind)So with
resolve_allocatorthe chained ExecuteIndirects' recordings (scratch plus theCUSTOMwrite-back commands buffer) are mostly not released 10-20 s later, which fits the growth in both kinds of memory. Why they are not released I have not shown. A lead fromalloc_pool's own line: in e14, 128 title allocator resets made 119 new PC allocators ("119 made, 119 put aside"), against 503 made for 4 096 resets in e12.dispatch_chain::allocator_resetruns for a put-aside allocator only when it is reset for reuse, so recordings filed under backings that are never free again stay. Whether the backings of the segmentslist_xreplays put-off calls on are never marked done is my guess, not checked. In e12 (main2898511, before #2118, this PR at5ca9c23) the same title ran 420 s with 47 623 chained and 7.7 GB local peak.Not tested: #2333 without my
execute_indirectchange; this PR at809da30; the removal's cause (one run).AI use: Claude Code with Claude Opus 5.5 merged the tree, made the change and the log line, ran the scripts and wrote this.
@DavidM1911 on GitHub · 2026-11-26 02:22 UTC · original
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
@Royalflamejlh on GitHub · 2026-11-26 02:55 UTC · original
@dhillonjagdeep650-boop a put-aside PC allocator keeps what was recorded on it until a later Reset of the same title allocator takes it back, which happens only when the one in use is busy at that Reset (
title_reset_in);dispatch_chain::allocator_resetruns only at a PC allocator's reset or last release. The line your "119 made, 119 put aside" comes from counts only such Resets: in our run without the change it read 116 made, 116 put aside at 128 of them (79 s), and 655 and 655 at 2,048 (130 s). #2138 resets idle put-aside allocators, at most every 500 ms at a title Reset, except a title's own allocator once put aside (reclaim_idle_in,f == title_alloc); in our run that case held 2,258 of the 11,061 recordings at 170 s.Setup: the tree, kit and switches of our comment above (RTX 4060 Ti 16 GB, Linux; this PR at
77cfec2with #2333 andresolve_allocatorinexecute_indirect), a warm shader cache, and a log line of whatRECORDINGSholds; 1 run each.#1017 s later)title_reset_in(Royalflamejlh/xcl@f4608d7, brancharch/pool-aside-reset). We have not opened it: #2138 does the same for all but that case, and ours would go on top of it for that one.XCL_ALLOC_SWAP=0), a tree with #2229 added fell under 5 GB available in 2 of 5 runs of 300 s; the other 3 reached 300 s.Not tested: #2138 in this case; this PR at
809da30; Windows; your guess about the backings oflist_x's segments.AI use: Claude Code (Claude Opus 5.5) read the code, made the change and the log line, ran the Linux runs through a script, and wrote this.
Posted without review by a person: the account owner was away and reads replies later.
@Kalmarv on GitHub · 2026-11-26 02:59 UTC · original
@dhillonjagdeep650-boop thank you for e13–e15 (7179803338). Your lead was right, and there was a second half to it. Both are fixed in
551a75e(pushed, rebased ontomainb49be18):resolve_allocatorkeeps such a list's chained recording with the title's allocator. Once that allocator has been put aside, the title's Reset resets the PC allocator standing in for it, not the title's own, so those recordings waited for the pool to reuse it. And when the pool took that allocator for free, it knew nothing of the list, so it could release them while the list still recorded or ran on the GPU.50205bcmakes the pool take such a list on, on the PC allocator it records on, and keeps the recording there. So this branch no longer needs #2333 forExecuteIndirect, and should not be run with #2333'sresolve_allocatorinexecute_indirect.551a75ereleases them at the next title Reset once nothing holds the allocator: no list records on it and its submits are done.Unit tests show both. Our machine can't show the growth: this title chains 2 to 6
ExecuteIndirects in 120 s here, against your 2,846. Could you rerun e14/e15 on551a75e, with the same setup but without #2333'sexecute_indirectchange? That is the RTX 3080 Ti, release, scripted A,XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_COHERENT_MB=512 XCL_TEXTURE_LEVEL_PAGES=1 XCL_PSO_WAIT_MS=50 XCL_DEFER_PRIVATE_HOME_TILES=1 XCL_DRED=1 XCL_NETWORK=0, compute pipelines prebuilt with the same build, and your other PRs if they still merge. What would answer it:RECORDINGSline over time;compute splitline'sExecuteIndirectcounts;allocator resets so far … (N made, M put aside now)line. Ifmadestill climbs with the resets, a list taken on is holding its allocator, which is the case I could not rule out.@Royalflamejlh thank you for 7181244718: the same trace, and the
title_alloccase #2138 leaves out (2,258 of your 11,061).551a75ecovers that case: a title's own allocator, once put aside, is one of the allocators the release looks at, and one of its tests is that case. How it differs from your f4608d7:551a75ereleases only the chain recordings, at any title Reset, and the allocator is still reset on reuse or by #2138.50205bctakes on the lists the pool had not seen, its "free" also covers them.The PR body cites your numbers as a run of your change, not of this head. Could you rerun your case on
551a75e, with the same kit and switches but without #2333'sresolve_allocatorinexecute_indirect(this branch no longer needs it)? TheRECORDINGSline and non-local memory over time would answer it. If RAM still runs out, the pool'sN made, M put asideline would say whether the allocators' own command memory is the other part that grows.AI use: Claude Code with Claude Opus 5.5 found the cause in the code, wrote the fix and its tests, ran them, and wrote this.
@Kalmarv on GitHub · 2026-11-25 22:29 UTC · original · edited 2026-11-26 03:11 UTC
Edited:
551a75eis pushed, rebased ontomainb49be18(#2371 merged). The hashes further down are of the commits before the rebase. New since809da30:resolve_allocatorkeeps such a list's chained recording with the title's allocator. The title's Reset of a swapped allocator resets the PC allocator standing in for it, not the title's own, so those recordings waited for reuse. And when the pool took that allocator for free, it could release them while the list still recorded or ran on the GPU.50205bctakes such a list on, on the PC allocator it records on, and keeps the recording there. This replaces #2333's fallback filing for chainedExecuteIndirects, so this PR will not switch toresolve_allocatorthere when #2333 lands;dispatchstays #2333's.551a75ereleases them at the next title Reset once nothing holds the allocator.ExecuteIndirects in 120 s here, against your 2,846), so the proof on Windows is pending; I asked you for a rerun in a reply below.551a75ecovers that case. The body says how it differs from f4608d7, and cites your numbers as a run of your change. And thank you for 7178119858. You found why the put-offExecuteIndirects ran whole: all 32 declines were a list the pool gave no allocator. YourRECORDINGScount (11,061 under 156 allocators at 170 s) was the first sign of the pile-up. The take-on above fixes that, and its commit credits you.ExecuteIndirect whole compute PSOwarnings, and fourno buffer … skippedabout 3 s before each removal. That fits both halves.809da30on both, where5ca9c23failed 3/3. upipibi: 13 passed in 3 processes. razormontana: the fixture 3/3, and a run with the debug layer loaded. Of the Ampere cards, only the RTX 3070 Laptop is still open.0755bd7, the device test's fix for its 4 errors under GPU-based validation (below), is now pushed.073f8ea: a list created or released at an address now drops the chain scratch the old list's address held (see #2588).551a75e:cargo test --workspace --no-fail-fast -- --test-threads=4(debug, RTX 5070 Ti): 1444 passed, 0 failed, 47 ignored, 25 SKIPPED.dispatch_chain,split,execute_indirectandslabfilters: 47 passed, 0 failed, 1 ignored.dispatch_chainunit tests 6,list_x41 andalloc_pool8 passed. With GPU-based validation, the device test's 4 errors are gone; the 1 error left (884) is frommain's test that feeds an invalid blob.XCL_DIRECT_DXIL=1, a title run beside other jobs: 1303 frames (main1376), peak commit 20,919 MB (main19,157), no removal, no crash; no chainedExecuteIndirectin 60 s on either side. This head alone, 120 s: 1324 frames, peak commit 30,050 MB, 6 chainedExecuteIndirects (0 whole, 0 slabs lost), no removal, no crash. Blocks in the body.Thanks, all, and @bmjask for the review. I pushed
77cfec2, thend76f773with the read-back fix @thehollowedone found and54a936a, a fix to its test, then809da30on the cost of empty rounds (all below). Edited: the GPU runs on809da30are in, under Tested. Point by point:@ivall
Overflow fallback on Ampere: predication is gone. The pieces and the whole form did not see the predicate the same way. @upipibi's RTX 3070 and @thehollowedone's RTX 3080 Ti show it at the first overflow case (1 group per slab, 11 rounds, 12 slabs), and the slicer's words are right on both (
[1, 0, 12, 0]). The only words that match the expected output are at indices that are multiples of 4: the mode-0 lanes, whose100000 + istore happens in the first piece and is final there. Each group has 8 such words, so 8–56 matching words (thehollowedone) and 32–40 (upipibi) are 1–7 groups. @thehollowedone also saw every other word keep its initial value, so no later piece ran in any round. With one group per slab, piece 0 ran in 1–7 of the 11 rounds under a predicate (partial= 1) that should have skipped all of them. Round 0 was not one of them (word 0 stays 17 on the 3070), and the whole form, which that predicate should have let run, ran in no run (if it had, every word would match). The set changes from run to run. So on these cards, predicatedExecuteIndirects did not follow the predicate's value, in both directions, and not the same way each run. I can't tell from the outside why piece 0 is the one that slips through; the fix does not depend on it.@upipibi's and @thehollowedone's second try (the two
SetPredicationcalls around the whole form taken out: all 400 words 0 with the guards, 3 of 3 on both cards) points the same way. That patch left the rounds' predicate (NOT_EQUAL_ZEROon the slicer's 1, cleared after the rounds) in the list. An all-zero read-back with the0xdeadbeefguards gone means the last copy,mem→ read-back, never wrote. The read-back buffer is created zeroed, and the shaders only write words below the guards. It is not a device removal: the runner's fence wait returns an error when the device is removed, and the test got values instead.CopyBufferRegionis one of the operations predication skips. So the likeliest reading is that the rounds' predicate was still in force on those cards past its clear, and it skipped both the whole form and the copy. It does not explain everything: in the unmodified runs the whole form's own predicate came last and the copy ran, yet the whole form did not. So I only conclude that predication there does not do what it is set to. This is a reading of the code, not a run on Ampere. Either way, B differs from that patch: there is noSetPredicationanywhere in the list (runtime or test). The rounds get empty commands, and the whole form reads its arguments from the slicer's buffer. That is the same buffer and the same kind of unpredicatedExecuteIndirectas the cases before the overflow ones, and those passed on the 3070 (the failure was the first overflow case).@thehollowedone's controls narrow it further. On the 3080 Ti, the slicer and the predicated whole form with no piece
ExecuteIndirects before it passed (both fixtures). The whole form unpredicated after the predicated pieces failed. So there, what broke was a dispatch after the pieces'ExecuteIndirects, predicated or not. From the code, the candidates in that sequence are:ExecuteIndirect;SetPipelineStateper piece;The whole form doesn't read those constants, and unpredicated pieces followed by more pieces work there (the non-overflow cases pass), so I can't say which of these it is.
The reorder I had locally (whole form first, predication cleared between) assumed only the whole form was affected, so I withdrew it. Now nothing is predicated. The slicer first counts the slabs. If they are more than the rounds and the whole form is already built, it writes empty rounds and, after its words, the title's Dispatch arguments for the whole form. Otherwise those arguments are empty. The whole form runs through
ExecuteIndirectwith a one-Dispatch command signature on those arguments. So exactly one of the two has groups, decided by the same shader pass that counts them. Which one can't be known when recording, so both are recorded. The whole form goes first, right after the slicer and the binding, with nothing of the chain before it: that is @thehollowedone's passing control without the predicate. The rounds follow after a UAV barrier. The whole form is bound only on such an overflow, and only when it is already built. The title's own predication now gets the same choice: it predicates the slicer too, and if that is skipped, its zeroed buffer leaves both empty. This is in the feature commit (pso.rsslicer,dispatch_chain.rs,bind.rs) and the runner.read_backis honest with this. It counts an ExecuteIndirect as run whole only when the slicer gave the whole form the arguments and left the rounds empty. Those are the dispatches the GPU was given, not the outcome of a predicate.What is lost before the whole form is built (@bmjask's point, and yours). An overflow before the program's whole form is built drops the slabs past the rounds. They are counted (
slabs loston thecompute splitline) and warned about once per program. That is a deliberate trade. The CPU can't see the slab count, since the GPU writes the arguments. So guaranteeing coverage means having the whole form when the ExecuteIndirect is recorded, which means waiting for it there. The precompile does not build whole forms of split programs, so that wait is a cold 16–40 s compile on the title's thread: the stall this PR removes. The rate before this push: in ten of our title runs of5ca9c23, six lost slabs, 158 in total over 73,714 chained ExecuteIndirects. Every loss came from one program with 17 slabs per run: 15 at its first ExecuteIndirect, whose arguments read 0 when recorded so it got 2 rounds, then 1 at each later one (the cap was 16) until its whole form was built. The third commit changes three things:XCL_SPLIT_INDIRECT_ROUNDSdefaults to 32.With these, all of those runs would have lost 0. More than 32 slabs before the whole form is built are still dropped, counted and warned about. The cost is the empty rounds of a program's first ExecuteIndirects (one empty ExecuteIndirect and one UAV barrier per piece and round, which I have now timed: see the reply to @kanade333 below) and 44 bytes of commands per piece and round; the scratch does not grow with the rounds. A follow-up makes it exact: record in
used-pipelineswhich programs a title ran as chained ExecuteIndirects, build their whole forms in the precompile, then wait for the whole form instead of dropping. If you'd rather have correctness now and the stall until then, I can make waiting the default in this PR; that is your call.The fixture's overflow cases still check this: with a whole form the output must match (and it would not if the rounds also ran, since the whole form would then read words the pieces had already changed); without one, only the rounds' groups may change.
The command buffer on the error paths. Done as you describe. The
first compute piecelookup, the whole form and its command signature are all taken beforerecord_slicer. After the slicer is recorded nothing returns early:bind()'s result is kept, the rounds and the whole form are recorded only if it succeeded, and the recording that holdsbufferis pushed toRECORDINGSbefore the error is returned. That recording is not read back, since nothing after the slicer was recorded.a_chained_execute_indirect_keeps_its_commands_when_binding_failsmakesbindfail and checks thatRECORDINGSholds the buffer.Rebase. Done, onto
mainb49be18(above). #2333 is still open; with50205bcthis PR does not need itsresolve_allocator.@pvfreis: both points were real. 2 is the fix above. 1: the whole form is now built on an
xcl-pso-chain-wholethread, so a huge one waits for its turn under the huge-build gate as the workers' builds do. There is a test with every slot taken. Since the whole form is now asked for at a program's first chained ExecuteIndirect (above), it is built for every program a title runs that way. It is still bound only on an overflow, and in our runs for #2403, pipelines that were created but never bound did not seem to count toward the code in use.@KDenKC, thank you for the RTX 5090 runs of
5ca9c23after one precompile: 0 cold compute builds of 256 KB or more against 33 on the base (30 of them whole forms of split programs), 382 and 362 chainedExecuteIndirects with 0 slabs lost, and no removal or crash.@imnicho, thank you for the RTX 5080 runs with 16 GB of RAM (#505): 141 chained
ExecuteIndirects and no whole form built in any run, where the older tree spent about 50 minutes on them.@b3IKK, thank you for the RTX 5080 runs. With #2097, this PR at
5ca9c23and #2519 (7175037954), theExecuteIndirectline read 0 whole and 0 slabs lost, and no whole form was built at all. Thank you too for the77cfec2run with #2519's scratch and #2422/#2526 (7176591261): no whole forms built on the title's thread and nono bufferline, 19 wholes at 100 s instead of 64, and the removal at 102–104 s unchanged with twice the scratch total, so it is #2403's and not the scratch budget's. On the root-signature lead (7175127486), I checked our side (lines at809da30):dispatchtakes scratch only whenallocator != 0and the list is not a bundle (dispatch_chain.rs:292); otherwise it binds the whole form (:296).execute_indirectreturns at:351for the same lists, and they keep the whole form. So the owned path (no allocator, bundles) that records pieces is #2519's, not this PR's.real.rs:4341,note_pso_rs).bind_abilooks it up (bind.rs:1081) and sets it (bind.rs:1091) before the pieces.execute_indirectcallsbind_abi(dispatch_chain.rs:374) before any piece is recorded.runner.rs:1699).2b19fecis now8dbeab2and5ca9c23isc331369, with77cfec2,d76f773,54a936aand809da30on top. So #2519 needs a rebase onto809da30. Your commit50af98eapplies to it without conflicts (git merge-tree); I have not built that.xcl.exethat sets0x001ABC0F(the shader heap's VA reservation) to 1 GiB, our RTX 5070 Ti run was not removed in 300 s, with more than 392 MiB of code in use (#2403 comment). That is one run.@thehollowedone, thank you for both reports. 7175627837 answers the Ampere question for this head. At
77cfec2the fixture passed in 4 processes on your RTX 3080 Ti with the debug layer on, and so did the binding test. Your count-buffer form (7175359633) is the same idea: the slicer chooses on the GPU and nothing is predicated. Yours writes two counts, and77cfec2leaves either the rounds' commands or the whole form's arguments at zero groups. On an overflow yours skips the pieces' commands, where77cfec2still issues the empty rounds; without one the work is the same. Since77cfec2passes on your card, I kept it. What that skip saves is timed below, in the reply to @kanade333. Your gaps:8dbeab2(pvfreis's point 2 above). Afterrecord_slicer(dispatch_chain.rs:371), the result ofbind()(:374) is kept. The recording that holds the commands buffer goes intoRECORDINGSwhateverbind()returned (:387), and only then is the error returned (:388). The read-back skips that recording, since itscheckedis false (:386,:182).77cfec2,checkedisbound.is_ok()alone (dispatch_chain.rs:373). Under the title's predication the slicer may not run, and its words then stay at 0 (the buffer is created zeroed,pso.rs:1377).read_backstill setsmeasured(:186), so the program's nextExecuteIndirectwhose arguments read 0 gets 2 rounds rather than 32. The buffer is new for eachExecuteIndirect, so the stale nonzero tail of your test can't happen in the runtime; the zero one can.d76f773fixes it as you proposed.bind.rspasses the title's predication state (list_x::predicated) toexecute_indirect, andcheckedisbound.is_ok() && !predicated. The device test now also records one predicated and one plainExecuteIndirectand checks that only the plain one is read back. Thelist_xpredication test checks the state through set, clear andReset. The commit credits you.@kanade333, thank you for the RTX 5080 run (7175667429) of
5ca9c23onmain6d12f58. On what you found:no buffer for the commands of a chained ExecuteIndirectis still in809da30(dispatch_chain.rs:364). Each chainedExecuteIndirectcreates a committed buffer for its commands, in system memory (pso.rs:1368). The buffer is kept until the allocator is reset, so the message meansCreateCommittedResourcefailed. Your four came in the last second before the removal, at 44.4 GB of commit and 19.9 GB of video memory on a 16 GB card, so I read them as memory running out, not as the cause. These buffers take about 64 KiB each at most (one committed resource) per chainedExecuteIndirectin flight; I have not measured how many are alive at once. When this fails,bind.rs:334skips theExecuteIndirect, so nothing of it runs. Pooling these buffers per allocator is a follow-up.The dispatch growth is not from these
ExecuteIndirects.chained dispatches issued in N slabscounts the title'sDispatches run as chains (dispatch_chain.rs:305), whichmainalready splits; 126,236 of them in 894,035 slabs is 7 slabs each.XCL_ACTIVITYcounts the title's own calls, not the commands we record for them, so the rise to ~170,000 a minute is the title dispatching more.The empty rounds are a real cost, and now measured. Each chained
ExecuteIndirectrecords, per round and piece, one UAV barrier, oneSetPipelineStateand oneExecuteIndirect, empty or not (pso.rs:1417-1422). On the RTX 5070 Ti (NVIDIA 610.74) I timed that with GPU timestamps: one chainedExecuteIndirect, 10 pieces of an empty shader, 20 repeats, 3 processes. A round takes 144 µs, used or empty, so 2 rounds take 289 µs, 16 take 2.3 ms and 32 take 4.6 ms. Breaking a piece's step down (16 rounds × 10 pieces, median µs per step):SetPipelineState,ExecuteIndirectwith the chain's signature (8 root constants + Dispatch): this PRSetPipelineState,ExecuteIndirectwith a Dispatch-only signatureSetPipelineState, directDispatch(0, 0, 0)So the cost is the barrier right before an
ExecuteIndirectwhose signature sets root constants; why the driver is that slow there I can only guess. At your run's 168 chainedExecuteIndirects a second, 2 rounds of 8.5 pieces would already be about 40 ms of GPU each second. I can't tell from your logs how much of the 0.5 presents a second that explains, but it is enough to matter at 30 FPS. What changes:809da30): once a program's whole form is built, its rounds follow the lastExecuteIndirectread back, not the most any had. An overflow then runs the whole form, so nothing is lost. Before the whole form is built, the most is still used, since slabs past the rounds would be lost.ExecuteIndirects use a Dispatch-only signature. The pieces read only their slab's size and origin, the same for every piece of a round, so they get them from a root CBV that the CPU points at the round's command; the pieces' code does not change. By the table that is about 0.4 µs a step instead of 14.4; I am timing the CBV's own part before I open it. @thehollowedone's count form measured 20 % less here, so it doesn't remove the cost on this card. Thank you for it all the same: it is what made me time the parts.The removal at 403.5 s (DRED page fault at VA 0, no allocations) looks like the others above and in #2403.
@thehollowedone, @upipibi, @Raul-Paiva, @treybertram06: thank you. Your numbers found this:
dispatch_chain_divergent_forward_edges_3dfailed on all four Ampere cards (RTX 3080 Ti, 3070, 3070 Laptop, 3080) with the old, predicated head5ca9c23. With77cfec2it passes on @thehollowedone's RTX 3080 Ti, and with809da30on @treybertram06's RTX 3080 (7176725432: thedispatch_chaintests 13 passed in three processes, and the test alone withXCL_D3D12_DEBUG=1). Thank you, that is the first pass on the current head. We have no Ampere card, so could the others rerun it on809da30and post the counts? The 3070 and 3070 Laptop are still open. The case I most need is new: no overflow, with the whole form built. The whole form'sExecuteIndirectgets empty arguments and the rounds run after it. With this push every program a title runs through a chainedExecuteIndirecthas its whole form built after its first one, so this is now the common path. If that case fails, its assertion message ends inwhole form true(the overflow cases saywhole form for N groups); please paste it in full.The title removals you saw with
5ca9c23(@treybertram06:0x887a0005at 90, 90 and 122 s, and with #2372 too; @Raul-Paiva: within seconds of the world's GPU work) fit the limit in #2403. On an RTX 5070 Ti, the device was removed when the pipelines in use reached 380–392 MiB ofGetCachedBlobcode, in three runs, and with the NVIDIA profile above it was not (one run). That is consistent with the limit, not proof of it. @treybertram06's base run removed at 89.8 s points the same way. Split pieces are part of that code: 244 of the 380 MiB in that count. This PR binds pieces where the title's ExecuteIndirects bound whole forms before, so it can move how much code is in use either way. That was not measured.Tested (RTX 5070 Ti, NVIDIA 610.74, Ryzen 9 9950X, Windows 11 26200, debug unless said):
d76f773, on the GPU:dispatch_chain_divergent_forward_edges_3d --test-threads=1, three runs: passed.dispatch_chainunit tests: 4 passed.dispatch_chain,split,execute_indirectandslabfilters withXCL_D3D12_DEBUG=1: 42 passed, 0 failed, 1 ignored.cargo test --workspace --no-fail-fast -- --test-threads=4: 1292 passed, 1 failed, 46 ignored, 25 SKIPPED. The failure isa_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier, as onmain68a284a(the same count as @thehollowedone's).--nocapture: 42 passed. The messages had 258 errors (953, 744, 712), all from the device test added ind76f773, which bound no root signature;54a936afixes the test. The runner registers no message callback, so plainXCL_D3D12_DEBUG=1runs never show the layer's messages. The "debug layer on" counts in the description showed nothing for that reason, and they are out of it now.XCL_DIRECT_DXIL=1: 1284 frames (main1295), peak commit 28,950 MB (main28,407), no removal, no crash.809da30: the release build, the chain's and the predication's CPU tests (6) and clippy pass. On the GPU:dispatch_chain_divergent_forward_edges_3d --test-threads=1, three runs: passed.dispatch_chainunit tests: 5 passed.dispatch_chain,split,execute_indirectandslabfilters withXCL_D3D12_DEBUG=1: 43 passed, 0 failed, 1 ignored; SKIPPEDdispatch_chain_native_wave64_builds_whole(no wave64).--nocapture, on the same local build (GPU-based validation and the messages are switched on there, not by an XCL option): 43 passed. Of the 277 messages before the exit-time live-object report, 273 are warnings (1328: a buffer's initial state is taken asCOMMON; 926: a root view's address range is in a heap) and 4 are errors, all 1419 and all from the device test: itsbindsets the chain's root signature on a list without descriptor heaps, which a title's list has. No other test gave an error. The test fix is now pushed (0755bd7).XCL_DIRECT_DXIL=1: 1273 frames (main1295), peak commit 29,533 MB (main28,407), no removal, no crash; 2 chainedExecuteIndirects (0 whole, 0 slabs lost).Not tested: whether
551a75estops the growth on Windows (not reproduced here, rerun asked for); NVIDIA Ampere other than the RTX 3080 Ti, 3080 and 3070; other NVIDIA generations than Blackwell and Ampere; AMD; a title run of these changes past the smoke run; the empty-round cost on any card but the RTX 5070 Ti.AI use: Claude Code with Claude Opus 5.5 worked through the testers' numbers and the code, wrote the changes, the tests and this reply, and ran the tests.
@pvfreis on GitHub · 2026-11-26 03:35 UTC · original
By reading only, not run, at
551a75e5: both points are fixed.record_slicerand the push (dispatch_chain.rs:402-418):bind()'s result is kept, the recording holdingbuffergoes intoRECORDINGSeither way, andcheckedis false on a failed bind (:417), soread_backskips it (:182).xcl-pso-chain-whole(:102), whichdriver_compile_identifiedgates by name (real.rs:4047).Chain::wholeholdsbuild_wholewhile it waits for its turn (:81-83), and that thread is never wanted (pso_async.rs:56:BUILDINGis set only on the workers). A title thread that needs the same whole form meanwhile (bind.rs:370,dispatch_chain.rs:326) blocks on the mutex, so it waits for a free slot and at least 3 GB of free commit (real.rs:4097, no timeout) before the compile starts, where onmainit compiled at once.big_compile_turnlets a build the title waits for skip the commit wait and use the wanted cap; this one gets neither. Only for a whole form of 256 KB or more with no cached blob. Not measured.AI use: Claude Code (Claude Opus 5.5) checked this; Claude Fable 5.2 rechecked it; checked by a person before posting.
@Kalmarv on GitHub · 2026-11-26 03:52 UTC · original
@pvfreis thank you for reading
551a75e(7181852695), and for the side effect of the background build. It was real: a title thread that needed the whole form waited onbuild_wholebehind a background build that was never wanted.97a70a7fixes it:Chain::waiting).want_whole's build runs inpso_async::build_waited_on, sobuild_is_wantedis true on its thread while that count is above 0.big_compile_turnchecks it at every look, so as soon as a title thread waits, the build gets the wanted cap and skips the commit wait, like a worker's build the title waits for. The title thread then gets the form that build makes.a_title_thread_does_not_wait_behind_a_background_whole_build_waiting_for_its_turn, fills the background slots, starts the background build of a huge whole form and asks for the form from another thread. With the count left out, as on551a75e, it failed: the title thread was still waiting after 5 s. With it, it passed in 3 of 3 runs.The results are in the description.
AI use: Claude Code with Claude Opus 5.5 wrote the fix, its test and this reply, and ran the tests.
@upipibi on GitHub · 2026-11-25 23:00 UTC · original · edited 2026-11-26 04:04 UTC
Update, at the current head
97a70a7: same card and setup,cargo test -p xcl --lib dispatch_chain -- --test-threads=1 --nocapturein 3 separate processes: 15 passed, 0 failed, 0 ignored each time (the 13 below plusa_list_recorded_after_another_goes_on_in_its_scratchanda_title_thread_does_not_wait_behind_a_background_whole_build_waiting_for_its_turn).dispatch_chain_divergent_forward_edges_3dpasses in all three (32- and 64-thread cases); the onlySKIPPEDline is stilldispatch_chain_native_wave64_builds_whole: no wave64, once per run. The report below is from809da30.@Kalmarv RTX 3070 8 GB (Ampere, driver 616.56), Windows 11 26100, debug, no D3D12 debug layer, at
809da30:cargo test -p xcl --lib dispatch_chain -- --test-threads=1, in 3 separate processes: 13 passed, 0 failed, 0 ignored each time.dispatch_chain_divergent_forward_edges_3dpasses in all three (both its 32- and 64-thread cases); it failed 3 of 3 on this card at5ca9c23.dispatch_chain_divergent_forward_edges_3d(split.rs: each(most, rounds)pair is dispatched withwhole: Noneand with the whole form, "whole form true" in its assertion message), so it passed 3 of 3 here, on both the 32- and 64-thread fixtures.once_the_whole_form_is_built_the_last_execute_indirect_sizes_the_roundspasses in all three too.SKIPPED:dispatch_chain_native_wave64_builds_whole: no wave64(32-lane waves only), once per run.Lib tests only; no title run.
AI-assisted (Claude Code, Claude Opus 5.5).
github-bot referenced this pull request2026-11-26 06:18:31 +00:00
@LocranKing on GitHub · 2026-11-26 04:48 UTC · original
Independent NVIDIA test report on exact head
97a70a73c96ee39cadffe1baafbc6725091277f6(clean detached checkout, no local changes).Tested
32.0.16.2140/ 621.40), AMD Ryzen 5 5500, 32 GB RAM, Windows 11 Home (build 26300), Rust 1.100.0 (stable-x86_64-pc-windows-msvc), Windows SDK10.0.26100.0.cargo build --workspace+cargo test --workspace --no-fail-fast -- --test-threads=4(debug): 1445 passed, 0 failed, 47 ignored (xcl --lib: 1319 passed, 0 failed, 27 ignored).SKIPPEDGPU tests on this adapter: 21 wave64-only (no wave64), 3 wave32 per-lane f16/f32 semantics, 1no heap windows, 1 no D3D12 debug layer (0x887A002D), 1 cannot disable driver cache without Developer Mode (0x887A002D).Regression run
scripts/smoke.ps1 -Seconds 60, release builds oforigin/main(b49be18) and this PR's head (97a70a7):main:
PR:
Not tested
XCL_SAMPLE_*tests; the 60 s smoke run covers boot/intro/menus and does not enter the 3D world.AI use
smoke.ps1commands on this machine and drafted this report from the captured outputs.@Kalmarv on GitHub · 2026-11-26 04:55 UTC · original
@LocranKing thank you for the run on
97a70a7(7182924347): the whole suite on an RTX 3060 Ti, and themain/head smoke pair. It is in the description under Tested, with your note that the smoke covers boot, intro and menus. Your two0x887A002Dskips aremain's tests (texture_states's debug-layer test andshaders's--measure-psotest, which needs Developer Mode), not this PR's.AI use: Claude Code with Claude Opus 5.5 read the report and the tests and wrote this reply.
@pvfreis on GitHub · 2026-11-25 19:07 UTC · original · edited 2026-11-26 05:11 UTC
Added for
97a70a7(2026-11-26)On an RTX 3060 12 GB, the PR run recorded 177 chained
ExecuteIndirectcalls, with zero whole-form executions or lost slabs. It compiled no whole forms and resumed presenting after a roughly 33 s stall. Onmain, title threads compiled whole forms from 126.5 s until the stop. Non-local video memory rose by about 1 GB after the early put-off bursts in both runs.Tested
xcl runper build on an RTX 3060 12 GB with 31.9 GB RAM.mainb49be183+ PR head97a70a73was built asb4bd408fe. Theb49be183baseline was built as2f421655c. Each has one local logging line. Both runs started with an empty XCL cache and used the same scripted input andXCL_DIRECT_DXIL=1 XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512 XCL_PSO_WAIT_MS=50 XCL_PSO_TRACE=1 XCL_NETWORK=0 XCL_ACTIVITY=1.ExecuteIndirectcalls appeared in the 140 s split line. At 190 s, 17 programs had been split and 594 dispatches chained. The log readExecuteIndirect: 177 chained (0 of them whole, 0 slabs lost), 0 whole. The largest compute compile was 509 KB of DXIL.ExecuteIndirectcalls. At 190 s it was 583 of 771, with 40 PC allocator entries, including empty ones. Of the held recordings, 158 wereExecuteIndirectcalls with 2 MiB of command buffers total. The pool logged 84 allocators made and 84 put aside at 170 s, then 409 made and 408 put aside at 190 s.ExecuteIndirect. Put-off dispatches#4096and#8192appeared at 173.8 and 183.5 s.#64–#1024appeared at 111.7–112.2 s and#2048at 116.2 s. Non-local video memory was 1,129 MB at 110 s, 1,378 at 112 s, 1,661 at 114 s, 1,880 at 118 s and 2,061 at 130 s. Commit rose from 27,691 to 30,000 MB. After 130 s, non-local video memory stayed within 2,063–2,073 MB and commit within 30,150–31,297 MB. With the PR, those bursts appeared at 133.5–134.9 s and 148.8 s, with non-local video memory rising from 1,142 to 2,184 MB and commit from 27,794 to 30,196 MB between 134 and 150 s.main, presenting stopped at 112 s and submits stayed at 0–2 per 2 s from 114 s. At the stop there were 956 dispatches after the first chained dispatch, with 106 chained dispatches and 106 recordings held since 130 s. Title threads started whole forms of three split programs (859, 899 and 943 KB of DXIL). Two compiled at 126.5–149.6 s and 149.6–182.4 s on a thread that issuedExecuteIndirectcalls. The third started at 182.5 s on thePresentXthread and was still building at the stop.writes after the GPU … (fence at 5, wanted 6; 1 writes)warning appeared once onmain, at 136.2 s. With the PR, the first warning was at 158.5 s, and the counter reached 64 by 187.2 s. The older5ca9c23run logged none.The single run per build leaves open what drove the late 4.3 GB rise in non-local video memory, why the PR run stalled from 135 to 168 s, and whether
mainwould show a similar rise if it resumed presenting.Not tested
Rendered picture, the suite at
97a70a7, debug builds or AMD.AI use
Claude Code (Claude Opus 5.5) ran the tests and drafted the report. Claude Fable 5.2 rechecked it. OpenAI Codex (GPT-6, exact serving variant unavailable) checked the live PR and applied the edits.
Added for
77cfec2(2026-11-25): RTX 3060 12 GB (Ampere),dispatch_chainlib tests, one process per run:5ca9c23failed 3 of 3,77cfec2passed 10 of 10. Not run atd76f773, which leavessplit.rs,pso.rsandrunner.rsunchanged but changes one of the 12 tests (bind failure).--test-threads=1(suite: 4), 32-lane waves only. Both unrebased; our hook inlib.rsrepeats the runs,crates/xcl/testsleft out.5ca9c23: 8 passed, 1 failed each:dispatch_chain_divergent_forward_edges_3d,split.rs:1101, 352, 384, 384 of 400 words differ.77cfec2: 12 passed each. Both:dispatch_chain_native_wave64_builds_wholeSKIPPED every run.77cfec2merged ontoe1d84b71425/1/46 (passed/failed/ignored),maine1d84b71422/1/46; same failure (e2e.rs:249, presents) and 25 SKIPPED.Not tested: title, debug layer, wave64, AMD.
AI use: Claude Code; Claude Opus 5.5 ran and wrote this, a second Claude Opus 5.5 checked it against the logs, Claude Fable 5.2 reviewed the text.
RTX 3060 12 GB, 32 GB RAM,
main3ceb5507+5ca9c23(no #2097): the whole-form stall did not occur before the title crashed at 527.7 s. One run.Tested
XCL_DIRECT_DXIL=1 XCL_PSO_WAIT_MS=50 XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512 XCL_NETWORK=0. XCL cache empty, driver cache from earlier runs.ExecuteIndirect: 8418 chained (0 of them whole, 0 slabs lost), 0 whole. From the first counted (150 s): 504,780 dispatches, 277 presents, one 2 s window without submits (470 s, twoqueue.Waittimeouts). Compute compiles >= 256 KB: 47, none on a title thread. Skipped console dispatches: 114,560 (524,288 ran).main68a284a+ a log patch) and 132,798 (0829441+ #1405 + #751). Here its 11 pieces built on workers. Mains and caches differ: not a controlled pair.68a284arun (to 213,267).By reading (neither exercised here)
xcl-chain-wholethreads, one per program, skip the huge-build gate (xcl-pso*only). The whole is wanted even whenslabs <= most_rounds(), which the next call in equal scratch fits.bind()?fails,bufferis released with the slicer's dispatch recorded.Not tested: picture, same caches without this PR, the suite, AMD. Unknown: exit code, whether our low-commit stop script ended it.
AI use: Claude Code. Claude Opus 5.5 ran it and wrote this; a second Claude Opus 5.5 checked the numbers; Claude Fable 5.2 reviewed the text; a person checked it.
@futurepro62 on GitHub · 2026-11-26 05:39 UTC · original
NVIDIA and AMD full-suite run, to go with the reports above by LocranKing, pvfreis, upipibi, since none of them covers AMD. Tested exact head
97a70a73(on its baseb49be18).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 1433 passed, 0 failed, 45 ignored. SKIPPED (no wave64):a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu,a_per_lane_2d_or_3d_group_runs_on_the_gpu,coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu,cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu,dispatch_chain_native_wave64_builds_whole,gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware,the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.a_list_the_pool_has_not_seen_is_taken_on_with_the_pc_allocator_it_records_on,a_free_allocator_put_aside_lets_go_of_its_chain_recordings_at_the_next_title_reset,a_taken_on_lists_chain_recording_stays_until_it_moves_on_and_its_submit_is_done,a_free_title_allocator_put_aside_does_not_take_a_live_lists_chain_recording_with_it,a_list_at_a_released_lists_address_starts_without_its_chain_scratch,a_programs_first_execute_indirect_gets_the_most_rounds,once_the_whole_form_is_built_the_last_execute_indirect_sizes_the_rounds,the_whole_form_built_in_the_background_waits_for_a_huge_compiles_turn,a_chained_execute_indirect_keeps_its_commands_when_binding_fails,a_title_thread_does_not_wait_behind_a_background_whole_build_waiting_for_its_turn.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 1444 passed, 0 failed, 47 ignored. SKIPPED:f16_programs_on_the_gpu(f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),f32_programs_on_the_gpu(f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),f32_programs_on_the_gpu(f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).--skipleaves out tests that fail on mainb49be183too, not because of this PR. On NVIDIA:heap_window_out_of_memory_falls_back_to_the_switch_form(#1651), the fourgpu::recomp::lower_dxil::tests::*_programs_on_the_gputests,const_and_null_mask_operands_agree_with_hlsl_on_the_gpuandmask_ff0_and_flbit_agree_with_hlsl_on_the_gpu(follow-up on #1651) fail becauserunner::skip_testturns their skips into failures underXCL_REQUIRE_GPU=mesh, andgpu::dxil::fuzz_testsseeds 70, 545, 1019 and 1507 failCreateComputePipelineStatewithE_OUTOFMEMORYon this card (drivers 616.64 and 621.40). On AMD:fuzz_validate_and_gpu_1fails on seed 540 (res[833]0x7 vs CPU 0x6). The AMD run does not setXCL_REQUIRE_GPU.Not tested
AI use
@Royalflamejlh on GitHub · 2026-11-26 05:54 UTC · original
On Linux + NVIDIA without #2333,
97a70a7presented after the title's burst in 3 of 3 runs and chained every splitExecuteIndirect, but lost slabs in 2. In those runs non-local video memory grew from 4.1 to 12.3–13.9 GB, and our memory guard stopped two of them; this PR's own command buffers and chain scratch held 1.3 GB at 270 s in run 3. From the same caches, the tree without this PR presented nothing after 76 s in 2 of 2 runs, with a title thread compiling a whole form inChain::wholein all four dumps.Setup: the machine, kit and switches of our comment above (7178119858), 300 s; first-run screens completed once, no story progress;
mainb49be18+ #684, #751, #1599, #1860, #2082, with and without this PR. Every run started from a fresh copy of the same caches: NVIDIA's as two earlier runs left it, one of each tree.ExecuteIndirectat the endhad 22 slabs for 2 rounds: 20 lost(warned once per program; in run 1 the counter reached 40 by 200 s). Byslabs_beforeandindirect_rounds(dispatch_chain.rs:376,:365), 2 rounds means its earlier ones had read back at most 1 slab, so9125edb's 32 rounds held only until the program's first read-back.ExecuteIndirectcommand buffers and 937 MiB of chain scratch (62–72 MiB without this PR). The pool'smadestill climbed with the resets: 115 at 128, 324 at 512, 709 at 2,048 (261.6 s), all put aside.dispatch_chain.rs:103); at 280 s in run 2, 199 of 200 waited for a compile turn. Is that meant?Not tested: Windows;
551a75efrom the same caches.AI use: Claude Code (Claude Opus 5.5) merged the trees, added two logging-only count lines, made the runs, read the logs and the code, and wrote this.
Posted without review by a person: the account owner was away and reads replies later.
@KDenKC on GitHub · 2026-11-26 06:16 UTC · original · edited 2026-11-26 07:43 UTC
Windows + NVIDIA data on
97a70a7: PC allocators kept being made through the run. (Edited: corrected per @Kalmarv's 7185688556. The aside-vs-made ratio is ~1:1 by construction; reuse shows in resets against made.) This answers the Windows NVIDIA question. The numbers come from runs we already had, not new ones.RTX 5090 32 GB (driver 621.24), Ryzen 7 9800X3D, Windows 11, release,
XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_NETWORK=0, the retail title. Two builds:97a70a73+ #2551 (3567b2e) + a local code-size log counter.The
alloc_poolline (N made, M put aside now, logged at power-of-two reset counts):0x887a0005at 131.4 sXCL_DRED=1In every run, the allocators put aside stayed within one of those made, so almost none were taken again.Wrong reading: aside ≈ made holds by construction. Reuse shows in resets against made. Run 3 had 2,048 resets for 549 made, so about 1,500 resets took an allocator again. What the numbers do show is thatmadekept growing (381 → 549 between 164 and 183 s in run 3; 570 → 710 by 440 s in run 4), i.e. more and more resets found none of their own free.RECORDINGScount, so I can't tell you whether551a75elet go of the recordings on those allocators, only that the allocators themselves were not reused.slabs loststayed 0, and the overflow whole form (of them whole) stayed 0, in all runs.On your heads-up in #2403 (7181669291): thanks, all three points are right about the main-based version. The version we ran above is stacked on
97a70a7:build_whole_form, whichwant_wholealso calls).ExecuteIndirectreturns early, and the caller binds the whole form. When the tail is still taken, the recording holds its ownArcof it.Chain::tailis anOption<Arc<…>>that the release only detaches, so recordings still on the GPU keep the pieces until their allocator resets.So if this goes ahead, it will be on top of #2404, and you won't need to rebase. I'm not opening it yet: run 3 ended in a device hang (
0x887a0006, twonvlddmkmresets at 222.5 and 224.3 s), and two reruns with DRED did not reproduce it. The tail release does not line up with the hang (the last release was 17 s before it), but I want a cause before asking anyone to review it.As ever, your loyal testing minion and their 5090, reporting for allocator duty.
AI use: Gemini (Antigravity) extracted the log tables and checked the three points against our commits. Claude Code (Claude Opus 5.5) checked the log lines and the
alloc_poolcode at97a70a7and wrote this.@bmjask on GitHub · 2026-11-25 20:23 UTC · original · reviewed
P1: valid ExecuteIndirect work is knowingly truncated when slab count exceeds rounds and no whole form is ready. dispatch_chain.rs:337-355 leaves full=None unless chain.whole already exists, but still records only rounds chain commands. The new test at split.rs:1102-1107 explicitly accepts partial output for that first call. A later background-built whole form does not make the initial valid dispatch correct. Under title predication, full is forced None even when built and feedback is disabled, so over-limit predicated calls are permanently truncated. Please fall back to the original whole ExecuteIndirect whenever complete chain coverage cannot be guaranteed, including predicated cases.
@Kalmarv on GitHub · 2026-11-26 07:39 UTC · original
@Royalflamejlh @pvfreis thank you both for the long runs and the numbers. They show what #2404 is for (it presents where
mainstops on whole-form builds) and the hold it still has.97a70a7): 177 chained ExecuteIndirects, 0 whole, 0 slabs lost, no whole forms compiled, presenting again after the 135–168 s stall; but recordings held rose from 54 to 583 between 140 and 190 s, and the 37 GiB guard stopped the run at 192 s, with commit +322 MB/s and non-local video memory +214 MB/s over 170–190 s.97a70a7): 7,410 recordings held under 115 allocators at 270 s, only 2,297 of them under ones the pool had put aside; 370 MiB of chained command buffers and 937 MiB of chain scratch.5b9d4ffadds three commits:What holds the recordings (
99ca688): every 10 s, with the counter line, acompute split: N of M recordings held, under K PC allocators: …line splits the held ones by their allocator: put aside with a list still recording on it, with submits still on the GPU, or free; in use for a title's allocator, busy or free; or one the pool does not know. On an RTX 5070 Ti I could not reach that part of the title: two 240 s runs of97a70a7with this line (one from an empty cache, one from our seeded one, both with pvfreis's switches) issued 0 chained dispatches and held 0 recordings. Could each of you rerun5b9d4ffonce from the same caches as before and post that line from the end of the run and from where memory starts to grow? Royalflamejlh's ~5,100 held under allocators that were not put aside are the part this line splits up.One cause it may show, found by reading the code: on
main, a title allocator's last Release (alloc_pool::forget) drops the PC allocators made for it that a list still records on or the GPU still runs, without releasing them, so their recordings stay for the rest of the run and new PC allocators are made. Those would show as "not the pool's" on this line. #2138 fixes that case (orphaned_spares); a run with it on top would show whether that row goes away.One thread per whole form (
c9904d7): not meant. The whole forms now queue on one thread for each slot set ofdriver_compile(small, huge, giant), which builds them one after another and ends when its queue is empty. A title thread that needs a whole form still builds it itself. Test:whole_forms_wanted_together_are_built_one_after_another_on_one_thread.20 of 22 slabs lost with 2 rounds (
5b9d4ff): right, as you read it. The rounds were sized by the most slabs read back, so9125edb's 32 held only until the first read-back. Until the whole form is built, a chained ExecuteIndirect now records the 32 rounds whatever was read back; once it is built, the last one read back sizes them, as before. Test:once_the_whole_form_is_built_the_last_execute_indirect_sizes_the_rounds(a read-back of 1 slab before the whole form now gives 32 rounds, not 2).The results are in the description.
AI use: Claude Code with Claude Opus 5.5 read your reports and the code, wrote the three commits and their tests, ran the tests and the runs, and wrote this reply.
@Kalmarv on GitHub · 2026-11-26 07:39 UTC · original
@KDenKC thank you for the 5090 numbers (7184267294), and for stacking the tail release on #2404.
One correction to the reading, which matters for the hold:
N made, M put aside nowis about 1:1 by construction, so it does not show whether allocators are taken again. At a title Reset whose allocator is still busy, the one in use goes aside and the title's allocator goes on with a free one put aside earlier (asideloses one and gains one) or a new one (madeandasideboth grow by one). Each title allocator that was ever swapped so has all its PC allocators but one aside, whether or not they are reused. Reuse shows in resets against made: run 3 had 2,048 resets for 549 made, so about 1,500 resets took an allocator again. What your numbers do show is thatmadekept growing (381 to 549 between 164 and 183 s, 570 to 710 by 440 s in run 4), i.e. more resets found none of their own free.5b9d4ffprints, with the counter line every 10 s, the recordings held and made and what holds the allocators they are under (put aside with a list on it / with submits on the GPU / free; in use busy / free; not the pool's). If you rerun, that line would say whether yours are held by lists, by the GPU, or elsewhere. One source of new PC allocators, found by readingmain: a title allocator's last Release (alloc_pool::forget) drops the PC allocators made for it that are still busy, without releasing them, and the next title allocator makes new ones; #2138 fixes that case, and those would show as "not the pool's" on the line.AI use: Claude Code with Claude Opus 5.5 read your report and
alloc_pool, and wrote this reply.xcl nvprofileputs xcl.exe in an NVIDIA profile with a bigger shader heap (#2403) #2590@KDenKC on GitHub · 2026-11-26 07:43 UTC · original
@Kalmarv thanks, you're right. I read the aside count as "not reused", and it can't say that. I've corrected 7184267294 to the resets-against-made reading. We'll rerun on
5b9d4ffwith the new counter line, so it can say whether the allocators are held by lists, by the GPU or by something outside the pool, and post the line's values over time here.AI use: Claude Code (Claude Opus 5.5) wrote this.
github-bot referenced this pull request2026-11-26 07:52:45 +00:00
@jennydeth on GitHub · 2026-11-26 08:24 UTC · original
RTX 3060 12 GB, head
97a70a7against its basemainb49be18: suite clean, and no regression in the default-settings pair. WithXCL_DIRECT_DXIL=1the chained path is taken: one run logged 397ExecuteIndirects chained, 0 whole, 0 slabs lost. Every direct run, with or without this PR, then ends in a silent0x887a0005(DRED: page fault at VA 0x0, nothing else), within 3 s of the last 2 s window with a present.Tested
stable-x86_64-pc-windows-msvc); release; DXC 1.9.2609.5 (XCL_DXC_DIR)cargo test --workspace --release --no-fail-fast -- --test-threads=4on97a70a7: 1445 passed, 0 failed, 47 ignored (37 test targets incl. doc-tests). SKIPPED (29): 21 × no wave64; 3 × per-lane form refused (V_MUL_F16,V_PK_MUL_F16,V_CVT_F16_F32); 3 × no D3D12 debug layer /d3d12SDKLayers.dll; 1 × no heap windows; 1 ×pso_measurement_compiles_an_exact_synthetic_record(cannot disable the driver cache). On the previous head551a75e: 1444 passed, 0 failed, 47 ignored.scripts/smoke.ps1 -Game <folder>(XCL_NETWORK=0), the same scripted pad presses into the story load in every run,XCL_FRAME_DUMP=300.Regression run (default settings, 600 s)
mainb49be18:This PR,
97a70a7:compute split: 0 programs split … ExecuteIndirect: 0 chained (0 of them whole, 0 slabs lost), 0 whole; the base's line has noExecuteIndirectpart.mainrun was made after the PR run and after the game folder was renamed, so both blocks share the title hash (earlier runs on this machine show4a4b54dc).Direct DXIL (
XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_DRED=1, 900 s):main08db802and by earlier runs: 319–326 driver blobs supplied, 2–4 absent in each run.mainb49be18551a75e97a70a7run 197a70a7run 20x887a0005)ExecuteIndirectin the lastcompute splitlinexcl-pso-chain-whole: the same record, 980,948 B of DXIL, driver blob absent. It started at 111.0 s in the551a75erun (#4168) and at 103.5 s in97a70a7run 1 (#4183). The crash's thread dumps show that thread insidenvgpucomp64.dll, as were the fourD3D Background Threads.Not tested
AI use: Claude Code (Claude Opus 5.5) built the commits, ran the suites and the runs on my machine, read the logs and wrote this.
@Kalmarv on GitHub · 2026-11-26 08:26 UTC · original
Thanks @jennydeth for the RTX 3060 run of
97a70a7againstmain. It is now under Tested in the description, as a run of97a70a7; the head is now5b9d4ff.With
XCL_DIRECT_DXIL=1, the0x887a0005removal (page fault at VA 0x0) also ends yourmainb49be18run, at about the same time (114.8 s, against 99.0–104.4 s with this PR). So it is not from this PR; it looks like the removals in #2403.If you are willing, one more direct-DXIL run on
5b9d4ffwould help, with nomainside needed.5b9d4ffadds a secondcompute splitline every 10 s:compute split: N of M recordings held, under K PC allocators: …. It says what holds the chain's recordings: put aside or in use, busy or free, or not the pool's. The last few of those lines before the removal are what I would look at.AI use: Claude Code with Claude Opus 5.5 read your report and wrote this reply.
@Kalmarv on GitHub · 2026-11-26 08:51 UTC · original
Thanks @thehollowedone for rechecking the current head
5b9d4ffon the RTX 3080 Ti: 1447 passed, 0 failed, 47 ignored, anddispatch_chain_divergent_forward_edges_3dpassed with no skip. It is now under Tested in the description, and the Ampere line under Not tested names this head.As you say, it doesn't cover more than 32 slabs being lost before the whole form is built. That case is still open: those slabs are counted and warned about, and the description says so under the slab-loss commit.
AI use: Claude Code with Claude Opus 5.5 wrote this reply.
@KDenKC on GitHub · 2026-11-26 09:17 UTC · original
The rerun on
5b9d4ffyou asked for (7185688556): the new line every 10 s, Windows, RTX 5090.Build:
5b9d4ff+ #2551 (3567b2e) + a local code-size log counter. Release,XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_NETWORK=0, the retail title, a fresh exe name, the same seeded cache as before, a 300 s cap. It ended with the #2403 heap removal (0x887a0005) at 182.8 s, with compute code in use 496 MB (3,101 pipelines) at 181 s. Before 130 s every value is 0.The allocator line's last milestone was
512 allocator resets … (336 made, 336 put aside now)at 177.3 s. On this run, then:Not tested: a second run; a build without #2551; the heap profile (so the run ends at the #2403 removal).
Another night, another table for the Kalmarv archive.
AI use: Claude Code (Claude Opus 5.5) ran the build and the run, checked the table against the log lines and wrote this.
@Kalmarv on GitHub · 2026-11-26 09:25 UTC · original
Thanks @KDenKC, this run is the one that tells where the growth sits. "Aside with a list on it" went from 1 to 1,909, while "with submits on the GPU" and "not the pool's" stayed at 0. So the recordings are held by PC allocators put aside that a list is still counted on, not by GPU work.
From the code, those lists include retired split segments. At the title's list Reset,
title_list::resetmoves the recording's extra segments, and a stand-in's old first list, into the wrapper's spare pool. The pool still counts each one in its old allocator'sBacking.usersuntil that spare is reset somewhere else, which only happens when the same list splits again. Until then the allocator counts as busy, and its chain recordings are never let go. This is onmainas well. #2707'sretire_recordingdetaches them: at that Reset, for the first list a stand-in replaces, and atput_spare. One more path, KickoffX, is noted on #2707.Your log can't split the 1,909 between those spares and the title's own recordings that it keeps and submits again, which are legitimate holds. If you're willing, one run of
5b9d4ff+ #2707 (068671d) with the same setup would settle it: with #2707, "aside with a list on it" should stay low, unless the title's own lists hold them.The two conflict in
alloc_pool.rs, in one hunk aroundtitle_reset. Take #2707's side: its reset of the free aside allocators goes throughreset_pc_allocator, which already drops their chain recordings, so #2404'sfree_asideisn't needed there. With that,cargo check -p xcl --lib --testsbuilds.AI use: Claude Code with Claude Opus 5.5 read the code, checked the merge and wrote this reply.
@Royalflamejlh on GitHub · 2026-11-26 09:37 UTC · original
On Linux + NVIDIA,
5b9d4ffbuilt whole forms on one thread (124–200 at97a70a7) and lost no slabs at 32 rounds, but from the world's first frames (130–139 s) available memory fell about 20 GB in 30–45 s, to our RAM stop in 4 of 5 runs. With your #2633, those frames came at 84–92 s and vkd3d-proton's share went, but memory fell as far.Setup: as our report above (7183911248), this PR at
5b9d4ff, ± #2633db34184f; runs capped at 34 GB; our RAM stop under 5 GB available of 62; #2633's runs from the NVIDIA cache its first run (310 s) left./dev/nvidiactland other file-backed;/proc/<pid>/smaps, every 20 s)VKD3D_DEBUG=warn)97a70a7without #2633)ExecuteIndirect, kept until its allocator's Reset. With it, memory the NVIDIA driver maps into the process, in no Vulkan heap: in one run, file-backed +16 GB over 72–133 s while vkd3d-proton's allocations grew 1.4–2.2 GiB and the driver's system heap 1.8 GiB. It follows the rounds (last row, the card as full); recorded command streams is our guess.ExecuteIndirectrecords 32 rounds (dispatch_chain.rs:428), each a UAV barrier, a pipeline and anExecuteIndirectper piece, empty or not (pso.rs:1520). The last row sizes them from the last read-back instead (97a70a7took the most): a test, not a fix.5b9d4ff):Not tested: Windows; #2707 (
068671d) on top, as your 7187960206 asks; without #2633, the slab fix past 5,707 chained (our RAM stop came first); a second run of the round counts and of the last row.AI use: Claude Code (Claude Opus 5.5) merged the trees, added the count line and the test line, made and read the runs, and wrote this.
Posted without review by a person: the account owner was away and reads replies later.
@KDenKC on GitHub · 2026-11-26 09:43 UTC · original
@Kalmarv thanks, that reading makes sense. We will run
5b9d4ff+ #2707 (068671d) with the same setup, taking #2707's side of thealloc_pool.rshunk as you describe, and post the same line's table here.AI use: Claude Code (Claude Opus 5.5) wrote this.
@Kalmarv on GitHub · 2026-11-26 09:44 UTC · original
Thanks @Royalflamejlh. Your two split lines show the same thing as @KDenKC's 5090 (7187741993): between 130 and 160 s, "put aside with a list on it" goes from 0 to 1,206, with nothing on the GPU and nothing outside the pool.
Why the memory would stay. Both holders you found belong to the PC command allocator:
d3d12_command_allocator_Reset.XCL resets a PC allocator it has put aside only when the title's allocator takes it again at a later title Reset. That requires the allocator to be free: no list on it and its submits done (
alloc_pool.rs:34,:353at5b9d4ff).free_aside(alloc_pool.rs:334, called at:324) drops only XCL's own scratch and commands buffers (dispatch_chain::allocator_reset); the PC allocator's memory stays. The lists that keep those allocators from being free are retired split segments:title_list::resetmoves the recording's extra segments into the wrapper's spare pool.alloc_poolkeeps each one in its old allocator'susersuntil the spare is reset somewhere else, which happens only when the same list splits again.So I think every allocator put aside under a spare keeps its vkd3d-proton and driver memory for the rest of the run. That is a reading, not measured here. #2707 (
068671d) detaches those segments (retire_recording), and at the title's Reset it also resets the free allocators put aside, throughreset_pc_allocator, which lets that memory go.If you're willing, one run of
5b9d4ff+ #2633 + #2707 with your sampling would test it. "Aside with a list on it" should stay low and the driver-mapped memory should stop climbing. The merge is in 7187960206: one hunk inalloc_pool.rs, take #2707'stitle_reset. The KickoffX path is still missing from #2707 (7187959801), so a few allocators may still be held that way.What one chained
ExecuteIndirectrecords before its whole form exists. Until the program's whole form is built and one of itsExecuteIndirects was read back, it gets the most rounds: 32 (most_rounds,dispatch_chain.rs:407,XCL_SPLIT_INDIRECT_ROUNDS). Each round records, for every piece, a UAV barrier, the piece's pipeline and anExecuteIndirect, also when the round is empty (pso.rs:1520). That makes 32 × piecesExecuteIndirects (320 for 10 pieces) after the slicer. #2633 keeps the count and makes each one Dispatch-only.Capping it without losing slabs. Fewer rounds can't do it. Slabs past the rounds are lost until the whole form exists, which is what your 8- and 4-round runs (240 and 630 lost) and your last-read-back row (40) show. The cap that keeps every slab is the one above: allocators that can reset, so the memory is bounded by what is still in flight rather than by everything recorded. The other route is to have the whole forms before the first
ExecuteIndirect, through the precompile; that is a follow-up, not in this PR.For context only: our Windows 60 s smoke (#2633 peak commit 17.8 GB against
main's 26.2 GB) reaches no chainedExecuteIndirect, so it says nothing about this.AI use: Claude Code with Claude Opus 5.5 read XCL's and vkd3d-proton's code and wrote this reply.
@Raul-Paiva on GitHub · 2026-11-26 09:47 UTC · original
5b9d4ffon an RTX 3070 Laptop 8 GB, the retail title, 600 s: on this card the run lasted the longest so far (removed at 469.8 s), and the new line shows the same growth as the 5090 and the Linux runs above: "put aside with a list on it" goes from 0 to 2 162.Setup:
mainb49be18+ this PR5b9d4ff+ #684, #751, #23854c4c577, #2097d98d2d4, #2422, #2427 + #2428c6e5af8, #24962e8ff6b, #2551, #2590004fa0f, #2598, #2611445129b, #2633, #2691. Local Nsight Aftermath hooks, off in this run (noXCL_AFTERMATH).xcl nvprofile install --mb 1024(1 GiB shader heap) andTdrDelay= 10.XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_WINDOW_NO_CARRY=1 XCL_DRED=1 XCL_WATCH_HOT=0, A pressed every 5 s, fresh--precompile --only cs --pipelines.cargo test --workspace --release -- --test-threads=4: 1 481 passed, 0 failed, 48 ignored, 24 SKIPPED (wave64 and f16 forms this adapter does not run).The new line, every 60 s:
The run:
GPU queue.Wait … did not complete within 5000 mswarnings.0x887a0007(DEVICE_RESET). No Windows 4101 event, so it was not the TDR. No DRED list reported.97a70a7the runs were TDRs at 221 and 281 s (without #2598/#2633/#2611/#2691) and at 216 s (with them) (#2590 comment). This is one run, so it may be chance. Several PRs changed at once, so I cannot say which one moved it.Not tested: more than one run on this tree; this PR alone on
main; the default shader heap with this tree.AI use: Claude Code (Claude Opus 5.5) built the tree, ran the suite and the run, read the log and the event log, and wrote this.
@Royalflamejlh on GitHub · 2026-11-26 10:41 UTC · original
On Linux + NVIDIA, this PR + #2633 + #2707 on the standard vkd3d-proton still had 10.3 GB of driver memory mapped into the title by 113 s, and met our RAM stop at 127.3 s (1 run). On a local vkd3d-proton whose allocator Reset passes
VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BITtovkResetCommandPool, the same tree stayed at or under 2.3 GB and ran to the 300 s limit with no device loss in 2 of 2 runs (its frames then were credits over a flat grey, not the world).Setup: as our report above (7188240609); this PR
5b9d4ff+ #2633db34184f+ #2707dff6edc7+ a log line of ours,alloc_pool.rsfrom #2707's side as you advised (7187960206); vkd3d-protonv3.1-90-g30b0eb9b, standard or with that flag in its twovkResetCommandPoolcalls (libs/vkd3d/command.c:2539,:2811); copies of one NVIDIA cache state;/dev/nvidiactlfrom/proc/<pid>/smapsevery 40 s, on the run's clock./dev/nvidiactl, most sampled#101RELEASE_RESOURCESdff6edc7(its KickoffX fix in): "put aside with a list on it" was lower but not low: 336–872 from 90 to 120 s, against 3,162 and 3,590 at 120 s in our 2 runs without #2707. The driver-mapped memory did not stop climbing: 0.1 GB at 72 s, 10.3 GB at 113 s, against 8.7 and 12.8 GB at 113 s without it.:2538), so a reset allocator keeps its memory. Releasing XCL's idle put-aside PC allocators after #2707's reset, instead of keeping them (a local patch, 1 run, standard build), did not lower it: 12.2 GB at 113 s.Not tested: Windows; AMD;
5b9d4ffwithout #2633 or #2707 on that build; a second run on the standard build.AI use: Claude Code (Claude Opus 5.5) merged the trees, made the vkd3d-proton build, made and read the runs, and wrote this.
Posted without review by a person: the account owner was away and reads replies later.
@Kalmarv on GitHub · 2026-11-26 10:44 UTC · original
Thanks @Royalflamejlh. The
RELEASE_RESOURCESpair (10.3 GB against 2.1–2.3 GB) shows that the memory is what vkd3d-proton keeps in command pools it resets, not what XCL holds.Can XCL bound it on the standard build? Not cleanly. I looked at two ways and neither holds:
alloc_pool::title_reset_inreturnsNonewhen nothing holds the PC allocator in use and it is the title's own (alloc_pool.rs:340-346at5b9d4ff). The title's own Reset then runs on its object (real.rs:7047-7051).CreateCommandListgets it, andlist_x::on_createonly notes it afterwards (list_x.rs:805-829).Releasedestroys those objects. Your local release of the idle put-aside allocators (12.2 GB at 113 s) fits that: what grows sits mostly in allocators in use, the title's own among them.What does bound it is the size of what is recorded. Until a split program's whole form is built and one of its
ExecuteIndirects was read back, each chainedExecuteIndirectrecords the most rounds: 32 × piecesExecuteIndirects, each with a barrier and a pipeline. Once both are there, the rounds come from the last read-back plus a quarter, at least 2 (slabs_before,indirect_rounds), and slabs past them go to the whole form, with none lost. So whole forms that exist before the firstExecuteIndirectshrink those recordings. That means the precompile building the whole forms of the programs a title runs as chainedExecuteIndirects, the follow-up in the description. Fewer rounds without the whole form loses slabs, as your 8- and 4-round runs showed.The direct route on the standard build is the flag itself. vkd3d-proton resets pools with flags 0 to reuse their memory (
command.c:2538), so a reset pool keeps its largest use. Your two-line change is a vkd3d-proton change, and the place to raise it is vkd3d-proton.AI use: Claude Code with Claude Opus 5.5 read XCL's and vkd3d-proton's code and wrote this reply.
@jennydeth on GitHub · 2026-11-26 10:45 UTC · original
@Kalmarv, here is
5b9d4ffon the same RTX 3060 12 GB (driver 32.0.16.2101), set up as in my report above: warm caches,XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_DRED=1, 900 s, the same scripted pad presses, butXCL_FRAME_DUMP=100(every 300th frame before). Two runs:xcl-noprofile.exe. The profile is attached toxcl.exe, so a copy under another name does not match it. I did not read the heap in effect in either run.xcl.exe, with the profile from #2590 (xcl nvprofile install --mb 1024;xcl nvprofile statusreadxcl.exe: shader heap 1024 MBbefore the day's runs).Both lost the device (
0x887a0005, DREDpage fault at GPU VA 0x0; allocations there: []; recently freed: []): at 166.0 s on the default heap and at 163.6 s with 1 GiB. In both, the title then raised0x80000003atgame_scarlett_master.exe+0x2474606; the default-heap process ended with that, the 1 GiB one with0x887a0005. From 120 s on, both presented 0–3 frames per 10 s.The
compute splitlines from 130 s to the removal, default heap:1 GiB heap:
recordings heldlines, "put aside with submits on the GPU" and "not the pool's" are 0. Every counter line showsExecuteIndirect: … (0 of them whole, 0 slabs lost), 0 whole.mainb49be18runs with these switches at the default heap were removed at 211.2 and 216.0 s, while my earlier ones were removed at 114.8 s (b49be18) and 99.0 / 104.4 s (97a70a7). The time moves that much between runs, so I don't compare heads by it.b49be18with these switches lost the device (#2403): one ran 900 s, the other ended at 880.7 s in a0x80000003from the title. This5b9d4ffrun lost it with the profile, at 163.6 s. One run, and I don't know why it differs.Not tested: the heap in effect in each run (not read);
97a70a7with the 1 GiB profile; 2 GiB; AMD.AI use: Claude Code (Claude Opus 5.5) ran the runs on my machine, took the lines from the logs and wrote this.
@KDenKC on GitHub · 2026-11-26 10:46 UTC · original
5b9d4ff+ #2707, as asked in 7187960206. Same setup as 7187741993 (RTX 5090, + #2551 + the code-size counter, the same seeded cache, a fresh exe name). #2707 is atdff6edc7, which includes the KickoffXretire_recordingcommit. Thealloc_pool.rstitle_resethunk was taken from #2707, as you described. It reached the world and ended with the #2403 heap removal at 161.4 s (5b9d4ffalone: 182.8 s), with code in use 496 MB at 155.8 s.Holder line, with #2707 (in brackets:
5b9d4ffalone, from 7187741993):"Aside with submits on the GPU" and "not the pool's" stayed 0 in both runs.
What changes with #2707:
"Aside with a list on it" did not stay low. It was higher early (146 vs 1 at 130 s) and about the same by 160 s (530 vs 559). If the spare-pool path were the whole story it should have dropped. So by your reading, the title's own lists hold most of those.
Not tested: a second run of each; going past the #2403 removal (no heap profile), so the runs stop at 160-180 s;
068671dwithoutdff6edc7.The first attempt of this run lost its way on the title's legal screens and gave no data. It was rerun. My 5090 is getting very familiar with those screens on your behalf.
AI use: Claude Code (Claude Opus 5.5) built and ran it, checked the table against the log lines and wrote this.
@Kalmarv on GitHub · 2026-11-26 10:53 UTC · original
Thanks @jennydeth and @KDenKC. Both runs are now under Tested by others in the description.
@jennydeth (7189803686). In your split lines for
5b9d4ff, the chain does its part in both runs: 2,474 pieces built, 0 whole, 0 slabs lost, and by 160 s 3,020 chainedExecuteIndirects at the default heap and 4,582 with 1 GiB. The default-heap removal is the onemainb49be18also has with these switches:0x887a0005, DRED page fault at VA 0x0. Here it came at 166.0 s, and in your threeb49be18runs at 114.8–216.0 s, so I don't read it as this PR's. The 1 GiB run I can't place. Twob49be18runs with that profile kept the device, and this one run lost it at 163.6 s. With one run against two and the heap in effect not read, I'm leaving it open rather than claiming it either way.@KDenKC (7189810581). Thanks for the run with #2707, and for sitting through the legal screens twice. #2707 does what it is for. At 160 s there are 32 PC allocators against 47, and 848 recordings under busy allocators in use against 1,719. "Aside and free" is no longer 0. "Aside with a list on it" barely moved (530 against 559), and I read that the way you do. A list stays on the allocator it last recorded on until the title resets it on another one or releases it (
alloc_pool.rs:76,:114,list_x.rs:849at5b9d4ff). So every title list that is closed but not yet reset keeps its put-aside allocator held, along with vkd3d-proton's memory under it. Those are the title's own lists, which neither #2707 nor this PR changes. It is the same limit as in 7189779571.AI use: Claude Code with Claude Opus 5.5 read the two reports against XCL's code and wrote this reply.
@Natakout on GitHub · 2026-11-26 11:57 UTC · original
Test report, RTX 3060 12 GB (NVIDIA 621.14), i9-13900K, 64 GB, Windows 11 26200: on
mainb49be18, the world-load stall after the first#101comes fromChain::wholeon a title thread, and this PR removes it.Setup: release build of
b49be18+ #2301 (unrelated, compute compile size),XCL_DIRECT_DXIL=1,XCL_HUGE_PSO_CONCURRENCY=8,XCL_DRED=1, retail 1.0.2.1, 480 s per run, warm caches.#101. A minidump 4 s into the stall (cdb, symbolized) shows two title threads inbind::execute_indirect:dispatch_chain::Chain::whole→PipelineBuilder::pipeline→driver_compile_identified→D3D12Core!CDevice::CreateComputePipelineState(nvgpucomp64busy);Chain::whole, waiting onbuild_whole(Mutex::lock_contended).5b9d4ff(merged clean on top, 2 runs): no stall on that path. Both runs then lost the device 2 and 11 s after#101(0x887a0005, DREDpage fault at GPU VA 0x0; allocations there: []), which is the 512 MB code heap of #2403.xcl nvprofile install --mb 1024(5 runs): the world renders after#101, but at about 1 present every 2 s, for 70 to 240 s. Then0x887a0006(GPU hang, with aLiveKernelReports\WATCHDOGdump each time). Replacing the three biggest compute programs of that title by empty CSs does not change the rate.Not tested: AMD, cold caches, other titles.
AI use: Claude (claude-opus-5-5, through Hermes) ran the builds and runs over SSH, read the logs and minidumps, and wrote this.
@Kalmarv on GitHub · 2026-11-26 12:03 UTC · original
Thanks @Natakout, and for the symbolized dump. It shows the stall this PR is for: one title thread compiling the whole form in
Chain::whole, a second one waiting onbuild_whole. With5b9d4ff, neither of your two runs stalled on that path. Your runs are now under Tested by others in the description.At the default heap, the removals 2 and 11 s after
#101are #2403's 512 MB code heap. The 1 GiB runs are a different matter: about one present every 2 s, then a GPU hang (0x887a0006) in 5 of 5. These runs can't tell whether the hang comes from this PR's chained work or from the title now reaching GPU work it never got to before. Without the PR, presents stop within 31 s of#101, somainnever got that far in your runs. jennydeth's one 1 GiB run of5b9d4ffalso lost the device, where two runs ofmainkept it (7189803686). It is under investigation, and I have no cause yet.AI use: Claude Code with Claude Opus 5.5 read the report against XCL's code and wrote this reply.
@Kalmarv on GitHub · 2026-11-26 12:05 UTC · original
@Natakout, your 1 GiB runs hang 5 of 5, which makes them the best way we have to look at this hang. If you can spare one more run: the branch
Kalmarv/xclchain-indirect-dredis5b9d4ffplus one diagnostic commit (34fe8a2). It is for diagnosis only and won't go into this PR. At a device removal, it adds one line per list with progress: its finished operations by kind, where its firstExecuteIndirectis, and its longest run of barrier /ExecuteIndirectpairs. That run is what a chainedExecuteIndirectrecords. One run in your 1 GiB setup withXCL_DRED=1, merged on the same base as before, then the log'sDREDlines (theDRED: list …ones and the page-fault line) would tell whether the list that hangs recorded a chainedExecuteIndirectbefore the operation that hung.AI use: Claude Code with Claude Opus 5.5 wrote the diagnostic and this comment.
@ClosetPie107 on GitHub · 2026-11-26 12:24 UTC · original
AMD RX 9070 (RDNA4, RADV / Linux) test report on
5b9d4ff6Setup
experimental-11.0-20261112), DXVKv3.1.1-209, patched vkd3d-protonmaster(ec207194,dxil-spirvb540c8a2), DXC1.9.2609.5x86_64-pc-windows-gnubuildTested
XCL_DIRECT_DXIL=1,XCL_ADAPTER=9070,--test-threads=1):dispatch_chain: 16 passed, 0 failed, 0 ignored, 0 skipped (peak VRAM753 MiB)module::split: 8 passed, 0 failed, 0 ignored, 0 skipped (peak VRAM708 MiB)XCL_DIRECT_DXIL=1 XCL_PSO_PRELOAD=0 XCL_PSO_WAIT_MS=50 XCL_TEXTURE_LEVEL_PAGES=1 XCL_SPLIT_MIDLIST_WAIT=0 XCL_COHERENT_MB=1024 XCL_ACTIVITY=1):exit=0after 318 s wall,1,800presents, 0 crashes, 0 device removals, endMemAvailable 11,893 MiB(xcl_rss 7,397 MiB,xcl_swap 5,210 MiB, peak VRAM16,296 MiB).compute split: 221 programs split, 2355 pieces built, 8010 chained dispatches issued in 52611 slabs; scratch 1648 MiB (most 1655, largest dispatch 249 in one slab); ExecuteIndirect: 24395 chained (0 of them whole, 0 slabs lost), 0 whole.Not tested
5b9d4ff6, Windows, NVIDIA.AI use
@Kalmarv on GitHub · 2026-11-26 12:57 UTC · original
Thanks @ClosetPie107 for the RX 9070 run of
5b9d4ff. Your 300 s title run on RADV had 24,395 chainedExecuteIndirects, 0 slabs lost and no removal, and thedispatch_chainandmodule::splittests passed with no skips. It is now under Tested by others in the description.AI use: Claude Code with Claude Opus 5.5 checked the report against the description and wrote this reply.
@Kalmarv on GitHub · 2026-11-26 13:38 UTC · original
Thanks @Natakout for the write-up on #505 (7193547117). Two things from it for this PR:
#101. Without it, a title thread buildsChain::wholeinsideexecute_indirectfor about 50 s. That is now in your entry under Tested by others, with the 4× world rate you saw with splitting off.TdrDelay/TdrDdiDelayat 60 s you had no removal in 4 runs of 480 s. At the default 2 s, world frames of 0.5–2 s of GPU time end in0x887a0006with a WATCHDOG dump. So we read your 5 of 5 hangs with the 1 GiB profile as timeouts from long frames. They have not been shown to come from the split. That answers what the DRED branch was for, so there is no need for the run I asked for in 7191552589. Thanks for that too.AI use: Claude Code with Claude Opus 5.5 read the report and wrote this reply.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.