NVIDIA 621.24 refuses heap-window compute programs with many memory reads (E_OUTOFMEMORY, #680) #756

Closed
opened 2026-11-26 04:31:27 +00:00 by github-bot · 1 comment
Owner

@⁠CowboyBingus on GitHub · 2026-11-24 04:44 UTC · original

With the heap-window form of #680, NVIDIA's driver refuses a small group of a retail title's compute programs with E_OUTOFMEMORY, at once and every time. They are not the biggest programs: what they have in common is many memory reads through the heap windows. I'm working on the cause and a fix in how heap-window accesses are emitted, as a PR on top of #680.

Measured (RTX 5070 Ti 16 GB, driver 621.24, Ryzen 7 9800X3D, Windows 11 26300, DXC 1.8.2502, release; #680's head 1ad9343 merged onto main f4ce27c)

xcl shaders shaders.rpf --precompile --pipelines --only cs on a retail title's pack (1.0.2.1), own DXIL cache, 4 driver threads:

  • 725 compute pipelines made, 5 refused, all 0x8007000E, the same 5 again on a second run (they fail within seconds, no memory pressure): one shader family, CS_ResolveToGBufferTiled_1/3/5/7 and CS_ResolveToMirrorGBuffer (91 – 99 KB of DXIL). Hundreds of larger programs build.
  • Compared with an accepted 88 KB program of the same pack (dxc -dumpbin): rawBufferLoad 370 / 385 vs 25, createHandleFromHeap 88 / 95 vs 17, annotateHandle 132 / 149 vs 33.
  • The heap form itself is much faster here: 639 compute pipelines in ~7 min on 4 driver threads, against ~300 in ~17 min on 8 threads for the switch form (main).

Hypothesis (not confirmed): every access looks its window up in the heap with a non-uniform index, so the driver tracks one dynamically indexed handle per access; past some number of those it gives up and reports out of memory. Whether this is also behind the 0xc0000409 "Invalid record" abort reported on #680 (RTX 4090, same driver) is not known.

Plan: a minimal repro from one of these programs, then an emit change (for example one handle per window per program instead of one per access) and a PR stacked on #680, with the refused programs as the check.

AI use: investigation and this write-up with Claude Code (Claude Opus 5.5), from runs on the hardware above.

**@⁠CowboyBingus** on GitHub · 2026-11-24 04:44 UTC · [original](https://github.com/xcl-dev/xcl/issues/756) With the heap-window form of #680, NVIDIA's driver refuses a small group of a retail title's compute programs with `E_OUTOFMEMORY`, at once and every time. They are not the biggest programs: what they have in common is many memory reads through the heap windows. I'm working on the cause and a fix in how heap-window accesses are emitted, as a PR on top of #680. **Measured** (RTX 5070 Ti 16 GB, driver 621.24, Ryzen 7 9800X3D, Windows 11 26300, DXC 1.8.2502, release; #680's head `1ad9343` merged onto `main` `f4ce27c`) `xcl shaders shaders.rpf --precompile --pipelines --only cs` on a retail title's pack (1.0.2.1), own DXIL cache, 4 driver threads: - 725 compute pipelines made, 5 refused, all `0x8007000E`, the same 5 again on a second run (they fail within seconds, no memory pressure): one shader family, `CS_ResolveToGBufferTiled_1/3/5/7` and `CS_ResolveToMirrorGBuffer` (91 – 99 KB of DXIL). Hundreds of larger programs build. - Compared with an accepted 88 KB program of the same pack (`dxc -dumpbin`): `rawBufferLoad` 370 / 385 vs 25, `createHandleFromHeap` 88 / 95 vs 17, `annotateHandle` 132 / 149 vs 33. - The heap form itself is much faster here: 639 compute pipelines in ~7 min on 4 driver threads, against ~300 in ~17 min on 8 threads for the switch form (`main`). **Hypothesis (not confirmed):** every access looks its window up in the heap with a non-uniform index, so the driver tracks one dynamically indexed handle per access; past some number of those it gives up and reports out of memory. Whether this is also behind the `0xc0000409` "Invalid record" abort reported on #680 (RTX 4090, same driver) is not known. **Plan:** a minimal repro from one of these programs, then an emit change (for example one handle per window per program instead of one per access) and a PR stacked on #680, with the refused programs as the check. AI use: investigation and this write-up with Claude Code (Claude Opus 5.5), from runs on the hardware above.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:31:27 +00:00
Author
Owner

@⁠CowboyBingus on GitHub · 2026-11-24 05:06 UTC · original

Closing: on this machine the refusals are harmless and the driver abort did not happen.

  • A world-load run with #680 (1ad9343 on f4ce27c, same hardware as above, its own shader cache warm for ~825 compute programs) refused one heap-form pipeline in game at 105 s, #680's fallback built it in the switch form, and there was no 0xc0000409: the run ended at 110 s in the title's watchdog (+0x23cf683), as plain main does at ~106 s.
  • The refusal is not about the number of heap-window accesses: a synthetic compute program with 384 of them builds in 0.7 s, and removing NonUniformResourceIndex (windows and textures) or globallycoherent from the refused program does not change the refusal. It is refused in 0.01 s, before any compile. I did not find the construct; with the fallback it costs ~2 s per program.
  • So the "Invalid record" abort reported on #680 (RTX 4090) did not reproduce on an RTX 5070 Ti with the same driver (one run).

AI use: Claude Code (Claude Opus 5.5), from runs on the hardware above.

**@⁠CowboyBingus** on GitHub · 2026-11-24 05:06 UTC · [original](https://github.com/xcl-dev/xcl/issues/756#issuecomment-7122630206) Closing: on this machine the refusals are harmless and the driver abort did not happen. - A world-load run with #680 (`1ad9343` on `f4ce27c`, same hardware as above, its own shader cache warm for ~825 compute programs) refused one heap-form pipeline in game at 105 s, #680's fallback built it in the switch form, and there was no `0xc0000409`: the run ended at 110 s in the title's watchdog (`+0x23cf683`), as plain `main` does at ~106 s. - The refusal is not about the number of heap-window accesses: a synthetic compute program with 384 of them builds in 0.7 s, and removing `NonUniformResourceIndex` (windows and textures) or `globallycoherent` from the refused program does not change the refusal. It is refused in 0.01 s, before any compile. I did not find the construct; with the fallback it costs ~2 s per program. - So the "Invalid record" abort reported on #680 (RTX 4090) did not reproduce on an RTX 5070 Ti with the same driver (one run). AI use: Claude Code (Claude Opus 5.5), from runs on the hardware above.
This discussion has been locked. Commenting is limited to contributors.
No description provided.