Since b8b1f49 one compute program of the retail package takes more than 30 GB to compile; with the preload the title's process is killed for memory in its first minute #1332
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#1332
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?
@Royalflamejlh on GitHub · 2026-11-24 14:52 UTC · original
Since
b8b1f49("Recompiler: jumps to outer loop heads and into loops are structured"),xcl shaders shaders.rpf --precompile --only cspasses 30 GB of memory at record 22619 of the retail package (1.0.2.1) and is killed; with that commit reverted the same records compile with memory steady. In the title, once that program is inused-pipelines.txt, the preload compiles it at start and the kernel's OOM killer ended 3 of 3 runs at 56–71 s with the process at 45–50 GB.Setup: Fedora 44 (kernel 7.2.9), 62 GB RAM, Ryzen 9 9950X3D, RTX 4060 Ti 16 GB (driver 615.71.09), Wine 11.21 Staging, vkd3d-proton v3.1-90-g30b0eb9b, DXC 1.9.2609.5, release,
x86_64-pc-windows-gnu. Tree:mainb8b1f49+ #684 + #751 + #1045 + #850 + #851 + #906 + #688, all clean merges; the comparison tree is the same withb8b1f49reverted (it reverts cleanly). Each process ran under a 30 GB cgroup limit (systemd-run --scope -p MemoryMax=30G) unless said otherwise.The offline pass (
XCL_DXC_THREADS=2, no--pipelines, so no driver and no dxil-spirv):--limitb8b1f49b8b1f49b8b1f49b8b1f49revertedSo it is one program, the 22619th record in the package's order. Without
--limitand with 2 threads the process stayed near 8 GB for 170 s and then went past 30 GB within about 10 s. I did not separate XCL's translation from DXC, and I do not have the program's name (the pass does not print it).In the title (
XCL_PSO_WAIT_MS=50, preload on, no memory limit): three runs in a row were ended by the kernel, with no XCL crash line:A fourth under the 30 GB limit was killed at 24 s. A thread dump at 20 s showed two
xcl-dxcthreads indxcompiler.dlland twoxcl-pso-preworkers waiting for them, 14 s after their last log lines. Three earlier runs of the same tree had lasted 138–194 s; they still had 61–95 shaders to compile first.This is the same commit as #1246 but a different symptom (that one is vkd3d-proton's dxil-spirv; this pass creates no pipeline), and it looks from outside like #1035 (the preload, memory growing at the title screen) with another cause.
Not tested: native Windows; plain
mainwithout the pull requests listed; whether the memory goes to the translator or to DXC;mainafterb8b1f49(930e8b4has no later recompiler change); thecargo testsuite.AI use: Claude Code (Claude Fable 5.2) ran the passes and the title, bisected the record count and drafted this issue.
@tiagonogueiraa-bit on GitHub · 2026-11-24 14:52 UTC · original
Record 22619 in the package's order is
indirect_diffuse_lighting:CS_ScreenProbes_ActivateRays_d60186e6_Wrapped. It is the program I found for #1307: sinceb8b1f49its structured HLSL is 148.5 MB (13.8 MB withb8b1f49reverted), so the memory goes to DXC, not to the translator. Translating it takes about 1.5 s either way.The cause is the structured form's skip-flag guards, which list every pending flag each time they reopen. That grows with the square of the pending flags: this program has 3 861 flags and guards of up to 597 terms. Details in https://github.com/ivall/xcl/issues/1307#issuecomment-7134897440.
#1321 translates structured code longer than 128 bytes per byte of program as
pcblocks. Over the whole pack only this program changes (148.5 → 13.8 MB), and the next largest structured one is at 61 B/B. @Royalflamejlh, your--precompile --only cs --limit 22619pass under the 30 GB limit on #1321's head (156b0de) would be a direct check of it.Written with Claude Code (Claude Opus 5.5).
@Royalflamejlh on GitHub · 2026-11-24 15:17 UTC · original
Ran it: on #1321's head
156b0dethe pass over the first 22,619 records finished under the 30 GB limit, with 0 errors. Onb8b1f49the same command was killed at the limit after 19 s.Setup: the machine above (Fedora 44, Wine 11.21 Staging, DXC 1.9.2609.5, 62 GB RAM).
156b0deas it is, with no other pull request, release,x86_64-pc-windows-gnu.xcl shaders shaders.rpf --precompile --only cs --limit 22619,XCL_DXC_THREADS=2, an emptyXCL_DXIL_CACHEfolder, undersystemd-run --scope -p MemoryMax=30G -p MemorySwapMax=1G.22600/22619at 284 s and wrote its last file about 100 s before the timeout. The kernel logged no memory kill.compiled 462, already cached 0, errors 0.So the last program of that range, which took the process past 30 GB on
b8b1f49, compiled here in under 48 s.Not tested: the title on
156b0de(whether the preload now survives the first minute); the pass without--limitor with--pipelines; why the first go spent its last 100 s on that one program without finishing it.This issue duplicates #1307, which I had not seen when I opened it. Closing it in favour of #1307 and #1321.
AI use: Claude Code (Claude Fable 5.2) built the tree, ran the pass and wrote this reply.