Repository navigation
Conversation
|
Test report on AMD / Linux (RDNA3, RADV): with #2404 + #2097 no title thread builds a whole form any more, and with 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,
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. |
|
Added for On an RTX 3060 12 GB, the PR run recorded 177 chained Tested
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 Not tested Rendered picture, the suite at 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
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, Tested
By reading (neither exercised here)
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. |
|
Independent test and smoke report for head Tested
Regression run (
PR 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. |
|
Independent AMD RDNA4 (native wave64) test report on exact head Tested
Regression run (60 s retail-title smoke, (Matched Not tested
AI use
|
|
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.
Adjacent controls on the same head: Not tested: full workspace, retail title, other GPUs. AI-assisted. Codex (GPT-6, exact variant unavailable) ran the checks and drafted this report. |
|
Independent retail check on an RTX 5080 (retail 1.0.2.1, 600 s,
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 AI use: OpenCode, Claude Fable 5.2 built the stack, ran the retail title on this machine and wrote this. |
|
Tested: current PR head merged onto current
Not tested: retail titles (no title data on this lane, counts only). AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Follow-up after a second (warm) run of the same stack: the ExecuteIndirect whole forms are still 0 of them whole, 0 slabs lost ( AI use: OpenCode, Claude Fable 5.2 ran the second stack run on this machine and wrote this. |
…#2404, xcl-dev#2405 Integrates VRAM top-mip pressure shedding (xcl-dev#2385), DXC wanted-compile prioritization & worker headroom (xcl-dev#2423), inline split pipeline foreground path (xcl-dev#2424), ExecuteIndirect split program dispatch (xcl-dev#2404), and hosted view heap exhaustion null-pair fallback (xcl-dev#2405). Assisted-by: Antigravity (Gemini 4 Neon)
, xcl-dev#2333, and UnadoptGuard test submits Assisted-by: Antigravity (Gemini 4 Neon)
|
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:
@pvfreis's first point (the Tested on AMD RDNA4 (native wave64), Windows, DXC 1.8.2502.11, debug, 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. |
|
Update: this report covers @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. How many words differ, from the assertion's Added 20:13Z, corrected 20:50Z. Run alone (
(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. |
Test report: #2372 and #2404 on an RTX 3080, retail title 7952987ASummary: both PRs remove the world-load freeze on this card. With either one applied, every run then hits the silent Setup
Conflicts with current
Base, 6 runs
#2404, 3 runs
#2372, 3 runs
What this says Not tested: AMD, other titles, and runs without (Runs and report by Claude Code with Claude Opus 5.5. The commands and counts above come from these runs.) |
|
For the requested RTX 3080 Ti overflow check on #2404 head I then removed only the two Windows 11 build 26300, NVIDIA RTX 3080 Ti / 621.35, Rust 1.99.1; Update after predicate-isolation controls (same head and GPU): The two-call deletion above left the chain's earlier
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. |
bmjask
left a comment
There was a problem hiding this comment.
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.
|
@Royalflamejlh @Kalmarv The same on Windows with an RTX 3080 Ti: on today's 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,
So with Not tested: #2333 without my 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. |
…track With the allocator pool on, `execute_indirect` kept the recording with the PC allocator the list records on (`alloc_pool::recording_backing`). For a list the pool does not track it got 0, so it returned Ok(false) and the ExecuteIndirect ran its whole form. XCL makes such lists itself: a mid-list split's next list is created on `alloc_pool::current(alloc)` with no `created_on`. Under Wine + vkd3d-proton on an RTX 4060 Ti, this branch chained 2 ExecuteIndirects and ran 26-30 whole in three runs of a title, and the title presented nothing after its loading burst. In a fourth run with a log line, all 32 that declined did so for this reason. Such a list is now taken on by the pool, on the PC allocator the title's allocator stands for, which is the one the list was made on (`alloc_pool::recording_backing_or_take_on`), and the recording is kept there. xcl-dev#2333 keeps these recordings with the title's allocator instead (its `resolve_allocator`). The pool then knows nothing of the list, so it can take that allocator for free and release the recordings (scratch and commands buffer) while the list still records or runs on the GPU. Taken on, the list keeps its backing busy until it is reset elsewhere or released, and its submits mark the backing like any other list's. The title's allocator also gets the list's type, so that a Reset while the list holds its backing swaps it like the title's own lists. Reported by @Royalflamejlh (xcl-dev#2404). With xcl-dev#2333 merged under this branch and its fallback in `execute_indirect`, every ExecuteIndirect chained in four runs (22 to 70,341 of them, 0 whole). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The chains of one recording share one scratch, which `dispatch_chain` finds by the list's address (`SHARED`). Only a list's Reset forgot it. Addresses are reused (xcl-dev#2588). A list created at the address of a released one, on the same allocator while the old recordings were still held, found the old list's scratch and shared it with work the GPU may still be running. A chained ExecuteIndirect takes its scratch the same way. `list_x` now forgets the entry when a list is created and when it is released, with a unit test that fails without the change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e free A chained ExecuteIndirect keeps its slicer scratch and commands buffer with the recording of its PC allocator until that allocator is reset (dispatch_chain::allocator_reset, from reset_pc_allocator) or released. When the title resets an allocator whose recording is still held or on the GPU, alloc_pool puts the PC allocator aside and gives the title another. The one put aside is reset only when the same title allocator is reset again and reuses it, which may never happen. Until then its recordings, and the memory they keep, stay. dhillonjagdeep650-boop found it on an RTX 3080 Ti (xcl-dev#2404): 1,887 recordings under 48 allocators at 110 s, local and non-local memory growing about 150 MB/s, then a device removal at 110.8 s. The allocator log said 119 made and 119 put aside. Every title Reset now also releases the recordings of each PC allocator put aside that nothing holds any more: no list records on it and its submits are done. This happens outside the pool's lock. allocator_reset of an allocator without recordings does nothing, and the allocator is reset as before when it is reused. This relies on every chained recording being filed with the PC allocator its list records on, and on that list being known to the pool (an earlier commit here takes on the lists it had not seen). A recording filed with a title's allocator, as xcl-dev#2333's lines file one, would go when that allocator is free, while its list still records or runs on the GPU elsewhere. The first test fails without the sweep: the free allocator put aside still holds its recordings after another title allocator's Reset. Two more show that a taken-on list's recording stays while the list records on its allocator put aside and while its submit runs, and goes after both; and that a free title allocator put aside does not take a live list's recording with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
Thanks! — Devin |
A title allocator's backing that is still busy at the title's Reset is put aside, and another takes its place. A put-aside backing was reset only when a later Reset of the same title allocator found the current one busy and took it back; until then it kept what was recorded on it: its command memory and the recordings of split compute dispatches on it (`dispatch_chain::allocator_reset`), with their scratch and, with xcl-dev#2404, each chained ExecuteIndirect's command buffer. At a title Reset, each put-aside backing of that allocator that was used since its last reset and whose GPU work is done is now reset. With xcl-dev#2404 and xcl-dev#2333 on Linux (RTX 4060 Ti, 1 run each), the split recordings held went from 672 to 11,061 under 156 allocators in 100 s of frames; with this change they stayed between 3,316 and 5,563 under 59 to 82 allocators from 120 to 200 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@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 ( Setup: the tree, kit and switches of our comment above (RTX 4060 Ti 16 GB, Linux; this PR at
Not tested: #2138 in this case; this PR at 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. |
809da30 to
551a75e
Compare
|
@dhillonjagdeep650-boop thank you for e13–e15 (7179803338). Your lead was right, and there was a second half to it. Both are fixed in
Unit tests show both. Our machine can't show the growth: this title chains 2 to 6
@Royalflamejlh thank you for 7181244718: the same trace, and the
The PR body cites your numbers as a run of your change, not of this head. Could you rerun your case on 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. |
|
By reading only, not run, at
AI use: Claude Code (Claude Opus 5.5) checked this; Claude Fable 5.2 rechecked it; checked by a person before posting. |
…'s turn `want_whole` builds a split program's whole form on `xcl-pso-chain-whole`, an `xcl-pso*` thread, so a huge one waits in `big_compile_turn` for a background slot and 3 GB of free commit, with no timeout. It waits holding `Chain::build_whole`, and nothing on that thread says a title thread waits for it (`pso_async::build_is_wanted` reads only a worker's build). So a title thread that needs the same whole form meanwhile (`bind.rs` for an ExecuteIndirect it cannot chain, `dispatch` without scratch) blocked on the mutex until the background turn came. It got neither the wanted cap nor the commit skip of a build the title waits for, where before `want_whole` it compiled at once (found by @pvfreis in the review of xcl-dev#2404). A title thread now counts itself in `Chain::waiting` while it waits for the whole form, and `want_whole`'s build runs in `pso_async::build_waited_on`, so `build_is_wanted` is true on that thread while one does. The background build then goes as one the title waits for, and the title thread gets the form when it is built. The test fills the background slots, starts the build and asks for the form on another thread: without the count it waited until the slots were freed ("the title thread waited for the background build's turn"). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@pvfreis thank you for reading
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. |
A chained ExecuteIndirect records, per round and piece, a UAV barrier, the piece's pipeline and an ExecuteIndirect whose command signature sets the eight root constants of the slab. On an RTX 5070 Ti (NVIDIA 610.74) such an ExecuteIndirect after the barrier takes 15.3 us of GPU time, empty or not: 32 rounds of 10 pieces are 4.9 ms, every time (xcl-dev#2404). With a Dispatch-only signature it takes 0.41 us; a barrier only to the scratch does not help (15.3 us). The pieces read only the slab's size and origin (`split.rs`, `Slab::new`), the same for every piece of a round. So the chain's root signature takes them as a root CBV (b0 space2, the register the pieces already read) instead of root constants, and the pieces do not change: - ExecuteIndirect: the slicer writes one 256-byte command a round (the slab's constants, its Dispatch 32 bytes in) instead of one 44-byte command per piece; the CPU points the CBV at the round's command, and the pieces' ExecuteIndirects take the Dispatch-only signature. The buffer for 32 rounds is 8 KiB, whatever the pieces. - Dispatch: the CPU writes the slabs' constants into 64 KiB upload-heap blocks of the list's allocator, used again once it is reset; without one the whole form runs, as without scratch. Measured on the RTX 5070 Ti, GPU timestamps, 16 rounds x 10 pieces, median per piece step: ExecuteIndirect, root constants (before) 15.3 us empty, 15.6 us with one group ExecuteIndirect, root CBV, Dispatch-only 0.41 us empty, 1.01 us with one group Dispatch, root constants (before) 0.25 us empty, 0.61 us with one group Dispatch, root CBV in the upload heap 0.25 us empty, 0.61 us with one group Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Independent NVIDIA test report on exact head Tested
Regression run main: PR: Not tested
AI use
|
|
@LocranKing thank you for the run on AI use: Claude Code with Claude Opus 5.5 read the report and the tests and wrote this reply. |
|
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 Tested
Not tested
AI use
|
|
On Linux + NVIDIA without #2333, Setup: the machine, kit and switches of our comment above (7178119858), 300 s; first-run screens completed once, no story progress;
Not tested: Windows; 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. |
|
Windows + NVIDIA data on RTX 5090 32 GB (driver 621.24), Ryzen 7 9800X3D, Windows 11, release,
The
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
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 ( 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 |
Part 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. D3D12.X: keep caller allocator for untracked lists and retain whole PSOs in dispatch_chain #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 D3D12.X: keep caller allocator for untracked lists and retain whole PSOs in dispatch_chain #2333'sresolve_allocatorforExecuteIndirect;dispatchstays D3D12.X: keep caller allocator for untracked lists and retain whole PSOs in dispatch_chain #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 (D3D12.X: a direct list at a released compute list's heap vtable address gets the compute list's methods #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 D3D12.X: reclaim idle put-aside allocators and retire orphaned batches #2138).50205bc, that covers the lists the pool had not seen, which f4608d7 (on D3D12.X: keep caller allocator for untracked lists and retain whole PSOs in dispatch_chain #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.999 changed lines (984 added), over the ~400 target: 121 are the GPU test and its runner, about 330 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 four commits fix how this PR's own recordings are kept and how its own background build of the whole form waits, so they go with it.Tested
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.77cfec2with D3D12.X: keep caller allocator for untracked lists and retain whole PSOs in dispatch_chain #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 Recompiler: a bridged mask write in the split form meets no barrier #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 Recompiler: split wave64 compute groups of several waves across dispatches #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, after earlier runs on the same route had warmed its driver cache. That job ran in the queue's title lane, beside 3 to 4 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,
97a70a7:compute splitcounter at the end of each run:main:compute split: 11 programs split, 72 pieces built, 0 chained dispatches issued in 0 slabs; scratch 0 MiB (most 0, largest dispatch 0 in one slab)compute split: 11 programs split, 72 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.551a75estops the growth @dhillonjagdeep650-boop saw (review). The unit tests show the release and the take-on. But this title chains 2 to 6ExecuteIndirects in 120 s on our machine against 2,846 in that run, so we cannot show it here. The proof on Windows is pending: I asked for a rerun.Dispatchon a list the pool does not track still runs whole; that is D3D12.X: keep caller allocator for untracked lists and retain whole PSOs in dispatch_chain #2333's.XCL_PSO_WAIT_MS), the path of D3D12.X: the GPU hangs after thousands of dispatches put off to the submit (#2118) when the waits are bounded #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. D3D12.X: the GPU hangs after thousands of dispatches put off to the submit (#2118) when the waits are bounded #2617's hang is onmainwithout this PR (RDNA2); none of our runs of this PR setXCL_PSO_WAIT_MS.77cfec2it passed on an RTX 3080 Ti (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