Pipelines: driver compiles are admitted by memory, and put off rather than refused #1625
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1625"
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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by mizzied on 2026-11-28T22:34:16Z.
What was wrong. A dozen driver pipeline compiles could run at once. Each can take hundreds of MB of commit, so on a PC with little commit left they exhausted memory and the process was killed. A compile the driver refused for memory was also recorded as refused for the whole run.
The fix.
VICTORY_COMMIT_FLOOR_MB).VICTORY_MEMORY_FLOOR_MB), compiles go one at a time.main's compute-pipeline wait: a dispatch doesn't wait on a put-off compile during the pause, so it's dropped like a draw until the retry.VICTORY_COMPILE_MEMORY=0turns it all off.Overlap: open PR #1173 (throttle pipeline workers under commit pressure) aims at the same problem. This one admits each compile by measured memory and retries put-off compiles, rather than capping worker count. Happy to fold it into #1173 or close it, whichever you prefer.
How it was tested. RTX 5070, Windows 11. Tests cover admission at and around the floors, one-at-a-time under low memory, the put-off and retry, and recording a compile that panicked.
cargo test --workspacepasses apart fromrepository_passes_policy, which already fails onmain:lower.rsis over the 640 KiB file-size limit there (#1493 raises it). Clippy reports only the 16 findings already onmain, none on lines this PR changes. Thevictory-gpuwatch::tests are flaky on this machine in files this PR does not touch, and pass on a rerun.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by nick0451 on 2026-11-29T10:05:47Z.
Regression report: on a PC with little commit headroom at the moment, a fresh start of current main never reaches the world, and the admission added here is the cause.
Setup: RTX 3090 24 GB, i9-14900K, 32 GB RAM, Windows 11, a system-managed pagefile. Other programs left open held most of the commit: about 15 GB of a 73 GB commit limit free with the game not running. Series S, the same frozen save for every start, a new executable name and hash each time.
hr=0x8007000ehost pipeline failures568c5e5829188e9(default)829188e9,VICTORY_COMPILE_MEMORY=0829188e9+ the change belowBisect:
4e109ff5good,cb696070bad. The waves in between don't build separately, so I confirmed it with the switch above.What happens: about 3 s in,
memory guard: a compile is put off … free_commit_mb=3991 reason="the commit l…. From then on every driver compile is put off and made again a second later, for good. The layer's private memory climbs from 4 to 18.6 GB while it stays at the title (compile memory:/process memory:lines).Why:
memguard::figures_now()takesfree_commitfromullAvailPageFile, the limit of the moment. Everything else in the layer counts what is left to commit withresidency::available_commit(), which adds what a system-managed pagefile can still grow by (VICTORY_COMMIT_GROWTH; its comment describes the same false pressure seen earlier on a 5070 Ti). The commit floor of 4096 MB is reached at once when other programs hold the commit, though Windows would grow the pagefile.Change (2 lines, tested here, not opened as a PR yet; I can open it if wanted):
With it, the admission stays on and still puts off a few compiles early (6-7 per start here), but the start goes through. The 23 memguard/compilemem/residency tests pass.
Until a fix is in:
VICTORY_COMPILE_MEMORY=0gets such a PC into the game.🤖 Generated with Claude Code