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#1307
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?
@VolenNakov on GitHub · 2026-11-24 14:33 UTC · original
RTX 4060 Ti / Windows: with
b8b1f49the host's commit grows about 1 GB per second from ~20 s on, with the working set flat, untilmemory allocation of … bytes failed(0xc0000409) at ~120–150 s. The title never reaches the world load. With onlyb8b1f49reverted on the same tree, commit levels off at ~31 GB and the world load starts at 112.9 s again. Two runs with the commit, one without, same settings and caches.Setup
930.048.020-vb_sub_story).XCL_TRACE_WAITS=1 XCL_GPU_TIMING=1 XCL_BIG_COMPILES=4, noXCL_PSO_WAIT_MS. No input; the title loads straight into the game.main930e8b4+ #1062 #1046 #1044 #924 #851 #850 #1065 #688 #744 #759 #820 #684, plus local changes toxcl pipelinesonly (progress lines,--shard,--max-mb,.tryinghandling). The A/B differs in one commit:git revert b8b1f49. Not tested on plainmain.xcl pipelinesfor the build withb8b1f49(1 064 blobs on disk).PrivateMemorySize64,WorkingSet64, free system commit).Commit of the title's host (GB)
b8b1f49(run 7)Working set with
b8b1f49: 18.8 → 21.0 GB from 61 s to 151 s, while commit grew by 76 GB, so the growth is committed memory that is not touched. Free system commit reached 0.3 GB at 113 s.Runs
ListX #101 (not on PC)(world load)memory allocation of 1327304 bytes failed, ~120 smemory allocation of 1441792 bytes failed, ~150 s+0x23cf683at 144.4 s, 1.3 s after a 20.9 s compute PSO build in the run (a pipeline whose DXIL changed back with the revert)2700 frames presentedat 110 s / 121 s) but goes no further than the loading it does before#101.no video memory for more pages of title textures (0x8007000E)(42 times),CreateHeap … refused, and DirectStorage requests failing with 0x800705aa, all after free commit was gone.mainmoved, so withoutb8b1f49) reached#101at 104 s and 156 s and ran 137–187 s with no memory error.Not tested
mainwith and withoutb8b1f49; AMD or Intel GPUs; Wine.xcl pipelines, as before.Logs,
report.jsonand the 2 s memory samples of runs 6–8 can be attached on request.AI use
@tiagonogueiraa-bit on GitHub · 2026-11-24 14:35 UTC · original
claiming: I'll translate the retail pack's programs on the CPU (no GPU needed) with
mainand withb8b1f49reverted, to find the programs whose structured HLSL grows, or whose translation grows, far past the dispatcher form. I'll post the numbers here, then a fix: most likely a bound that falls back to the dispatcher for those programs.Written with Claude Code (Claude Opus 5.5).
@tiagonogueiraa-bit on GitHub · 2026-11-24 14:45 UTC · original
Found it on the CPU side: one compute program's structured HLSL is 148 MB since
b8b1f49. I translated every program of the retail pack'sshaders.rpfwithgpu::recompbuilt on its own (macOS), frommainand frommainwithb8b1f49reverted.indirect_diffuse_lighting:CS_ScreenProbes_ActivateRays…(334 KB of code): 148.5 MB structured, against 13.8 MB aspcblocks (b8b1f49reverted). Translating it takes 1.5 s either way, so the cost lands in DXC and the driver. No other program grows by more than 1.4×.if (!(xcl_skip_a || xcl_skip_b || …)) {, listing every pending skip flag, and reopens it whenever the set changes. Here there are 3 861 flags and 14 036 guards of up to 597 terms (152 on average), 99 MB in guard lines. It grows with the square of the pending flags. A synthetic program of n crossing forward jumps reproduces it.PR #1321 bounds it: structured code over 128 bytes per byte of program (this one: 455; the next largest in the pack: 61) is translated as
pcblocks. Over the pack only this program changes, to 13.8 MB, and b8b1f49's gain stays (170 programs aspcblocks, against 1 670 before it). @VolenNakov, if you can, a run of your A/B with #1321's head would confirm the title's commit levels off again.Written with Claude Code (Claude Opus 5.5).
@CuteBooty on GitHub · 2026-11-24 14:55 UTC · original
A data point from plain
mainwithb8b1f49: one run, the growth from ~20 s did not show, and the world load was reached.main930e8b49c1c2ec683d22c724a398b39111cd0e56with nothing on top, DXC 1.9.2602 (Windows SDK). Retail 1.0.2.1,XCL_NETWORK=0 XCL_ACTIVITY=1, noXCL_PSO_WAIT_MS, input by hand.memory:lines:ListX #101 (not on PC)at 170.8 s. Last frames in the sample ending at 174 s. The run ends at+0x23cf683at 203.3 s, 0 device removals. Lowest free system commit 6.1 GB.maind208e14(beforeb8b1f49, many other commits between) on the same machine peaked at 29.5 GB.Limits: one run, no A/B of
b8b1f49alone. 608 shader sets from earlier runs were built ahead of use here, not the whole journal as in your setup, so I can't say whether this run compiledCS_ScreenProbes_ActivateRays…at all. This does not contradict #1321's finding.AI use: Claude Code (Claude Opus 5.5) ran it with me at the machine, read the log and wrote this comment.
@VolenNakov on GitHub · 2026-11-24 15:03 UTC · original
Confirmed: with #1321 (
156b0de) the title's commit levels off again and the world load is back. Same machine, tree and settings as the A/B above; run 9 is run 7's tree plus #1321 merged, nothing else.b8b1f49b8b1f49revertedb8b1f49+ #1321ListX #101(world load)memory allocation of 1441792 bytes failed+0x23cf683at 144.4 s+0x23cf683at 143.3 scargo test --release -p xcl --lib recompon that tree: 192 passed, 0 failed, 18 ignored.Not tested: plain
main+ #1321 (this tree also has the open PRs listed above), other GPUs.AI use
@CuteBooty on GitHub · 2026-11-24 16:38 UTC · original
Correction to my run above: on newer
maina growth like this one shows here too. Four release runs on the same machine (RTX 3070 8 GB, driver 621.24),scripts/smoke.ps1,XCL_PRESS_A_AT=15and otherwise no input. My script stops XCL when less than 4 GB of commit is free; it stopped all four.mainb7aa9f3b7aa9f3+ my #774 rework (one commit,real.rsonly, not pushed)memory:lines): 21.8 GB at 30 s and 30.9 GB at 34 s in one, 19.6 GB at 30 s and 32.3 GB at 36 s in the other, so about 2.3 GB/s at the end, with video memory flat at 6.1 GB local. They were stopped at 34 and 36 s.Not tested:
b8b1f49reverted, #1321, or which program the memory goes to, so I can't say it is the same cause.AI use: Claude Code (Claude Opus 5.5) made the runs, read the logs and wrote this.
@grahamster2 on GitHub · 2026-11-24 18:03 UTC · original
DXC cost of the programs discussed above, measured on their own, for ranking #1321, #1345, #1315 and #1526.
How it was measured
xcl shaders shaders.rpf --recompon Windows, built frommain037aecd, which includesb8b1f49. Shaders were translated on the CPU, with HLSL of 8 MB or more written to disk. #1345's column is headc920355. The pc-block column isXCL_RECOMP_NO_STRUCTURED=1, the form #1321 falls back to.dxc.exe(1.8.2502) at-T cs_6_6 -O0 -HV 2021, the level XCL uses above 8 MB, with a 600 s cap and a 6 GB free-RAM floor.CS_ScreenProbes_ActivateRays,mainCS_ScreenProbes_ActivateProbes,mainWhere the 152 MB goes: 104 MB is in 14 780
if (!(xcl_skip_…))guard lines, up to 597 terms each and 383 on average.ActivateProbeshas 9 such guards: it is large without the guards.Link to the world-start stall: at runtime, on an RTX 3080 10 GB / 32 GB machine, the same
ActivateRaysHLSL (151 MB in the runtime's form) is compiled while the world starts. Physical RAM then drops from about 6 GB free to under 1 GB, and every other pipeline build in flight stalls. Several hundred ExecuteIndirect pipelines stay unbuilt for the rest of the run. When a local guard refused HLSL over 16 MB, that one compile no longer took the RAM.Not measured: the driver compile of the 12–21 MB DXILs above. #1315 reports a 29.75 MB DXIL not finishing in 600 s, so #1321 or #1345 alone still leaves a large driver compile. I also didn't measure
-O1(#1526).Measured and written with Claude Code (Claude Opus 5.5); the dump filter is local only, and no shader content is attached.
@zGLados on GitHub · 2026-11-24 18:12 UTC · original
AMD data point on current
main: the growth shows on RDNA3 too. The runs above are all NVIDIA.main9e3831ewith nothing on top; DXC 1.9.2602.17 (Windows SDK). Retail 1.0.2.1,scripts/smoke.ps1for 300 s,XCL_PRESS_A_ATevery 6 s from 10 to 118 s. Caches were cold for this build, because #680 changes the HLSL.xcl shaders shaders.rpf --precompile --only cs --limit 22824withXCL_DXC_THREADS=2reaches 32 GB within 40 s once it gets to the records after 22800, where95cc13288a27a96eis. I did not check which program the title was compiling when it grew.930e8b4with warm caches (the 300 s runs in my #1345 report), the title ended at its stall watchdog at ~118 s with a peak commit of 29.8 GB, before any growth.Not tested: #1321 or #1345 on top of
9e3831e.AI use: Claude Code (Claude Opus 5.5) ran the build and the runs on this machine and drafted this comment.
@phantom54 on GitHub · 2026-11-24 19:51 UTC · original · edited 2026-11-24 20:07 UTC
what i tried: merging latest (
6c89285) with suggested PR #1321 (69a892c) and it did fix the memory "leak"13700F + 2070 Super (32.0.16.2114)
Windows 11 26H2 (26300.10075)
@ivall on GitHub · 2026-11-24 21:01 UTC · original
Fixed on
mainby #1321, merged ase9e94ce: the program that made the commit grow is back at 15 MB of source instead of about 150 MB. The runs reported on #1321 show the commit levelling off.Thank you for the A/B with the one commit reverted; it named the cause. Closing. What grows later at world load (driver builds: #1598, #1657) is a different problem and stays open there.
AI use: Claude Code (Claude Opus 5.5) wrote this comment.