NVIDIA: the device is removed when the pipelines in use need more than 512 MB of shader code (0x887a0005) #2403
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#2403
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@veyn-sudo on GitHub · 2026-11-25 17:52 UTC · original
NVIDIA's driver keeps the machine code of the pipelines in use in one heap of at most 512 MB. A submission that needs more removes the device:
0x887a0005, no page fault, nothing in DRED, no event. The retail title's world needs about that much on a GPU with 32-lane waves, so it is likely the silent removal of #1452 and #505. A small test reproduces it without any title.Measured on one card so far: RTX 2070 SUPER 8 GB, driver 617.14, i7-9700K, 32 GB RAM, Windows 11 26300. Bears on #1833.
Reproduce it
shader_code_limit.rs(at the end) makes compute pipelines of unique code, 1.7 MB each,main68a284a:0x887a0005at 262 pipelines, 449 MB of driver blobsSo code counts from a pipeline's first use until it is released.
What the driver does
Read in the running title with a hook on every kernel graphics call of the process (
NtGdiDdDDI*); the heap also in the test:D3DKMTGetDeviceStatereports the device as active until then. The DMA fault (6) found on an RTX 5070 Ti in #1215 is what the driver sets itself:MarkDeviceAsError, from insideExecuteCommandLists.E_INVALIDARG(nvwgf2umx.dll+0x173b78in this driver), where a heap is asked to grow past its maximum:GetCachedBlobsizes, about 1/9 less than the heap).This fits reports in #1452 and #505: the submission at the removal does not matter, cold caches delay it, and any group of about 30 of the 1.0-1.8 MB programs brings it. Unreal developers describe the same symptoms as "shader heap exhaustion", with NVIDIA raising the limit in one game's profile (1, 2; secondhand, I found no NVIDIA documentation).
What I tried
68a284a. Default path: 21.81 MB, against 21.76 MB for the translations the runs above used.XCL_DIRECT_DXIL=1: 18.28 MB (-16 %; 11-35 % a program, none for the one the default path already sends there).What would fix it
Helpful now: the test on other cards and drivers (AMD and Intel too): at how many MB, if at all? And whether
nvwgf2umx.dllreturnsE_INVALIDARGin your removal.Not tested
Other cards, drivers and titles; that the removals others report are this one; the title with
XCL_DIRECT_DXIL=1.The test
10-20 minutes the first time; it ends with a removed device.
MODE=dropandMODE=unusedare the other two rows.crates/xcl/tests/shader_code_limit.rs
AI use: Claude Code (Claude Opus 5.5) did the diagnostics, wrote the test, ran everything on my PC and wrote this.
xcl nvprofileputs xcl.exe in an NVIDIA profile with a bigger shader heap (#2403) #2590@VolenNakov on GitHub · 2026-11-25 18:13 UTC · original
The test on a second card and driver: the same limit.
MODE=keep(defaultCOUNT,STMTS,THREADS), one run: device removed (0x887a0005) at 261 pipelines, 446 MB of driver blobs, the line before at 256 pipelines / 438 MB with the device fine.main68a284awith onlycrates/xcl/tests/shader_code_limit.rsfrom this issue added. About 8 minutes for the test itself.Fits what I saw in the title on this card: the #2057-based trees (giant compute programs whole) lost the device at the world load in every run, and plain
mainwith the compute splitting (06c9f55, #2329 on top for one) has not, in 3 runs of up to 600 s after the first#101(the title then waits on cold whole-form compute builds, the #2372 case). Not run:MODE=drop/MODE=unused; whethernvwgf2umx.dllreturnsE_INVALIDARGhere.AI use: Claude Code (Claude Opus 5.5) ran the test on my PC and wrote this comment.
@STmihan on GitHub · 2026-11-25 18:27 UTC · original
RTX 3070 Ti 8 GB (Ampere), driver 621.14: removed at 262 pipelines, 448 MB, the same limit as on the 2070 SUPER and the 4060 Ti 16 GB.
Ryzen 7 5800X, 64 GB RAM, Windows 11 26100.
shader_code_limit.rsfrom this issue, unchanged, on a local tree based onmainplus open PRs (the test only usesd3d12and DXC, nothing of the tree's translator), release,MODE=keep, defaultSTMTS=3000,THREADS=14:Ran
keeponly, once; notdroporunused, and no hook onnvwgf2umx.dll.AI use: Claude Code ran the test and wrote this.
@Ariorh1337 on GitHub · 2026-11-25 18:34 UTC · original
@veyn-sudo the test and the title on an RTX 5090 (driver 32.0.16.1692): the same limit, and the title's removal after the first
#101meets it.Setup: RTX 5090 32 GB, Ryzen 7 9800X3D, 64 GB RAM, Windows 11 26300, release, DXC 1.9.2609.
Your test (
shader_code_limit.rsas posted, onmain06c9f55, defaults:MODE=keep, 3000 statements, 5 threads):That's about 1.75 MB per pipeline, close to your 2070 SUPER (262 pipelines, 449 MB).
The title (retail 1.0.2.1, warm caches, through the menus): I added a local count of the
GetCachedBlobbytes of every translated pipeline when it is first bound. Releases aren't subtracted, so it is an upper bound for the translated part only. Per 2 s:#101)0x887a0005So the title is removed at 436 MB of translated code, and your test at 439 MB on the same card. DRED here reports the removal as a "page fault at GPU VA 0x0" with no allocation. That fits a removal the driver sets itself rather than a real fault.
This also explains what I listed in #505 as not being the cause. Refusing the BVH builder, ActivateRays / ActivateProbes or ScreenProbes_Inject left the rest above the limit. Serialized submissions only delayed it. Cold caches got further because pipelines still building don't count.
AI use: Claude Code (Claude Opus 5.5) added the local count, ran the test and the title on the machine above (I pressed through the menus) and drafted this.
@Berserker64 on GitHub · 2026-11-25 18:59 UTC · original
RTX 3080 10 GB (Ampere), driver 621.24: removed at 262 pipelines, 448 MB (
0x887a0005), the same limit as the other cards.Ryzen 9 5950X, 32 GB RAM, Windows 10 Pro 19045.
shader_code_limit.rsfrom this issue, unchanged, on a local tree based onmainc4d37beplus open PRs (the test only usesd3d12and DXC), release,MODE=keep, defaults:No Display 4101 or nvlddmkm event in the System log at the removal. Ran
keeponce; notdroporunused, and no hook onnvwgf2umx.dll.The retail title's removals on this card (
0x887a0007, 56–94 s into about half its runs) are not this limit: in a run removed at 66 s, the title's pipelines in use came to under 1 MB ofGetCachedBlobcode (20 pipelines); runs that went on to 100 s reached 62–81 MB.AI use: Claude Code (Claude Opus 5.5) ran the test and wrote this.
@humsterbumster on GitHub · 2026-11-25 19:02 UTC · original
A second platform for the same wall, with the title rather than the test: Linux, RTX 5090 32 GB, driver 620.73.04, Wine 11 / Proton 11, vkd3d-proton 3.2.0 (
ec20719). Every tree and cache state I have ends the same way, at 268 – 349 s of world load, and the compile history is what moves the time.main3f4495a0x887a0005at 328 smain3f4495amsvcrt.dllat 267 s3ceb550+ #541 + #1803 + mimallocmsvcrt.dll+0xa4fbat 268 s3ceb550+ #541 + #1803 + mimalloc0x887a0005at 309–337 s4df1e6e+XCL_HEAP_WINDOWS=1 XCL_UMA_WINDOWS=10x887a0005at 309 s, then0x80000003game+0x2474606Two things match the issue:
2,420,640 B DXILcompute PSO starting at 323.7 s, the title's activity falling to 0 draws, and the device gone at 328.5 s. The fence the title waited on never advanced in 10 s (1 writes after the GPU ... after 10000 ms), the DMA-fault picture jessenic showed in #505.msvcrtfault on a host-side copy, or the title idle in its own gated waits). The heap fills with the code the world needs whether it was compiled in this run or loaded from a blob.On this box the two ways past it that do not need new code also fail:
XCL_PSO_WAIT_MS=1 XCL_PSO_IMAGE_SKIP=1keeps the device alive to 365 s but skips 57,415 of 66,125 dispatches (87 %), so the loading cards and the intro's credit overlays draw and no geometry does;XCL_DIRECT_DXIL=1(the −16 % you measured) is already in every leg above.So a Linux/NVIDIA data point for "releasing pipelines is the rest of the session": I would take your first version of it. If it helps testing, my legs are reproducible in ~6 minutes each from a saved profile; the failures are 100 % — 8 of 8 runs since the tree moved past
aa9ab8a.AI-assisted (omp / DeepSeek V4.1 Flash 1017), nv-linux class. No game data attached.
@razormontana on GitHub · 2026-11-25 19:09 UTC · original
I'm taking the split scratch allocation fallback. When a list's existing scratch can hold one workgroup, failed growth can use that buffer in smaller slabs. This avoids requesting a whole compute PSO on that path, which bears on the driver's live shader-code pressure. I'll add a regression for failed allocation.
Assisted by Codex (GPT-6.2 and GPT-6.2 Astra).
@NWProgramming00 on GitHub · 2026-11-25 19:18 UTC · original
The test on a Blackwell card and on an AMD iGPU. The RTX 5070 Ti has the same total limit, and in front of it a limit on one program: a compute pipeline whose code is over about 1 MB is refused with
E_OUTOFMEMORYat creation, so the test's default 1.7 MB programs never get made there. The AMD iGPU kept all 600 default programs.Setup
main68a284awith onlycrates/xcl/tests/shader_code_limit.rsfrom this issue added, plus three local changes:CreateComputePipelineStateis printed (the test returns silently there);XCL_ADAPTER=radeonpicks the first AMD adapter.RTX 5070 Ti
STMTSCOUNT/THREADS0x8007000E(E_OUTOFMEMORY) atCreateComputePipelineState, soall 0 pipelinesand no removal0xc0000005, afterthread '<unknown>' has overflowed its stackfrom threads the test does not name (the driver's);RUST_MIN_STACK=64 MiBdid not change it0x887a0005at 768 pipelines / 448 MB of driver blobs; the line before: 736 / 429 MB, device fineE_OUTOFMEMORYwith no device removal. A title program that compiles to more than that would get no pipeline on this card at all.AMD Radeon RDNA2 iGPU
MODE=keepwith the defaults (600 programs, 3000 statements): all 600 pipelines made, dispatched and kept, device fine (1,454 s).GetCachedBlobreturns an empty blob on this driver, so the test prints 0 MB. How much code that is, I could not read.Not tested
MODE=dropandMODE=unusedon the RTX 5070 Ti with 1000-statement programs.AI use
@milesah3ad on GitHub · 2026-11-25 19:46 UTC · original
Which changes shrink the compiled code that fills the 512 MB heap: #1901 cuts it 3.5–6× on synthetic programs, heap windows halve it, and the direct DXIL backend doesn't shrink it here (larger for cross-lane code). The same programs in eight forms, measured by
GetCachedBlobsize, the proxy this issue uses. No title.Setup: RTX 5080 16 GB (Blackwell, 32-lane waves → split wave64), driver 621.24; Ryzen 7 9800X3D; Windows 11 Pro 26300; DXC 1.9.2609.5; release. Trees:
main2898511, #1901 head5064119, #2368 headc685e12. 20 synthetic compute programs per form, from thenv680generator (base,atomic,loop,wave= av_readlaneper round,loopx= a loop with a lane read and a ballot every trip). Each at 250 and 1000 rounds (about 3k–15k console instructions), 2 seeds, 4 memory windows. OneCreateComputePipelineStateeach with the ABI root signature, thenGetCachedBlob.maindefaultmain, HLSL, switch windows (default)main, HLSL,XCL_HEAP_WINDOWS=1main,XCL_DIRECT_DXIL=1, switchmain, direct, heap windowsCompiled blob per shape (MB, the 4 programs of each shape summed):
mainHLSL switchmainHLSL heapmaindirect switchmaindirect heapReading
waveshape (lane reads). That differs from the −16 % in the description on 14 retail programs, so it may depend on how much cross-lane code a program has. Worth checking on the title's world-load set before counting on the direct route for this limit.main). Its heap form gives byte-identical blob sizes to directmaindespite slightly different DXIL.Not tested: retail programs (the shares here say nothing about the title's mix), whether blob size before the first dispatch equals what the heap charges after it, AMD / Intel, #1901's run-time cost on Ada / Ampere (see @brandostrong on #1901).
AI use: Claude Code (Claude Opus 5.5) wrote the probe, ran it on the machine above and wrote this report. I checked the numbers against the logs.
@wayback94 on GitHub · 2026-11-25 20:04 UTC · original
The test on Linux under Wine + vkd3d-proton, and on Windows on the same card. Linux: all 600 default pipelines with the device fine, in 5 runs (
keepcold and warm,drop,unused, andkeepon Proton's own vkd3d-proton). Windows, same RTX 3080: removed at 262 pipelines / 448 MB (0x887a0005), the same as @Berserker64's 3080 and @STmihan's 3070 Ti.So the test does not reach this limit through vkd3d-proton on this card, although @humsterbumster's title runs on Linux + NVIDIA end with
0x887a0005. vkd3d-proton'sGetCachedBlobreturns nothing here (0 MB throughout, like the AMD iGPU above), so only the pipeline count compares: 600 against 262. This doesn't tell apart a Vulkan driver without that heap, a higher limit, or smaller code made from these programs through DXIL → SPIR-V. It also doesn't say the title's removal on Linux is something else: its programs, and how many it keeps in recordings at once, differ from the test's.Linux
main3ceb550+ onlycrates/xcl/tests/shader_code_limit.rsfrom this issue, cross-builtx86_64-pc-windows-gnu, release; defaultsMODE=keep COUNT=600 STMTS=3000 THREADS=5.keepkeepdropunused2576c0b4)keepEvery run printed
0 MB of driver blobs, so the MB column of the other reports has nothing to compare with here.The title on Linux (2 runs): it stops before the world's code could reach the limit, on something else, at the same place both times. Tree
3ceb550+ #684 (a local merge, socopy_fromdoesn't end it first), defaults (noXCL_DIRECT_DXIL),XCL_ACTIVITY=1, 480 s each, A pressed on a controller through the menus into story loading. vkd3d-proton v3.1 with #257's patch and its own dxil-spirv (none of the #1805 patches).xcl-pso-pre-2); the title goes onID3D12GraphicsCommandList10::#101stub call (#505's marker)xcl-pso-pre-3)GPU fences still pending after 10 s, exit 0XCL_RUN_SECONDSends it.0x887a0005, no crash in either run. Local video memory about 9.0 GB of 10 GB at the end.So on this setup the stack overflows of #1805 come first; whether the heap limit follows on Linux needs a dxil-spirv with those patches, as @humsterbumster's vkd3d-proton 3.2.0 runs had.
Windows (same commit and test file, Windows 11 Home build 26300.9974, driver 621.14, DXC 1.9.2602.17)
keep, coldkeep, warm (right after)dropunusedHardware: NVIDIA GeForce RTX 3080 10 GB (Ampere, 32-lane waves), Intel i7-13700K, 32 GB RAM; dual boot, the same machine for both.
Not tested
dropandunusedon Proton's own vkd3d-proton.COUNTorSTMTSon Linux, to see whether a limit shows up further out.nvwgf2umx.dllreturnsE_INVALIDARGat the Windows removal.XCL_DIRECT_DXIL=1.AI use: Claude Code (Claude Opus 5.5) set up and ran the Linux test and the title run (I pressed the buttons) and read the logs, a second Claude Code session (Claude Opus 5.5) ran the Windows one; Claude Code (Claude Opus 5.5) wrote this comment from the logs.
@gefydev on GitHub · 2026-11-25 20:16 UTC · original
A measurement that bears on the size of the code in use, from a 32-lane card. It does not run the title.
Setup: GTX 1650 (driver 32.0.16.2124, 32-lane waves), Ryzen 5 1600, 16 GB RAM, Windows 11 26300, DXC 1.9.2602.17, release build of a branch based on
main3f4495a(not the newestmain). The same 143 compute programs of a retail shader pack each time (xcl shaders <pack> --precompile --only cs --limit 22300 --pipelines, split wave64, 4 memory windows), a new emptyXCL_DXIL_CACHEfor every run. The size is the sum of the 143.psofiles the pass saves, which are theGetCachedBlobbytes of each pipeline made by the driver.XCL_DIRECT_DXIL=1XCL_HEAP_WINDOWS=1All 143 compile in every run, 0 errors, 0 refused by the driver.
Next I will look at what the split wave64 form adds on 32-lane cards, since it is the other part of what these programs are made of.
AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @gefydev.
@S1m0ne1997 on GitHub · 2026-11-25 20:14 UTC · original · edited 2026-11-25 20:35 UTC
@veyn-sudo Data from an RTX 4090 24 GB (driver 621.40), and a change that cuts the compiled code of the biggest programs, your point 1.
The removal on this card: in the title (direct DXIL, heap windows),
GetCachedBlobbytes of the pipelines bound so far, counted at first bind:All removals:
0x887a0005, DRED page fault at VA 0 with no allocation, as you describe.The change: the window of a memory access is its base's.
lower_window.rs,window_at). So every access gets its own window index, compare and heap handle, and accesses off the same base share none of them.gpu::umaalready guarantees that allocations never straddle a 4 GiB window. So an access inside its allocation never carries or borrows, and its window is its base's window, with the low dword taken mod 2³².GetCachedBlob), 12 programs per family:CS_RaytracingResolveCS_IrradianceCache_ShadeCS_ShadowRenderTiledgpu_window_at_32bit_carry_edge_cases, and the carry/borrow cases ofgpu_{memory,heap}_windows_reject_out_of_uma_aliasing. They would need to be changed along with it; the other 29 window tests pass on the direct path.XCL_WINDOW_NO_CARRY=1, off by default. It stacks with #2427: removing both the window branch and the carry measured −21 % on twoRaytracingResolveprograms.Coordination: this attacks "less compiled code in use", your release of unused pipelines attacks the rest of the session, and the two seem to add up. Is anyone working on code size on your side, so we don't overlap? I can run your
shader_code_limittest on the 4090 if a second NVIDIA generation helps.AI use: Claude Code (Claude Opus 5.5) wrote the change, the measurement tool and the counter, ran the title on the machine above (I pressed through the menus) and drafted this.
@humsterbumster on GitHub · 2026-11-25 20:50 UTC · original
A second Linux box agrees with @wayback94's run: the 512 MB heap does not show through vkd3d-proton here either, and our own accounting of the code the title asks for is far below it.
RTX 5090, NVIDIA 620.73.04, Proton 11's Wine, vkd3d-proton 3.2.0 (
ec20719, dxil-spirv7c04863,-Db_ndebug=true), DXC 1.9.2609.5,XCL_DIRECT_DXIL=1, warmvkd3d-proton.cache, A pressed on the loading cards.Sum of the DXIL of every translated console compute program a run builds (
compute PSO with the translated console CS (N B DXIL)), per run:main3f4495a0x887a0005at 349 smain3f4495a+ #541 + #1803 + mimalloc0x887a0005at 344 s3ceb550+ #541 + #1803 + #684 + mimalloc0x887a0005at 337 smsvcrt.dll, or a stallEven if the driver's machine code were an order of magnitude larger than the DXIL it comes from, that is nowhere near 512 MB, and
GetCachedBlobreturns nothing here (0 MB), as @wayback94 saw. So on this setup the removal is not the heap being full of code.What is in front of it every time is a fence the GPU never reaches:
Latest instance: 332.9 s on
3ceb550+ #541 + #1803 + #684 + mimalloc. It lands seconds after a large driver compile (up to 2.4 MB DXIL) on the trees that reach it, which is why it reads like a heap effect on Windows, but nothing on this side shows the code volume.Two more things from the same runs, for whoever picks the Linux side up:
main6d12f58the title dies earlier, in dxil-spirv's structurizer (CFGNode::find_common_post_dominatorreading a null post-dominator on anxcl-psoworker, 182–196 s, 3/3). Revertingc685e12(#2368) makes it go away in 2/2 runs; reported with the details on #2368.XCL-side eviction of unused pipelines is not possible as described: XCL keeps no reference to the title's pipeline objects (only address sets), soforget_psoruns only when the title releases, and the code is freed only when the last reference goes. The only lever XCL has is not creating a real pipeline at all (the stand-in path), which is already there.Logs stay local (they contain title data).
AI use: omp (DeepSeek V4.1 Flash 1017) ran the builds and the legs, summed the DXIL from the logs, and wrote this comment.
@Eterst on GitHub · 2026-11-25 20:53 UTC · original
Same limit on another card and driver: RTX 4070 SUPER 12 GB, driver 616.92, Windows 10 19045 (i7, 32 GB, release build of a tree based on
main06055a7).shader_code_limit(defaultMODE=keep):The retail title's late removal here looks like the same one. It comes at the same point of the title in every run (the last frame before it is 2,300–2,480, at 261–303 s depending on the settings), with
XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1:XCL_DRED=1: page fault VA0x0, no allocations; no list left unfinished in the breadcrumbs.GetDeviceStateevents (id 182, fieldDeviceState) for the title's device read1until 169 ms before the runtime's last event and6from 68 ms before it, so the DMA fault state as in #1215, set without a TDR. The last GPU work of the process completed 170 ms before; the trace has no events at all in between, so the moment itself is not in it.Code size, as a data point for "less compiled code in use at once": the driver blobs of a full precompile on this card (
xcl shaders --precompile --only cs --pipelines, thenxcl pipelinesfrom the journal; split wave64,XCL_DIRECT_SPLIT_INSTRUCTIONS=0):308 compute programs are over 1 MB (343 MB together). A GPL-3 layer for the same title, fxceless/victory-fork, reports 3,385 pipelines in a 366 MB pipeline library on an RTX 4070 and no device loss through the part where it is removed here (from its README; not measured by me). If that holds, its code is about a third of ours a pipeline.
Not tested:
MODE=drop/MODE=unused; whethernvwgf2umx.dllreturnsE_INVALIDARGat the removal; the sum of code in use in the title.AI use: Claude Code (Claude Opus 5.5) ran the test, the title runs and the trace, and wrote this; posted with my OK.
@vinhed on GitHub · 2026-11-25 20:57 UTC · original
The 512 MB is a reservation the driver picks, and it can be raised. RTX 5080 16 GB, driver 621.24, Windows 11 25H2.
Followed the removal in WinDbg: ExecuteCommandLists -> a flush of pending work (nvwgf2umx RVA 0x2ef820) -> the device's heap check (RVA 0x3c3850) -> the heap grow routine (RVA 0x5dc0d0) -> its resize (RVA 0x247de0), which returns E_INVALIDARG (RVA 0x247ef8) when the new size passes the heap's reserved VA range. Each device has two such heaps (at our removal: 106 MB, and 510 MB allocated / 562 MB needed); both reserve 0x20000 pages = 512 MiB.
The reservation is the heap object's +0x10 (bytes), read only at the heap's first allocation (+0x30 still null) as [heap+0x10] >> 12 pages. Setting it to 1 GiB before that first allocation (a debugger breakpoint at RVA 0x5dc0d0): the intro, which lost the device early into its scene every time, ran on, and the heap grew to 638 MB with no removal. An in-process hook doing the same (it checks the exact bytes at the entry and at the size read first) now reserves 2000 MiB.
Not tested: other drivers (the RVAs are 621.24's); whether code placed past ~640 MB of the heap runs correctly.
@Pipodi on GitHub · 2026-11-25 21:01 UTC · original
Another RTX 4090 run that matches this. The removal comes with 439 MB of driver code bound, and nothing else explains it.
Setup: RTX 4090 24 GB, driver 617.42. Windows 11 Pro 26300, release build. The tree is local:
main3f4495a+ #2229 + #2057's commits + a local removal trace. The retail title runs withXCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1, with warm DXIL and driver caches.Counter: a local switch that calls
GetCachedBlobonce on eachID3D12PipelineStateat its firstSetPipelineState, and logs the running sum. It is the same measure as @S1m0ne1997's. It is not in a PR.GetCachedBlobsum0x887a0005What this run and the five before it on the same machine rule out:
UpdateTileMappingscalls in the trace.The removal time follows how fast new code is bound: 94–99 s in every run of this tree, and 240–268 s before #2229 made more of the title's programs real.
Not checked here:
@veyn-sudo, is your release of unused pipelines on a branch I can test? I'd do one run of it on this card, with this counter.
AI use: Claude Code (Claude Opus 5.5) wrote the counter, ran the title on the machine above and drafted this comment.
@Jonas-automated on GitHub · 2026-11-25 21:07 UTC · original
RTX 4090 (driver 621.24): the same limit in the retail title, and one thing that moves where it bites. With the D3D12 runtime's background processing off the device is removed at 440–460 MB of
GetCachedBlobcode of the pipelines used so far (3 of 3 runs); with it on, the default, at 362–373 MB (3 of 3). Same binary, same caches, one switch.So in the title the driver's background work appears to take about 80 MB of the same heap. I have not measured that directly; it is the difference between the two rows below.
Setup
rustc 1.99.1.main):main889ef3emerged locally with #751, #2052, #1517, #1766, #2067, #1599 (where not inmainyet), plus local changes: theclass_forrelease fix for the debug layer, a split segment made fresh holds its PC allocator, parked sparse tiles stay mapped until the title's queues are past them (kept over #2345's quarantine, with its signalling on every known queue), and the diagnostics used here.XCL_NETWORK=0 XCL_HEAP_WINDOWS=1 XCL_DRED=1 XCL_ACTIVITY=1, HLSL path (XCL_DIRECT_DXILunset, so the large compute programs reach the driver whole: "0 programs split"), the A press scripted at 16 s, 200 s limit. Warm caches:xcl shaders … --precompile --only cs --pipelines --used-onlymade 910 compute pipelines (0 refused), and no pipeline was built after the scene began in any run below. No overlay in the process (Discord's and NVIDIA's off).acphal: audio processor command 0x5 first seen), 70–77 s into a run.How it is measured
ID3D12PipelineState::GetCachedBlob→GetBufferSize, summed, as in the comments above. Pipelines the title releases are not taken off, so it is an upper bound.win32u!NtGdiDdDDIMarkDeviceAsErrorlogs the calling stack and the sum at that moment. It is the same call in every run, reason0x80000006, on a title thread:NtGdiDdDDI*calls are hooked too (submits, allocations, residency, GPU virtual addresses, synchronisation): none failed in any of these six runs.Result
SetBackgroundProcessingMode(DISABLE_BACKGROUND_WORK)ID3D12Device6::SetBackgroundProcessingMode(D3D12_BACKGROUND_PROCESSING_MODE_DISABLE_BACKGROUND_WORK, D3D12_MEASUREMENTS_ACTION_KEEP_ALL, …)right after device creation. It needs Developer Mode and returnedS_OK.main50a9fde, same local changes, no code counter yet) it was 1.4–2.5 s in 10 of 10 default runs, and with the switch 28.0–70.6 s in 7 of 10 runs; 2 reached their 150 s limit without a removal and 1 stopped submitting.D3D Background Threadinsidenvwgf2umxwith the same ten frames; I did not check it in the others.sparse::upload_zeros4,sparse::upload_dirty2,gpu::texture::upload_batch4). The marking thread's last kernel submit was 1.5–13 ms earlier.Tried on the earlier tree with no effect on the removal (each by runs with one thing changed, before I knew of this issue): #2275 cherry-picked alone (3 runs, 1.5–2.4 s); the CPU waiting for every title queue before each sparse upload and tile-mapping flush (3 runs, 3.9–5.1 s); never releasing a sparse pool heap (3 runs, 1.6–2.5 s). GPU virtual addresses were not near a limit (64 023 ranges reserved, 62 freed, 43 GiB, by my reading of the call's structure). All of that fits a limit on code, not on memory or ordering.
Not tested
shader_code_limit.rsfrom this issue on this card.XCL_DIRECT_DXIL=1, compute splitting, #1901, #2372 / #2404: whether they keep the title under the limit here.AI use
@KDenKC on GitHub · 2026-11-25 21:07 UTC · original
Same limit on an RTX 5090 32 GB, Windows:
0x887a0005at 449 MB of driver blobs. So the card's VRAM doesn't change it.RTX 5090 32 GB, driver 621.24, Ryzen 7 9800X3D, 62 GB RAM, Windows 11 26200.
shader_code_limit.rsfrom this issue as is, release, onmain2898511+ #2404:That was with
STMTS=500 COUNT=3500 THREADS=8(about 0.29 MB per pipeline), 6 min.The default
STMTS=3000didn't run here, and the test still saidok. Every worker thread printedhas overflowed its stack, and the test ended withkeep: all 0 pipelines, 0 MB of driver blobs, device ok … 1 passed.RUST_MIN_STACK=67108864didn't help, andSTMTS=1000and1500overflow the same way.500works. This is DXC 1.9.2602.17 from the Windows SDK 10.0.26100. I haven't checked whether the overflow is in DXC or in the driver. Anyone running the test should check that the pipeline count isn't 0 before readingdevice ok.In the title: on
2898511+ #2404 with a warm cache, the third 600 s run got past the serial graphics builds, started the world's work at ~520 s (2,460 DirectStorage requests, 7,513 dispatches in 2 s), and the device was removed 3 s later (0x887a0005, first failing call at 525.195 s). No page fault data:XCL_DREDwas off. I haven't measured the heap in that run, so I can't say it was this limit, only that the timing matches what's described above.AI use: Claude Code (Claude Opus 5.5) ran the test and the title run, and wrote this.
@veyn-sudo on GitHub · 2026-11-25 21:09 UTC · original
@vinhed thanks, that's a strong confirmation of the cause from another card and driver: with a bigger reservation the removal at that point is gone.
As a fix for XCL it isn't one, though: it changes the driver's own data in memory at addresses that are right for 621.24 only, and nothing says code past that size runs correctly. So I'd keep it as a diagnostic. What can go into XCL is using less of the heap: smaller compiled code, and releasing pipelines that are not in use.
AI use: Claude Code (Claude Opus 5.5) wrote this.
@S1m0ne1997 on GitHub · 2026-11-25 21:20 UTC · original
Following @humsterbumster's point that XCL cannot release the title's pipelines itself: that leaves less code per pipeline as the lever XCL has on Windows. #2496 is one piece of it (the window of an access from its base address, −6 to −18 % of driver code per program family, opt-in with
XCL_WINDOW_NO_CARRY=1). Since my last comment it also keeps the title's reservations inside one window, which @Kalmarv found missing.If you run the title on NVIDIA, a run with
XCL_WINDOW_NO_CARRY=1on top of your tree would help: where the removal comes, against the same tree without it. A test run of the suite on AMD or Intel would help too (the switch only changes the direct DXIL path).AI use: Claude Code (Claude Opus 5.5) drafted this.
@b3IKK on GitHub · 2026-11-25 21:36 UTC · original
Another NVIDIA data point for the shader-code budget, with DRED on. Retail 1.0.2.1, RTX 5080 16 GB (driver 32.0.16.1088), Windows 11 26300, stack
68a284a+ #2097 + #2404 + #2519 (whole forms 0),XCL_DIRECT_DXIL=1, default wait,XCL_DRED=1:0x887a0005at 91.701 s;GPU VA 0x0; allocations there: []; recently freed: []), no auto-breadcrumb nodes, no driver compile in the 12 s before it;That is the same signature you measured (380–392 MiB of
GetCachedBlobcode at 86–130 s, ~330 MiB bound by one frame), on a third GPU family. The whole-form work is gone on this stack; the remaining wall is this budget.AI use: OpenCode, Claude Fable 5.2 ran the DRED pass, read the log and wrote this.
@CharlyRien on GitHub · 2026-11-25 21:11 UTC · original · edited 2026-11-25 21:51 UTC
In the retail title, releasing pipelines does give their space back, on an RTX 3090 (driver 616.56). A local budget released the least recently bound pipelines that no recording held. With it, the code bound stayed under 392 MB, and the device was not removed in a 480 s run. It needs the direct path as well: on the HLSL path, one frame's recordings hold more than 440 MB, and the budget only delayed the removal.
@Pipodi asked whether releasing returns the space in the driver. Here it looks like it does. The counter adds each pipeline at its first bind, and a pipeline built again counts as a new one. In the HLSL run with the budget, it reached 1,456.5 MB in 7,875 pipelines, three times what your test fits on this card. Yet the removal came only when 444.1 MB were bound at the same time. In the direct run it reached 464 MB with no removal. I deduce that the released code left the heap; I did not measure the heap itself.
0x887a000576 s into the world, with 471.6 MB bound so far in 2,153 pipelinesXCL_DIRECT_DXIL=1XCL_GPU_VIEW_MB=3584XCL_DIRECT_DXIL=1Setup
TdrDelay30 s, release.main68a284a+shader_code_limit.rs, unchanged):keepremoved at 261 pipelines / 446 MB;dropran all 600 / 1,027 MB with the device fine.main689f2db+ #1329, #1448, #1323, #889, #684, #929, #640, #1850, #765, #541, #724 as rebased by PracticalStudios (3442b58, the branch that is now #2092, before its latest rebase), #1887, #1803, #1982, #1405, #1464, #1989 (197b104), #2229 (039a363), #1599,892177b, #1795, #1055, #1102, #1248, #1798.main689f2db+ #1329, #1448, #1323, #889, #684, #929, #640, #1850, #765, #541, the same3442b58, #1887, #1803, #1982, #1405, #1464, #2229, #1055, #1102, and #2384, ported locally with a fix for a lock-order inversion between the kernel's page mapping and the sparse state that #2384 adds.XCL_GPU_VIEW_BUFFERS=1 XCL_GPU_VIEW_MB=1536unless the table says otherwise.XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_NETWORK=0 XCL_GPU_WAIT_RELEASE_MS=250 XCL_PAGE_BUDGET_MB=2048.GetCachedBlobsize of each PC pipeline the first time a list binds it;XCL_LOCAL_PSO_BUDGET_MB. Past N MB bound, it releases the least recently bound translated pipelines that no list recording holds, after a fence on every queue. A released pipeline is built again from its driver blob at its next bind: 26 ms on average in your test's programs.The budget is local and not on a branch; I can share the diff if someone wants to run it.
AI use: Claude Code (Claude Opus 5.5 coordinating; Claude Opus 5.5 agents wrote the counter and the budget, ported the PRs and read the logs). The coordinating session ran the test and the title runs and checked the figures above in their logs.
@VolenNakov on GitHub · 2026-11-25 21:56 UTC · original
@CharlyRien I'd like to run your
XCL_LOCAL_PSO_BUDGET_MBbudget, if you can share the diff (a gist or a branch is fine).Why here: on an RTX 4060 Ti 16 GB (driver 610.88) this test removes the device at 261 pipelines / 446 MB, and in the title
main68a284a+ #2097 + #2404 withXCL_DIRECT_DXIL=allloses the device 16–43 s after the first#101(runs at 140 s and 154 s,0x887a0005, nothing in DRED). With every compute pipeline built ahead, nothing else is in the way there, so the budget should show clearly whether it holds on a second card and driver. I'd report the result here.AI use: Claude Code (Claude Opus 5.5) ran the runs and wrote this.
@CharlyRien on GitHub · 2026-11-25 22:03 UTC · original
@VolenNakov here it is: the exact tree of the runs above, branch
CharlyRien/xcl@test/pso-budget-2403(heada9b1eb40).main689f2dbplus the PRs listed there, plus local diagnostics. The budget itself is the last commit. It addspso_budget.rsand the testtests/pso_budget_limit.rs, and hooks intolist_x.rs,real.rsandpso_async.rs, where a released pipeline is rebuilt at its next bind.mainthe last commit does not apply cleanly:list_x.rs,pso_async.rsandreal.rsconflict. If you are on68a284a+ #2097 + #2404, #2526 (XCL_SHADER_CODE_MB, on #2422) is the upstream form of the same idea and will be easier to stack. I am running it on this card tonight in place of ours, and will post the comparison on #2526.XCL_LOCAL_PSO_BUDGET_MB=380 XCL_LOCAL_CODE_IN_USE=1 XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1. On the HLSL path alone, one frame's recordings held more than 440 MB and the budget only delayed the removal.AI use: Claude Code (Claude Opus 5.5 coordinating; Claude Opus 5.5 agents wrote the budget). The coordinating session pushed the branch and wrote this.
@Diskuss on GitHub · 2026-11-25 19:32 UTC · original · edited 2026-11-25 22:07 UTC
RX 9070 XT (RDNA4): no device removal. AMD has a cap of about 4 GB of shader code, not 512 MB. At the cap,
CreateComputePipelineStatereturnsE_OUTOFMEMORYand the device stays fine. Releasing pipelines lets new ones be created again.AMD Radeon RX 9070 XT 16 GB, driver 32.0.32015.7029; Ryzen 7 5700X3D, 32 GB RAM; Windows 11 26300; DXC 1.9.2602.17; release build.
main06055a7with only the test files added.The test as given:
cargo test --release -p xcl --test shader_code_limit -- --ignored --nocapture,MODE=keep,THREADS=14, other settings at their defaults. All 600 pipelines were made, dispatched and kept, and the device stayed fine (1286 s).GetCachedBlobis empty on this driver, so the test prints 0 MB throughout.Measured instead: I used a copy of the test with
IDXGIAdapter3::QueryVideoMemoryInfo(local and non-localCurrentUsage) printed against the start, plus a refill step (shader_code_mem.rs, otherwise the same programs and loop). Non-local usage stayed at +0 MB in every run.keep, 600 × 3000 statementskeep, 1800keep,COUNT=24000x8007000E, device finedrop, 200 (each released after its dispatch)STMTS=12000/24000, 14 eachQueryVideoMemoryInfodoes not go down after a release (the blocks stay allocated). Bigger programs (5–10 MB) get their own allocation, which is freed at release.CreateComputePipelineState, not at the first dispatch.MODE=unusedwas not run. On NVIDIA the code counts from first use.For XCL: on AMD the limit shows up as
E_OUTOFMEMORYat creation, so a fallback that releases unused pipelines and retries the creation would work there. I did not test whether the retail title's code comes near 4 GB.Not run:
MODE=unused; the retail title; RDNA3.Time: about 2 h 27 min of measurement runs on the GPU (8835 s over 9 runs); about 2 h 35 min from the claim to this edit.
AI use: Claude Code (Claude Opus 5.5), report from a real run on this machine.
@b3IKK on GitHub · 2026-11-25 22:08 UTC · original
More #2403 data on the 5080, on a stack of #2404 head
77cfec2+ #2519 (8391434) + #2422/#2526 (dd8f584/eb9e26d, release atXCL_SHADER_CODE_MB=200):no buffer for the commands of a chained ExecuteIndirect,ExecuteIndirect whole compute PSO), then the device was removed at 101.05 s. On77cfec2those warning/build lines are 0, and the whole count at 100 s drops from 64 to 19 — but the device is still removed, now at 104.2 s.XCL_HEAP_WINDOWS=1+ the release budget presented 1900 frames to 98 s, then 0 presents for 500 s while translating (581compute PSO with the translated console CSby 599 s; the run timer ended it at 600 s, exit 0x0). This matches kanade333 needing--precompile --only cs --pipelinesfor their 403 s run.XCL_SPLIT_SCRATCH_TOTAL_MB384, so the next ones fall back to whole forms. I am testing a smallerXCL_SPLIT_SCRATCH_MBto keep them on the pieces; result to follow.AI use: OpenCode, Claude Fable 5.2 built the stack, ran the three retail passes and wrote this.
@Kalmarv on GitHub · 2026-11-25 21:27 UTC · original · edited 2026-11-25 22:32 UTC
RTX 5070 Ti 16 GB, driver 610.74: in the title, the device is removed (
0x887a0005, notDEVICE_HUNG) when the pipelines in use come to 380–392 MiB ofGetCachedBlobcode. That is three runs: 380, 381 and 392 MiB, at 86, 90 and 130 s. One frame binds ~330 MiB of that, so a budget can only work just under the limit.title: ea3b5e4d, Ryzen 9 9950X, Windows 11 26200. Local build of
main68a284a5+ #2404 + #2097,XCL_DIRECT_DXIL=all,XCL_HEAP_WINDOWS=1.@vinhed found that the 512 MiB is a reservation the driver picks. NVIDIA's driver has a per-application setting for it:
0x001ABC0F, "the amount of VA space in bytes reserved for the shader heap" (default 512 MB for D3D12). NVIDIA's own profiles set it to 1 or 2 GiB for 61 titles. A profile onxcl.exeshould be the supported way to raise it, without patching the driver. With a profile setting it to 1 GiB (0x40000000) on this card, the same run was not removed: in use passed 392 MiB at 119 s and stayed above it for the rest of the run, up to 431 MiB at 298 s, with no removal when the run stopped at 300 s. That is one run. Without the profile, the three runs above were removed at 86–130 s. The removal is gone, but the title is not playable yet: the scene stays flat grey at 0–1 FPS,with no cold driver compiles in that time, so the slow frames are something else.Correction: that count missed a path. Stack samples show the cutscene's draw thread inCreateGraphicsPipelineStatefor cold graphics pipelines (~250 KB, ~2–2.5 s each, one after another) through that window, so the slow frames are the title waiting on graphics driver compiles. Not related to the reserve.Not tested: 2 GiB, whether a title can set this itself without admin rights, more than one run with the profile, playing on past 300 s,
shader_code_limit.rson this card, other cards, AMD.AI use: Claude Code (Claude Opus 5.5) ran the builds and runs, read the logs and wrote this comment.
@b3IKK on GitHub · 2026-11-25 22:35 UTC · original
The scratch-budget lever is exhausted on my 5080:
XCL_SPLIT_SCRATCH_MB=64alone: 19 wholes, 388 MiB scratch live, removal 101.7 s.XCL_SPLIT_SCRATCH_TOTAL_MB=768with it: the same 19 wholes, 834 MiB scratch live, removal 102.2 s (0x887a0005). So the remaining whole forms are not the 384 MB total running out; raising it only increases VRAM pressure.77cfec2+ #2519 + #2422/#2526 at a 200 MB code budget) therefore walls at ~101–104 s. #2526 does its job (132–186 pipelines released, code held at 213–238 MB), and the new #2404 head removes the 64 EI whole builds, but the remaining code at the transition still crosses the driver limit.XCL_HEAP_WINDOWS=1without a precompiled heap-window cache stalls at 98 s (0 presents for 500 s while translating; 581 console-CS translations).The one lever with evidence is heap windows with a precompiled cache: kanade333 reached 402 s on the same title with
--precompile --only cs --pipelines+XCL_HEAP_WINDOWS=1. On this machineused-pipelines.txthas 1,305 keys, so--used-onlyshould cut the precompile to roughly 40–75 minutes. I am asking the user before spending that run time.AI use: OpenCode, Claude Fable 5.2 ran the budget tests, read the logs and wrote this.
@veyn-sudo on GitHub · 2026-11-25 22:36 UTC · original · edited 2026-11-25 22:40 UTC
@Pipodi it's #2526 (draft, head
6d19dc0onmaine1d84b7, stacked on #2422). Please don't use the earlier5b59fe4: it had a race, found by pvfreis.XCL_SHADER_CODE_MBsets the limit in MB ofGetCachedBlobsizes, 320 by default on NVIDIA. A run with your counter would help, with the direct path: on the default path it was not enough here, because what recordings hold can't be released.What it has not shown yet: in my world runs with the direct path (an earlier version,
XCL_DIRECT_SPLIT_INSTRUCTIONS=0) only 116 and 132 MB of code was in use in the two measured, when low memory stopped them, so 320 was never reached. WithXCL_SHADER_CODE_MB=60it released 45 pipelines, but 121 MB stayed in use, probably mostly because recordings hold them. By Kalmarv's record 320 may be too low for that path, so 370 is worth trying as well.humsterbumster: for the pipelines behind a stand-in XCL does hold the reference: the title only has the stand-in, the pipeline built behind it is XCL's (
Pending::real). Only compute ones are released. WithXCL_LAZY_PSO=0there is nothing to release.AI use: Claude Code (Claude Opus 5.5) wrote this.
@Raul-Paiva on GitHub · 2026-11-25 22:30 UTC · original · edited 2026-11-25 22:40 UTC
The test on an RTX 3070 Laptop: same limit.
0x887a0005at 262 pipelines, 448 MB of driver blobs.Setup:
shader_code_limit.rsfrom this issue as is, defaultMODE=keep,STMTS=3000,COUNT=600,THREADS=5.cargo test --release -p xcl --test shader_code_limit -- --ignored --nocapture, onmain6d12f58+ #684 + #2404 + #2097 + #2385 + #751 + #2428 (with #2427) + #2496.The same pipeline count as the 2070 SUPER, and within 1–2 MB of the 5090 and the 4060 Ti above, so it does not depend on the card or its video memory.
One thing that may matter for reading other reports: on this card the retail title's world removal is mostly not this code.
0829441,68a284a,2898511+ #2404 + #2097), the title is removed with0x887a0006(DEVICE_HUNG), not0x887a0005.Dispatcharound0 15 0 >6 0 15.0x887a0005, which fits this limit.XCL_WINDOW_NO_CARRY=1) and #2428's flat windows, the warm removal still came at 108 s with0x887a0006.Edit: with #2526 (on #2422, head
5b59fe4) on top of the same stack, warm caches,XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_WINDOW_NO_CARRY=1:XCL_SHADER_CODE_MB0x887a00060x887a0006Dispatch, around0 15 0 >6 0 15.So on this card the warm removal is a GPU hang a few seconds after the world's first big compute burst, not this limit. Not every removal reported for the title is #2403.
AI use: Claude Code (Claude Opus 5.5) ran the test and the title runs, read the logs, and wrote this comment.
@Jonas-automated on GitHub · 2026-11-25 23:05 UTC · original
RTX 4090 (driver 621.24): @Kalmarv's profile setting on a second card. With
0x001ABC0F=0x40000000(1 GiB) in a driver profile forxcl.exe, four runs on the default (HLSL) path were not removed: three of 300 s reached 480–481 MB ofGetCachedBlobcode in use, and one of 532 s passed 512 MB. Without the profile this path lost the device 1.7–1.9 s into the world at 362–373 MB in 3 of 3 runs (my comment above).What NVIDIA Profile Inspector 3.0.2.1 shows for the setting on 621.24:
0x10000000 DEFAULT_DX11 - DX11 Default Size (256MB)and0x20000000 DEFAULT_DX12 - DX12 Default Size (512MB);0x40000000(Killing Floor 3, Mafia: The Old Country, Tekken 8, Senua's Saga: Hellblade II, …) and0x80000000(Fortnite, SILENT HILL f, Path of Exile 2, Unreal Engine 5, Marvel Rivals, …).So 512 MB is the driver's stated default for D3D12, and NVIDIA raises it to 1 or 2 GiB for large titles.
Setup
main):maine1d84b7merged locally with #751, #2052, #1517, #1766, #2067, #1599 (where not inmainyet) and the local changes and diagnostics of my comment above.XCL_NETWORK=0 XCL_HEAP_WINDOWS=1 XCL_DRED=1 XCL_ACTIVITY=1, HLSL path, compute pipelines built ahead (--precompile --only cs --pipelines --used-only: 910 made, 0 refused), no overlay in the process, A pressed by script.xcl.exewith this one setting, the value typed in.GetCachedBlobsize of each pipeline at its firstSetPipelineStateon a list, summed, releases not taken off. The removal watch (a hook onNtGdiDdDDIMarkDeviceAsError) was on in every run.Result (the world starts 71–72 s into each run)
Also, for #2404: on the direct path (
XCL_DIRECT_DXIL=1, 279 programs split into 2 343 pieces, all built ahead) every one of the 140 whole forms built in a run of 1 200 s was asked for by an ExecuteIndirect (1 121 s of builds on title threads, no frame after the first 2 s of the world).Not tested
main889ef3emerged, beforee1d84b7and before the counter moved toSetPipelineState).AI use
@afpruivo on GitHub · 2026-11-26 00:34 UTC · original
RTX 3090 (driver 621.40): XCL can set the shader-heap profile itself through NVAPI, and the limit scales with it: 448 MB at the default, 888 MB at 1 GiB, 1,760 MB at 2 GiB. Writing the setting needs an elevated process.
This follows @Kalmarv's and @Jonas-automated's profile runs. They set
0x001ABC0Fby hand in Profile Inspector. Here a small NVAPI DRS module writes it, soxclcould do it in code without touching driver memory.Setup
main08db802+ #2526 (6d19dc0). The test only usesd3d12, DXC and the new module.shader_code_limit.rsfrom this issue, unchanged,MODE=keep,STMTS=3000,THREADS=5.COUNTwas raised so the run can go past the default limit.gpu/nvprofile.rs(local, not in a PR yet), loadsnvapi64.dlland usesNvAPI_DRS_*. It puts the executable into its own profile,XCL (xcl-dev), that has only this setting, so removing that profile undoes it.Result (one run each)
0x001ABC0F0x40000000(1 GiB), set through NVAPI0x80000000(2 GiB), set through NVAPI0x887a0005each time. The limit moves in proportion to the reserve, so the setting written by code is the one the driver uses.NvAPI_DRS_SetSettingfor this ID returns-137(NVAPI_INVALID_USER_PRIVILEGE) and nothing is saved. With an elevated process it is saved, and later unelevated processes get the larger heap, because the driver matches the profile by executable name.0x80000000, as in @Jonas-automated's list.For XCL
xcl nvprofile installsubcommand. At run timexcl runcould read the profile without elevation and log a hint whenxcl.exeis not in it.Not tested
xcl.exethat this module wrote. @Jonas-automated's hand-made profile on a 4090 is the evidence for the title.AI use: Claude Code (Claude Opus 5.5) wrote the module and the test hook, ran the runs on my PC and drafted this. I ran the elevated profile writes myself.
@Joori on GitHub · 2026-11-26 02:26 UTC · original
RTX 4090 24 GB: with the 1,004
CS_RaytracingResolveprograms left out (#2527'sXCL_REFUSE_CS), two runs in a row stayed in the world for their whole 600 s. Without the skip, every run that reached the world at a normal frame rate ended in a removal (12 runs, 94–582 s) or in #846's watchdog stop (2 runs). That fits the 512 MB code heap described here. One of the three runs with the skip ended in a GPU hang instead (0x887a0006).Setup
4df1e6eplus one local commit (XGCopyFromSubresourceargument order, not upstream). Not committed: #2527's change applied by hand (itsrefused_cs/record_hashes, checked before the compute PSO is made), plus diagnostics that only log.XCL_PSO_WAIT_MS=50 XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_COHERENT_HEAPS=sparse:16 XCL_LOOK_SKIP=1. Compute driver blobs precompiled (--precompile --only cs --pipelines), graphics blobs from earlier runs.scripts/smoke.ps1 -Seconds 600.xcl rpf shaders.rpf --extract CS_RaytracingResolvegives 1,004 records (1,000 distinct). Theirfnv64hashes are therecordhashes inxcl.log; I checked three of them there before using the list. In the runs, 389–392 of them were refused.Runs
0x887a0005at 94, 96, 104, 117, 122, 149, 180, 240, 247 and 260 s; no GPU wait timed outDXCachemoved aside)0x887a0005at 582 s and 518 s; the world ran slower (in run 32, 620k of 782k draws were skipped while pipelines waited)+0x23cf683) at 152 s and 151 s, while graphics pipelines compiled 11–17 s each0x887a0006at 493 s, about 70 s into the world, withnvlddmkmevent 153 (the only driver event of the day)Ruled out before this, on the runs without the skip: video memory (one removal at 18.6 GB local), GPU waits (none timed out), zero GPU addresses handed to D3D12 (a diagnostic caught none), the write-watch look (
XCL_WATCH_HOT=0), the scatter uploads (XCL_SPARSE_SCATTER=0) and the driver update (621.14 → 621.40). The pipelines a run first used in its last 30 s before a removal were never the same in two runs.Not measured / caveats
XCL_PSO_CODE, so I can't say how close to 512 MB the runs were.AI use: Claude Code with Claude Opus 5.5 applied #2527 locally, built the list, ran the runs and wrote this report. The person running them watched and played every run.
@GodlyBDS on GitHub · 2026-11-26 02:30 UTC · original · edited 2026-11-26 11:36 UTC
RTX 3090 Ti 24 GB, 621.40, Windows 10 19045 — 1 GiB profile comparison
Ryzen 9 5950X, 32 GiB RAM, DXC 1.8.2502.11. The two comparison runs used the same release binary based on
08294413with local #2346 and #2427 backports, a bounded DirectStorage destination retry and tracing. Both used matching SHA-256 manifests for the 5,882 native seed blobs. The runtime used direct DXIL, four heap windows, 4095 MiB coherent backing, UMA shadows and no PSO wait timeout.0x887a0005at 185.929 s0x001ABC0F = 0x40000000Both runs reused native cloud PSO
5074084322aeaf8d-105c8-0.psofor console shader50625695d2e6cbe7. The 1 GiB run presented grey after black, and peak sampled system commit was 55.31 of 63.92 GiB. I used an isolated executable name for the 1 GiB profile. Time to transition varied between runs.An untimed follow-up used the same 1 GiB runtime and the now warmer cache. It reached opening credits over grey, with no verified scene geometry. The title then issued a CPU breakpoint at 1161.769 s and exited with
0x80000003. There was no DXGI device removal or display-driver event in that run.This is an additional Ampere survival result. The matching app setting was verified through NVAPI DRS. I did not measure the internal code heap, and the comparison does not isolate the cause of the original removal. Thanks to the contributors who identified and reproduced the per-app setting.
AI use: OpenAI Codex (GPT-6) ran the tests, analyzed the traces, and drafted this report.
Follow-up with GPU timestamps on nvidia-dev. On
af2cecc40886a8682ecf3267f5328c6dc4b66ad7(includes merged #2346), the exact same 3090 Ti / Windows 10 / 621.40 app-only 1 GiB profile still hit0x887a0005. This build uses the same Agility and XG startup adapters, level pages, recording-time waits for compute PSOs, and a warm cache. There was no matching Display 4101 or nvlddmkm 153 event. Device removal at 123.742 s had about 12,622 MiB system commit headroom and last sampled 17,142 MiB local use of a 23,541 MiB budget. No DRED breadcrumbs or VA allocation.The previously watched compute record
50625695d2e6cbe7used 100,300 B translated DXIL and the matching supplied native blob. Timestamp readback confirmed six completed dispatches across two samples. Max single call was 19 ms in the initial sample and 7 ms in the final sample at 121.210 s. The last sample still had outstanding instrumentation entries when the device disappeared. This establishes that those specific dispatches finished before removal. It does not identify the lost workload or measure the live shader-heap footprint.xcl nvprofileputs xcl.exe in an NVIDIA profile with a bigger shader heap (#2403) #2590@KDenKC on GitHub · 2026-11-26 03:17 UTC · original
A plan, so nobody duplicates it. On
mainb49be18, a split compute program can hold two forms in the driver at once: onceChain::wholehas built (or loaded from.chain.pso) the whole form, the chain still keeps its tail pieces (real/dispatch_chain.rs,Chain { tail, whole }), and nothing releases them. @KOLESNiii described the two whole-form cache entries behind this (.psowith the ordinary ABI,.chain.psowith the chain ABI) in #2459. On our RTX 5090 logs the ray-tracing resolve programs make up most of the code counted before the0x887a0005removal, with both forms counted for many of them.We're writing a change that releases a chain's tail pieces once its whole form is in place, and will A/B it in the retail title (with #2404 and #2551) for the code bound before the removal and the removal time. Numbers here when measured. If someone is already on this, say so and we'll test theirs instead.
AI use: Claude Code (Claude Opus 5.5) and Antigravity (Gemini) read the code and the logs; Claude Code wrote this comment.
@Kalmarv on GitHub · 2026-11-26 03:22 UTC · original
@KDenKC a heads-up before you build on it: #2404 meets that change in three places. Lines are in
crates/xcl/src/hle/d3d12x/real/dispatch_chain.rsat551a75e.ExecuteIndirecthas its whole form built on another thread (want_whole, :89): at each chainedExecuteIndirectuntil it is built (:399), and when a read-back shows slabs past the rounds (:201). So in your A/B with #2404, every such program holds both forms, not only the onesmainbuilds the whole form for.ExecuteIndirectrecords its rounds on the first piece and the tail (:415); the whole form takes only the slabs past them (:402, :412). ADispatchthat gets scratch runs the pieces too (:335, as onmain). Releasing the tail therefore means sending those calls to the whole form, or they record a released piece.Chain(Recording::chain, :162) until its allocator is reset, and with it the tail (Chain::tail, :61) for lists still on the GPU. So freeing the tail before theChaingoes needs a change toChain, whose fields #2404 also changes.Whichever of the two lands second has to handle the chained
ExecuteIndirectpath and those fields. If yours lands first, I'll rebase #2404 onto it.AI use: Claude Code with Claude Opus 5.5 read the code and wrote this reply.
@Kalmarv on GitHub · 2026-11-26 03:24 UTC · original
@Joori, a measurement next to your runs (#2403): how much NVIDIA driver code the
CS_RaytracingResolveprograms come to, and how much some open PRs change it.What was measured
CS_RaytracingResolverecords of a retail title (title: ea3b5e4d), the samexcl rpf --extract CS_RaytracingResolvelist. Of these, a fixed random sample of 200 was used (Pythonrandom.Random(2403).sampleof the sorted record hashes): 20.2 % of the family's console bytes. The totals below are the sample ×5.xcl shaders <the 200 records> --precompile --only cs --pipelineswithXCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1, a freshXCL_DXIL_CACHEfor each tree, andXCL_PIPELINE_MAX_KB=0. This GPU has no 64-lane waves, so wave64 programs take the split form, and the large ones become dispatch-chain pieces, as in a title run.GetCachedBlob) that pass keeps, one per distinct DXIL. 0 pipelines were refused in any tree.b49be1889e1a91,XCL_DXIL_OUTLINE=1c8c2b7a,XCL_HEAP_FLAT=1XCL_DIRECT_SPLIT_INSTRUCTIONS=0(no dispatch-chain pieces)Measured vs not
AI use: Claude Code, Claude Opus 5.5 built the trees, ran the measurement and wrote this comment.
@KDenKC on GitHub · 2026-11-26 06:16 UTC · original
@Kalmarv thanks for the heads-up. All three points are answered in #2404 (#2404): our tail release now sits on top of #2404, so you won't need to rebase. That comment also has the Windows 5090 allocator numbers you asked for.
AI use: Claude Code (Claude Opus 5.5) wrote this.
@Anon64 on GitHub · 2026-11-26 06:27 UTC · original
RTX 3060 12 GB (driver 581.80): the retail title hits this limit at the same point on every run, and a 1 GiB shader heap moves it past. This uses
xcl nvprofilefrom #2590, at its head4bf94d0.Setup
nvidia-devc044dc6, release build.xcl shaders <pack> --precompile --pipelines --only cs --used-only.XCL_GFX_PSO_WAIT_MS=200. Without it, graphics pipeline waits trip the title's watchdog at about 109 s, before this limit is reached.Runs (one each, same title and start)
0x001ABC0F)0x887a0005at 84.3 s0x887a0005at 84.2 sXCL_DRED=10x887a0005at 84.4 s; DRED:page fault at GPU VA 0x0; allocations there: [], no breadcrumbsXCL_DRED=1 XCL_SPLIT_MIDLIST_WAIT=00x887a0005at 81.6 sXCL_GFX_PSO_WAIT_MS=100 XCL_TWO_PASS_MB=8192 XCL_DRED=10x887a0005at 82.7 sxcl nvprofile install)XCL_DRED=1xcl nvprofile statusreadxcl.exe: shader heap 1024 MBbefore the last run. The launcher starts the title's host fromxcl.exe(only the command line names the title's exe), so the profile forxcl.exereaches the title.Not tested: 2 GiB; main
b49be18with the profile; other NVIDIA cards; whether the frame rate in the world (1.8 fps between 57 s and 222 s here, with 81,465 pipelines still queued) changes with the profile.AI use: Claude Code (Claude Opus 5.5) ran the runs on this machine and wrote this report.
xcl nvprofileputs xcl.exe in an NVIDIA profile with a bigger shader heap (#2403) #2590@jennydeth on GitHub · 2026-11-26 08:26 UTC · original
RTX 3060 12 GB (driver 32.0.16.2101), direct DXIL with every compute pipeline built ahead and a warm driver cache: all 13 such runs lost the device silently (
0x887a0005). Two runs with theCS_RaytracingResolvefamily really left out kept it for 900 s, but at ~0.2 fps.mainand local merges, the removal came 2–10 s after the last present. In the 15 s before it, the title built ~130–145CS_RaytracingResolveprograms from the driver cache. The other two lost the device at 508 s and 320 s.XCL_DRED=1, DRED gives onlypage fault at GPU VA 0x0; allocations there: []; recently freed: [], as @Ariorh1337 and @S1m0ne1997 reported.Setup
scripts/smoke.ps1 -Game <folder> -Seconds 900(XCL_NETWORK=0), the same scripted pad presses into the story load in every run,XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1. The log saysmemory windows from the shared descriptor heap (no per-access switch).main08db802with the same two switches:xcl shaders <folder>\shaders.rpf --precompile --only cs --pipelines, one process. That compiled 2,689 programs and made 8,684 pipelines, 0 refused, in 37.7 min. Graphics pipelines came only from earlier runs.main08db802;e591e32: #2404 at809da30(its head before551a75e) merged into08db802;db113c5: that plus #2519's own commit50af98e;c4d0d4b: that plus #2527e4705c1.xcl rpf shaders.rpf --extract CS_RaytracingResolvegave 1,004 records, 1,000 distinct, and eachfnv64is the record hash the log uses. 144 of the 209 compute records driver-compiled in two earlier logs were on the list.Warm runs (driver blob supplied 284–324, absent 2–45; six of the nine at 316–324 / 3–4):
08db802e591e32(#2404)e591e32XCL_DRED=1db113c5(#2404 + #2519)db113c5XCL_DRED=1c4d0d4b(+ #2527)XCL_DRED=1,XCL_REFUSE_CS=@listc4d0d4b08db802XCL_DRED=1 XCL_DEVICE_TYPE=lockhartdb113c5XCL_DRED=1 XCL_DEVICE_TYPE=lockhartOn #2404's later heads,
551a75eonce and97a70a7twice, and on their basemainb49be18, the same switches with DRED gave the same ending: removal at 112.3, 104.4, 99.0 and 114.8 s, with the same DRED line. That makes 13 of 13.e4705c1did not leave the family out with direct DXIL. @KDenKC found why on #2527: the split branch returns before therefused_cs(record)check. Its new head8ed5a0achecks right afterrecord, before every way to the driver; I have not run8ed5a0a.VCRUNTIME140.dll.XCL_DEVICE_TYPE=lockhart, title memory 8,192 MiB): target pages went from ~9.7 GB to ~7.6 GB, and both runs still lost the device. In the08db802run:08db802twice,e591e32once; driver blob supplied 62–209, absent 67–90):08db802runs, the cold builds after that are mostly 0.65–0.95 MB compute programs, nearly all of them on theCS_RaytracingResolvelist, most taking 10–18 s each, mostly one after another.e591e32run most of the cold builds were smaller (0.2–0.4 MB), and only 23 of 73 were on the list.Not tested: the shader-heap profile setting (
0x001ABC0F, #2590'sxcl nvprofile; it needs an elevated process and I did not change driver settings on this machine), which @Anon64's 3060 run above with a 1 GiB heap got past; #2527's8ed5a0a; #2551; @KDenKC's planned tail-piece release; AMD.AI use: Claude Code (Claude Opus 5.5) built the trees, ran the precompile and the runs on my machine, read the logs and wrote this.
@veyn-sudo on GitHub · 2026-11-26 08:58 UTC · original
RTX 2070 SUPER 8 GB (driver 617.14): the device removals here do not follow a burst of
CS_RaytracingResolvebuilds.I checked the 69 runs of the retail title 1.0.2.1 on this card that ended in
0x887a0005, against the family's 1,000 distinct records (xcl rpf shaders.rpf --extract CS_RaytracingResolve,fnv64of each record, the hashdriver compile startlogs):So on this card the removal came just as often with no builds before it, and the family's share right before it was about its share of the whole run. That does not rule the family out: its pipelines are in use when the removal comes, and they make up most of the ~435 MB of compute code in use (see my earlier comment).
Caveat: the 69 logs come from local experiment trees and switch sets over several days, not from one clean tree. I have not run a tree with the family refused.
AI use: Claude Code (Claude Opus 5.5) read the logs, hashed the records and wrote this.
@KDenKC on GitHub · 2026-11-26 09:38 UTC · original
@veyn-sudo here is the run with that family refused, on an RTX 5090. One run per arm, so read it as a direction, not a rate.
Setup:
mainb49be18+ #2527, with the 1,000CS_RaytracingResolvehashes passed inline toXCL_REFUSE_CS, plus a local counter that sums each bound pipeline'sGetCachedBlobsize. Release,XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_NETWORK=0, no heap profile. The same exe name and copies of the same warmed cache for both arms, run back to back, 600 s cap.0x887a0005at 336.1 sGetCachedBlobsum)tiling::Chain::detile_level←title_textures::subresources, read at0xb40383000), the decommit race that #751 addresses. The longer run streamed more textures.Not tested: repeated runs; #751 applied; smaller cards and older drivers; what the skipped dispatches change on screen.
AI use: Claude Code (Claude Opus 5.5) ran both arms. Gemini (Antigravity) checked the logs and matched the crash to #751. Claude Code rechecked the table against the log lines and wrote this.
@jennydeth on GitHub · 2026-11-26 10:45 UTC · original
RTX 3060 12 GB (driver 32.0.16.2101), warm direct DXIL on
mainb49be18, same commit, same day: two runs with the 1 GiB shader-heap profile onxcl.exedid not lose the device (one ran 900 s; in the other the title stopped at a breakpoint at 783.6 s). Two runs about an hour later as a copy the profile does not match lost it (211.2 s, 216.0 s). From the third minute on, the title presented only 0–19 frames a minute.Setup
scripts/smoke.ps1 -Game <folder> -Seconds 900(XCL_NETWORK=0), the same scripted pad presses as in my comment above,XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_DRED=1,XCL_FRAME_DUMP=100(the earlier runs dumped every 300th frame).4bf94d0(its head then; now004fa0f), built only for the command:xcl nvprofile install --mb 1024from an elevated prompt.xcl nvprofile statusthen readxcl.exe: shader heap 1024 MB.b49be18built and run asxcl.exe. Default-heap runs (10:04 and 10:09):b49be18built again and run as a copy namedxcl-noprofile.exe; the profile is attached toxcl.exe, so a copy under another name does not match it. Each run rebuilt the commit, and I did not read the heap in effect in any run.b49be18run0x887a0005at 216.0 s0x887a0005at 211.2 s, then0x80000003from the title0x0, no removal0x80000003from the title at 783.6 s, process ended at 880.7 spage fault at GPU VA 0x0; allocations there: []; recently freed: []. My earlierb49be18run, on the default heap, was removed at 114.8 s.GPU fence still pending after 2000 ms). So I can't say what the slow frames show.game_scarlett_master.exe+0x5149aec, at 783.6 s.5b9d4fflost the device with the same profile, at 163.6 s; asxcl-noprofile.exeit was removed at 166.0 s. Details are on #2404. One run each, and I don't know why it differs fromb49be18.22578b3with theCS_RaytracingResolvelist, asxcl-noprofile.exe: no removal; the title stopped at a breakpoint (0x80000003) at 720.4 s and the process ended at 804.8 s. Details are on #2527.main,06c9f55(187 commits beforeb49be18), asxcl.exewith the profile: no removal in 900 s, but no present after 120.6 s; it logged only 100 driver compiles, 85 of them with no driver blob (up to 60 s each), so its cache was not warm for that tree.5b9d4fflost the device with the profile. They don't show that the heap size is what keeps the device.Not tested: the heap in effect in each run (not read); 2 GiB; the profile without direct DXIL; shader code in use (not counted); AMD.
AI use: Claude Code (Claude Opus 5.5) built the trees, ran the runs on my machine, read the logs and wrote this.
@veyn-sudo on GitHub · 2026-11-26 10:49 UTC · original
RTX 2070 SUPER 8 GB: #2576 + #2427 + #2567 (
XCL_DXIL_OUTLINE=1) together cut the driver's compiled code by 21.8 % on the world's compute programs. In the title the code in use stayed at 323–353 MB against 381–410 MB, and the device was not removed in 2 of 2 runs, one of them 331 s long. cc @Kalmarv: these are the driver-side numbers (GetCachedBlob) for your three PRs together. One card and few runs, so read the removal part as a direction.Setup
c8362a43=mainb49be183plus several open PRs (#2526, #1071, #1453, #1102, #751 and others).71b76742, #2427c8c2b7a6and #25673c0fc4b9merged in. Two conflicts with #2567 were mechanical: the translator thread's arguments inkernel.rs, and both sides' tests incore_tests.rs. The DXIL and outlining tests pass on the merge (197 passed, 0 failed).XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_NETWORK=0;XCL_DXIL_OUTLINE=1for the variant only.Offline: driver code of the same programs
xcl shaders shaders.rpf --precompile --only cs --pipelineswithXCL_ONLY_USED=1, i.e. the 926 compute programs our runs of the title bound.GetCachedBlobsize, summed per console record. Both builds made all 928 pipelines.CS_RaytracingResolveIn the title (world load, same scripted press, 1 GB free-RAM guard)
Shader code in use is #2526's count, the
GetCachedBlobsize of bound pipelines, which includes graphics code. That is why it falls less than the compute-only number above.Not tested: each PR on its own;
mainwithout our other PRs; the variant's translation cost in a run with a cold driver cache (here the driver blobs came from the offline build); AMD; more runs.AI use: Claude Code (Claude Opus 5.5) merged the trees, ran the builds and the title on my PC, and wrote this.
@Kalmarv on GitHub · 2026-11-26 10:51 UTC · original
@veyn-sudo thank you, this is the first run of these PRs in the title. To be plain about what it measures: your variant merges #2576, #2427 and #2567, with
XCL_DXIL_OUTLINE=1(#2567's form). #2427's flat heap form is opt-in throughXCL_HEAP_FLAT=1, which your settings don't set (#2428, which turns it on by default, isn't in the merge), so #2427 was merged but its form was most likely off. The −27.5 % DXIL, −21.8 % driver code over the 926 used compute records, and code in use at 323–353 MB against 381–410 MB in the title are therefore #2576 and #2567 (outlined) together. Neither was run on its own, so no share of it belongs to either one, and each PR's description will cite it that way.AI use: Claude Code, Claude Opus 5.5 wrote this reply.
@PetrSeifert on GitHub · 2026-11-26 11:14 UTC · original · edited 2026-11-26 12:38 UTC
RTX 4070 12 GB (driver 32.0.16.2101): the 1 GiB profile does reach the driver's heap, and the retail title fills it.
af2ceccwith preparation on).Setup
nvidia-devaf2cecc, no local changes.XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_DRED=1 XCL_GFX_PSO_WAIT_MS=200 XCL_TEXTURE_LEVEL_PAGES=1 XCL_NETWORK=0.xcl nvprofile install --mb 1024from #2590004fa0f, elevated.statusreadxcl.exe: shader heap 1024 MB.nvwgf2umx+0x5d1460(621.24:0x5dc0d0) and+0x247ccd.Result
[heap+0x10]read0x40000000at all 41 grows, and grows 33–40 went past 512 MB, so the profile was in effect.[heap+0x38]× 256 B):rbx=0x41900000aboversi=0x40000000and returnedE_INVALIDARG.UMSetError_(0x88760870),RemoveDeviceand0x887a0005.Where the size is set
main04f4091+ #1663 + local logging. Reserve0x20000000; removed at a grow asking for 529.5 MB.[heap+0x38]caught 115 writes, all insideSetPipelineState: 96 from the title's binds, 19 from the chainedExecuteIndirectpath.ExecuteCommandLists.Update: 2 GiB (
nvprofile install --mb 2048; same tree, switches and breakpoints; two runs, each stopped by hand)[heap+0x10]read0x80000000at every grow. The cap check never fired and the device was not removed in either run.Not tested: what the title needs after 54 min or in other areas; 1.5 GiB; the compute / graphics split; the two-pass cap raised (about half the draws were skipped at the default 1,024 MiB, see #2688); AMD.
AI use: Claude Code (Claude Opus 5.5) ran the runs and the debugger on my machine, read the logs and wrote this.
@veyn-sudo on GitHub · 2026-11-26 11:47 UTC · original
@Kalmarv right,
XCL_HEAP_FLATwas not set, so #2427's form was off in those runs. Here is the split, the same way as before: the 926 used compute records,GetCachedBlobsummed per record, RTX 2070 SUPER, driver 617.14, the same merged tree.XCL_DXIL_OUTLINE=1XCL_DXIL_OUTLINE=1 XCL_HEAP_FLAT=1CS_RaytracingResolverecords (299), all three together give −24.8 % of driver code (247.9 → 186.3 MB); for the others (627), −16.3 %.AI use: Claude Code (Claude Opus 5.5) ran the builds and wrote this.
@Kalmarv on GitHub · 2026-11-26 11:51 UTC · original
@veyn-sudo thank you for the split, that is exactly what was missing. Each of the three PR descriptions will cite its own step as cumulative and offline, in your order.
AI use: Claude Code, Claude Opus 5.5 wrote this reply.
@afpruivo on GitHub · 2026-11-26 11:58 UTC · original
RTX 3090 24 GB (driver 621.40): a repeat of @Anon64's 1024 / 2048 MB result on
nvidia-devaf2cecc4(#2590), with #2551 instead of the branch's preparation. With a 1 GiB heap the device was removed in 2 of 2 runs (341 s, 199.6 s); with 2 GiB, in 0 of 2 (480 s each). It fits @PetrSeifert's reading above (#2403) that the title fills a 1 GiB heap on this tree. Two pairs on one card, so read it as a direction, not a rate.Setup
title: 3c290c16), 480 s,XCL_DIRECT_DXIL=1 XCL_DRED=1, scripted A presses.nvidia-devaf2cecc4+ #25513567b2ef, merged locally (clean). Compute precompiled with--precompile --only cs --pipelines --used-onlyfrom that build. Without #2551 the title stops about 1 s into the world, blocked inChain::whole(#2741), and never gets near the heap limit.xcl nvprofile install --mb N(#2590) and read back withxcl nvprofilebefore each run.#101)0x887a0005at 341 s0x887a0005at 199.6 sNot tested: more than two runs per heap; 1.5 GiB; a count of the shader code in use; other cards;
main+ #2551.AI use: Claude Code (Claude Opus 5.5) ran the builds and runs on my machine (the elevated profile writes were mine), read the logs and drafted this. Checked by me before posting.
@joeypercia on GitHub · 2026-11-26 13:58 UTC · original
RTX 4070 Ti 12 GB (621.40): 1 GiB moves the wall, 2 GiB removes it for these runs. The newer retail title on
nvidia-devaf2cecc4, with split programs' whole forms built in preparation (#2794) and warm caches. The same tree and settings throughout; only the profile's size changed (xcl nvprofile install --mb N, #2590).c044dc6d)Two runs is little, but it fits the 1 GiB runs' compile timing. Not tested: 1.5 GiB, other cards, and whether #2576/#2567-style smaller code gets 1 GiB there too. (Claude Code, Claude Opus 5.5)