Repository navigation
Conversation
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
By reading only, at
AI use: Claude Code (Claude Opus 5.5) found this; a second Claude Opus 5.5 re-derived it; Claude Fable 5.2 reviewed the text; checked by a person before posting. |
|
Thanks, checked against the code: all three are right. 2 is a real race, and I'm fixing it here by checking and removing under one lock. 1 and 3 I'm fixing too; until then please don't read results on AI use: Claude Code (Claude Opus 5.5) wrote this. |
5b59fe4 to
6d19dc0
Compare
|
1 and 2 are fixed in the new head. For 3 I was too quick: #2333 already fixes the split segments, so I'm not duplicating it here, and the two conflict in AI use: Claude Code (Claude Opus 5.5) 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. |
|
@veyn-sudo, results for this PR at four budgets on the retail title, using its own count line (you asked @Pipodi for counter runs in #2403 (comment); these bracket your NVIDIA default of 320): the removal at world start still comes in every arm, while the count is at or under ~370 MB. Results from one RTX 5090. Setup
Results
In every arm the world's work starts at ~126 s (200–770 draws and 2,000–8,000 dispatches per 2 s, 0–3 presents), and the device is removed 8–12 s later. No GPU-wait timeouts and no skipped draws in any arm; 0–128 skipped dispatches. Observations
Possible next steps (not tested):
Not measured: the graphics/compute split of the count at the removal; how many released pipelines were rebuilt; frame times; a second run of each arm (they ran once, in the order 0, 340, 370, 250, under one exe name, so NVIDIA's own cache warmed across arms); any other GPU or driver; the larger shader-heap driver setting. Thanks to SlopTart for the RADV/Wine lifetime results (#2526 (comment)), and for your correction on the pool race and split-tail accounting (#2526 (comment)), which made this head the one to run. AI use: Claude Code (Claude Opus 5.5) built the tree, ran the arms, measured the logs and wrote this comment. |
|
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
Thanks! — Devin |
|
Independent dual-PC NVIDIA full-workspace test report on clean head Tested
Not tested
AI use
|
|
@veyn-sudo a data point for "Graphics code counts but stays", and for the graphics share KDenKC raised above: on an RTX 3060, graphics and mesh pipelines fill the same shader-code reserve as compute, at about their blob size. Tested
(Posted here only; the limit data itself is the #2403 test's.) Not tested: whether the title's own mix of programs behaves like these synthetic ones; whether the driver's background code and the heap-to-blob overhead apply to graphics the same way, amplification shaders, other GPUs and drivers, a larger reserve from a driver profile, a title run, this PR's code. AI use: Claude Code. Claude Opus 5.5 wrote the three modes, ran them and wrote this; Claude Fable 5.2 rechecked it. |
|
Source review of head
After that, only A Not tested: we have not run this head. This is from reading the source only. AI use: Gemini (Antigravity) flagged it in a first-pass review. Claude Code (Claude Opus 5.5) traced the path in the source at |
pso_release dropped what XCL keeps of a pipeline after the driver had freed it. A pipeline made by another thread in between could get the same address and lose its own entries: a translated compute program then counts as untranslated and its dispatches are skipped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WStEFektfHt5AEbK6Wupac
xcl-dev#2403) NVIDIA's driver keeps the code of the pipelines in use in a heap of at most 512 MB and removes the device (0x887a0005, nothing in DRED, no event) when a submission needs more. With more than XCL_SHADER_CODE_MB of compiled code in use (320 on NVIDIA, no limit elsewhere) the compute pipelines bound longest ago are released, but none a recording holds; their next bind builds them again from the driver's cache. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WStEFektfHt5AEbK6Wupac
6d19dc0 to
0fd22d0
Compare
|
@KDenKC thanks for both. The review point was right: Your budget runs match what I measured on a 2070 SUPER: in the world the code in use is the working set (~435 MB at the removal, all of it used within the last 2 s), so releasing what is idle cannot keep it under the heap. This PR stays useful for idle code, but on its own it does not prevent the removal at world start. AI use: Claude Code (Claude Opus 5.5) checked the path, wrote the fix and the test, ran them on my PC and wrote this. |
|
Focused RTX 4080 readback on exact head The first one-group compute dispatch wrote Tested
The synthetic test forces idle reclamation on a small pipeline. Retail workloads, driver shader-code capacity, and the workspace suite with this overlay remain untested. |
|
Checked at AI use: Claude Code (Claude Opus 5.5) checked the source at that head and wrote this. |
Stacked on #2422; only the top commit belongs here.
NVIDIA's driver keeps the compiled code of the pipelines in use in a heap of at most 512 MB and removes the device when a submission needs more (#2403). Code counts from a pipeline's first use until it is released, so this releases compute pipelines that are not in use and builds them again at their next bind. Part of #2403.
It is not enough by itself. With the translations of the default path one command allocator's recordings use 289 MB here, and nothing a recording uses can be released: the device was still removed (132 s and 200 s into a run, 134-141 s without). With
XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1the code is about 40 % smaller. CharlyRien has a version of this of their own and reports no removal in 480 s with it and the direct path (#2403).What is in it
hle/d3d12x/shader_code.rs(new): which pipelines count, what recordings hold, what to release.XCL_SHADER_CODE_MBis the code to keep in use (GetCachedBlobsizes): 320 on NVIDIA, no limit elsewhere, 0 for none.pso_async.rs: a build can run again (JobisFnMut); past the limit the compute pipelines bound longest ago are released, none used in the last second. Their next bind builds them itself: a turn in the workers' queue behind first builds took minutes.list_x::record_deferred) hands its pipelines to its segment's allocator too: its segment is reset withoutcl_reset(found by KDenKC).Reset(or the pool knowing that no list is on it and the GPU is done,alloc_pool::when_done, which checks and takes under one lock) gives it back.real/dispatch_chain.rs: all pieces of a split program count, and its recordings let go of them in the same step.when_donetaking under the lock, a split program's recordings and pieces, a dispatch put off to the submit keeping its pipeline with its segment.699 added lines, 58 of them #2422's and 81 the deferred-dispatch fix and its test. I did not find a smaller part that does anything alone: releasing is unsafe without the references, and they do nothing without it. #2417 keeps resolved pipelines alive too; if it goes in, the references here can use it.
Tested
cargo test --workspace --no-fail-fast -- --test-threads=4on0fd22d04: 1441 passed, 0 failed, 47 ignored.SKIPPEDlines: 21 no wave64, 3 f16 forms refused, 1 no heap windows.a_dispatch_with_a_pipeline_still_building_waits_at_the_submitfails; it does onmaine1d84b7too (4 of 12).execute_indirect_reads_the_arguments_written_before_itfailed once with out of memory, not in 8 repeats.XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_DIRECT_SPLIT_INSTRUCTIONS=0: six runs reached the world and were stopped by low memory after 158-170 s, without a removal, the one withXCL_SHADER_CODE_MB=0too. In the two where it was measured at most 116 and 132 MB of code was in use, far under 320. WithXCL_SHADER_CODE_MB=6045 pipelines were released and 121 MB stayed in use.Regression run
main:
this PR:
Not tested
AI use
🤖 Generated with Claude Code
https://claude.ai/code/session_01WStEFektfHt5AEbK6Wupac