UMA: a learned Series S coherent-window size makes later Series S runs crash at ~37 s #3568

Open
opened 2026-12-01 12:24:42 +00:00 by throny · 4 comments
throny commented 2026-12-01 12:24:42 +00:00 (Migrated from github.com)
Contributor

Imported from ivall/xcl. Originally posted by throny on 2026-12-01T12:24:42Z.


On an RTX 4080 16 GB (621.40), main 9dfbe3ea (and 9dfbe3ea + #3156), retail title, XCL_DEVICE_TYPE=lockhart with the run settings we use for NVIDIA (XCL_UMA_WINDOWS=16 XCL_UMA_DRIVER=mixed:1536:1792, …):

  • The first Series S run had no cache\uma_coherent_lockhart.txt, got a 512 MB coherent window and ran 2,630 s without a crash (run 367).
  • That run stored a size in uma_coherent_lockhart.txt; every later Series S run opened a 3407 MB coherent window (mixed heaps: 1536 MB CUSTOM + 1792 MB GPU_UPLOAD + 79 MB CUSTOM) and ended with an access violation (0xc0000005) about 37 s in, before the first game frame — four runs out of four (368, 373, 374, 375).
  • Moving only uma_coherent_lockhart.txt aside brought the 512 MB window back and the run went through 900 s again (run 376: 3.66 presents/s with XCL_RESIDENCY_PRIORITY=1).

So either the stored Series S size is wrong for this title, or a 3407 MB window with the mixed ranges is the problem (the GPU_UPLOAD range ends 79 MB before the window's end; a range that leaves only a small CUSTOM tail was also reported to lose the device on #505). Not tested: Series S with the stored size but without XCL_UMA_DRIVER=mixed, and AMD.

Workaround: delete <data>\cache\uma_coherent_lockhart.txt before a Series S run.

AI use: Claude Code (Claude Opus 5.5) made the runs and wrote this.

<!-- greyfinch-sync:ivall/xcl:issue:6720258651 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/3568). Originally posted by [throny](https://github.com/throny) on 2026-12-01T12:24:42Z. --- On an RTX 4080 16 GB (621.40), `main` `9dfbe3ea` (and `9dfbe3ea` + #3156), retail title, `XCL_DEVICE_TYPE=lockhart` with the run settings we use for NVIDIA (`XCL_UMA_WINDOWS=16 XCL_UMA_DRIVER=mixed:1536:1792`, …): - The first Series S run had no `cache\uma_coherent_lockhart.txt`, got a 512 MB coherent window and ran 2,630 s without a crash (run 367). - That run stored a size in `uma_coherent_lockhart.txt`; every later Series S run opened a **3407 MB** coherent window (`mixed` heaps: 1536 MB CUSTOM + 1792 MB GPU_UPLOAD + 79 MB CUSTOM) and ended with an access violation (0xc0000005) about 37 s in, before the first game frame — four runs out of four (368, 373, 374, 375). - Moving only `uma_coherent_lockhart.txt` aside brought the 512 MB window back and the run went through 900 s again (run 376: 3.66 presents/s with `XCL_RESIDENCY_PRIORITY=1`). So either the stored Series S size is wrong for this title, or a 3407 MB window with the `mixed` ranges is the problem (the GPU_UPLOAD range ends 79 MB before the window's end; a range that leaves only a small CUSTOM tail was also reported to lose the device on #505). Not tested: Series S with the stored size but without `XCL_UMA_DRIVER=mixed`, and AMD. Workaround: delete `<data>\cache\uma_coherent_lockhart.txt` before a Series S run. AI use: Claude Code (Claude Opus 5.5) made the runs and wrote this.
throny commented 2026-12-01 15:09:45 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by throny on 2026-12-01T15:09:45Z.


Follow-up, the other half of this: without the stored size (the workaround above) the Series S window is 512 MB, and then the title's three GPU heaps (1162 + 1277 + 258 MB here) do not fit, become plain memory outside unified memory, and translated shaders read zeros from them: ~90 % of draws skipped, black frames, and one compute program loops to XCL's pass budget because its element count reads 0 (37.6 ms per dispatch instead of 0.017 ms). So neither size works for Series S: 3407 MB crashes at ~37 s, 512 MB renders nothing.

A local prototype (XCL_COHERENT_SPILL=sparse, default off, ~40 lines in hle/kernelx.rs) sends a GPU heap that does not fit the coherent window to the sparse windows instead: with it a Series S run drew normally (1.6 % of draws skipped instead of 90 %, acceleration structures built, a lit scene in the last frame), at ~2 GB more video memory (14.9 of 15.1 GB on an RTX 4080). One caveat: 2 of 4 launches of that build lost the device 130–150 s in (a page fault on a BC7 texture), one with the switch off and one with it on, so it's not clear yet whether the switch is involved. I can open it as a PR once that is understood.

AI use: Claude Code (Claude Opus 5.5); found and prototyped by a Claude Fable 5.2 sub-agent.

<!-- greyfinch-sync:ivall/xcl:comment:7315448160 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/3568#issuecomment-7315448160). Originally posted by [throny](https://github.com/throny) on 2026-12-01T15:09:45Z. --- Follow-up, the other half of this: without the stored size (the workaround above) the Series S window is 512 MB, and then the title's three GPU heaps (1162 + 1277 + 258 MB here) do not fit, become plain memory outside unified memory, and translated shaders read zeros from them: ~90 % of draws skipped, black frames, and one compute program loops to XCL's pass budget because its element count reads 0 (37.6 ms per dispatch instead of 0.017 ms). So neither size works for Series S: 3407 MB crashes at ~37 s, 512 MB renders nothing. A local prototype (`XCL_COHERENT_SPILL=sparse`, default off, ~40 lines in `hle/kernelx.rs`) sends a GPU heap that does not fit the coherent window to the sparse windows instead: with it a Series S run drew normally (1.6 % of draws skipped instead of 90 %, acceleration structures built, a lit scene in the last frame), at ~2 GB more video memory (14.9 of 15.1 GB on an RTX 4080). One caveat: 2 of 4 launches of that build lost the device 130–150 s in (a page fault on a BC7 texture), one with the switch off and one with it on, so it's not clear yet whether the switch is involved. I can open it as a PR once that is understood. AI use: Claude Code (Claude Opus 5.5); found and prototyped by a Claude Fable 5.2 sub-agent.
throny commented 2026-12-01 15:17:28 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by throny on 2026-12-01T15:17:28Z.


Stability of the XCL_COHERENT_SPILL=sparse prototype: two more Series S runs with it on both drew normally (≈6 % of draws skipped at that point) and then lost the device (0x887a0006, hung) at 179 and 191 s after the first frame, at 15.0 of 15.1 GB video memory. With the earlier attempt that makes 3 of 4 launches lost once Series S actually renders. That looks like the in-world hang others report around 140–190 s (#505, #3528/#3516) rather than the spill itself, but it means Series S on this card does not run stably yet with or without it, so I'm not opening the prototype as a PR for now. Series X runs (4.8 GB coherent window, the heaps inside it) are unaffected: 900 s runs without removal.

AI use: Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7315663717 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/3568#issuecomment-7315663717). Originally posted by [throny](https://github.com/throny) on 2026-12-01T15:17:28Z. --- Stability of the `XCL_COHERENT_SPILL=sparse` prototype: two more Series S runs with it on both drew normally (≈6 % of draws skipped at that point) and then **lost the device** (0x887a0006, hung) at 179 and 191 s after the first frame, at 15.0 of 15.1 GB video memory. With the earlier attempt that makes 3 of 4 launches lost once Series S actually renders. That looks like the in-world hang others report around 140–190 s (#505, #3528/#3516) rather than the spill itself, but it means Series S on this card does not run stably yet with or without it, so I'm not opening the prototype as a PR for now. Series X runs (4.8 GB coherent window, the heaps inside it) are unaffected: 900 s runs without removal. AI use: Claude Code (Claude Opus 5.5).
throny commented 2026-12-02 04:54:31 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by throny on 2026-12-02T04:54:31Z.


Same pattern outside Series S: with #3619's XCL_COHERENT_HEAPS=sparse-wc (Series X), the first run had no stored size, got a 512 MB coherent window and played; it stored 2,498,887,680 bytes in uma_coherent_sparse-wc.txt, and the next two runs opened a 2,895 MB window and both ended with an access violation at 36.8 s, before the first frame (runs 420, 421) — the same time and signature as the Series S runs above. Common factor: XCL_UMA_DRIVER=mixed:1536:1792 (a GPU_UPLOAD range ending at 3,328 MB) combined with a stored window size that does not leave that range whole inside the window: 2,895 MB cuts the range off, 3,407 MB leaves only a 79 MB CUSTOM tail (a small tail was also reported to lose the device on #505). So the fix is probably to clamp or drop mixed ranges that do not fit the window actually made, rather than anything specific to Series S.

AI use: Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7335381253 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/3568#issuecomment-7335381253). Originally posted by [throny](https://github.com/throny) on 2026-12-02T04:54:31Z. --- Same pattern outside Series S: with #3619's `XCL_COHERENT_HEAPS=sparse-wc` (Series X), the first run had no stored size, got a 512 MB coherent window and played; it stored 2,498,887,680 bytes in `uma_coherent_sparse-wc.txt`, and the next two runs opened a 2,895 MB window and both ended with an access violation at 36.8 s, before the first frame (runs 420, 421) — the same time and signature as the Series S runs above. Common factor: `XCL_UMA_DRIVER=mixed:1536:1792` (a GPU_UPLOAD range ending at 3,328 MB) combined with a stored window size that does not leave that range whole inside the window: 2,895 MB cuts the range off, 3,407 MB leaves only a 79 MB CUSTOM tail (a small tail was also reported to lose the device on #505). So the fix is probably to clamp or drop `mixed` ranges that do not fit the window actually made, rather than anything specific to Series S. AI use: Claude Code (Claude Opus 5.5).
tiagonleal commented 2026-12-02 15:10:21 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by tiagonleal on 2026-12-02T15:10:21Z.


Data from a 16 GB NVIDIA card that fits your mixed reading: the 3,408 MB Series S window does not crash when it is one plain CUSTOM heap.

RTX 5070 Ti 16 GB (617.42), Ryzen 7 9800X3D, 32 GB, main 1c8b5514, retail title. Settings as in our Series S runs (XCL_DEVICE_TYPE=lockhart XCL_UMA_WINDOWS=16 XCL_SPARSE_LAZY=1, no XCL_UMA_DRIVER), once with XCL_COHERENT_MB=512 and once with XCL_COHERENT_MB=3408. The log says the 3,408 MB window "is a driver CUSTOM write-back L0 heap mapped at its address".

With 512 MB (3 runs): the same three heaps do not fit (1162 + 1277 + 258 MB), 454,156 of 482,113 draws skipped in a timed run, flat or black frames, and the DefragHeap compute program at 44.9 ms per 1x1x1 dispatch. That matches your follow-up.

With 3,408 MB (3 launches):

  • No access violation at ~37 s in any of them. All three heaps fit; the window held 3,031 to 3,038 MB.
  • 0 skipped draws, and the DefragHeap program dropped below the 2.45 ms cutoff of the XCL_GPU_TIMES top 60.
  • The draws that used to be skipped are now the cost: the GPU frame went from 1.1-1.3 s to 4.5-5.3 s (mean 0.86 to 0.31 presents/s). The mesh G-buffer program alone timed at about 2.4 s per frame, all mesh programs together 3.6 s.
  • Frame dumps show geometry (a person, fences) under a heavy white haze, not a lit scene.
  • Non-local video memory rose by about 2.8 GB (the window). Local peaked at 14.1 of 15.05 GB.
  • One launch lost the device (nvlddmkm 153, TDR) about 180 s after launch, at 13.7 of 15.05 GB local, so not at the budget. Another was stopped by the GPU-wait watchdog after 18 queue waits passed 5 s, without a TDR. The third ran its 420 s.

One launch per case for the failures, so the TDR rate is not measured. What hung the GPU is not in the logs.

AI use: Claude Code (Claude Opus 5.5, with a Claude Fable 5.2 analysis of the logs).

  • Tiago
<!-- greyfinch-sync:ivall/xcl:comment:7349857410 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/3568#issuecomment-7349857410). Originally posted by [tiagonleal](https://github.com/tiagonleal) on 2026-12-02T15:10:21Z. --- Data from a 16 GB NVIDIA card that fits your `mixed` reading: the 3,408 MB Series S window does not crash when it is one plain CUSTOM heap. RTX 5070 Ti 16 GB (617.42), Ryzen 7 9800X3D, 32 GB, `main` `1c8b5514`, retail title. Settings as in our Series S runs (`XCL_DEVICE_TYPE=lockhart XCL_UMA_WINDOWS=16 XCL_SPARSE_LAZY=1`, no `XCL_UMA_DRIVER`), once with `XCL_COHERENT_MB=512` and once with `XCL_COHERENT_MB=3408`. The log says the 3,408 MB window "is a driver CUSTOM write-back L0 heap mapped at its address". With 512 MB (3 runs): the same three heaps do not fit (1162 + 1277 + 258 MB), 454,156 of 482,113 draws skipped in a timed run, flat or black frames, and the DefragHeap compute program at 44.9 ms per 1x1x1 dispatch. That matches your follow-up. With 3,408 MB (3 launches): - No access violation at ~37 s in any of them. All three heaps fit; the window held 3,031 to 3,038 MB. - 0 skipped draws, and the DefragHeap program dropped below the 2.45 ms cutoff of the `XCL_GPU_TIMES` top 60. - The draws that used to be skipped are now the cost: the GPU frame went from 1.1-1.3 s to 4.5-5.3 s (mean 0.86 to 0.31 presents/s). The mesh G-buffer program alone timed at about 2.4 s per frame, all mesh programs together 3.6 s. - Frame dumps show geometry (a person, fences) under a heavy white haze, not a lit scene. - Non-local video memory rose by about 2.8 GB (the window). Local peaked at 14.1 of 15.05 GB. - One launch lost the device (nvlddmkm 153, TDR) about 180 s after launch, at 13.7 of 15.05 GB local, so not at the budget. Another was stopped by the GPU-wait watchdog after 18 queue waits passed 5 s, without a TDR. The third ran its 420 s. One launch per case for the failures, so the TDR rate is not measured. What hung the GPU is not in the logs. AI use: Claude Code (Claude Opus 5.5, with a Claude Fable 5.2 analysis of the logs). - Tiago
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl#3568
No description provided.