Default to full D3D12 shader and pipeline precompilation #3172
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!3172
Loading…
Reference in a new issue
No description provided.
Delete branch "codex/full-precompile-default"
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?
Pull request successfully merged and closed
Claimed as D3D12-FULL-PRECOMPILE-DEFAULT.
What and why
Windows Play translates every shader and warms every recorded pipeline by default. This uses the existing full warm-up and its driver cache. A fresh pipeline book contains no entries. The first substantial full warm-up happens on a later launch, after the game records pipelines. A large book can take an hour or more to warm, and parallel compiler processes can use several GB of system RAM.
-PrecompileUsedkeeps shader translation and warms only pipelines used to draw in previous runs.-NoPrecompileskips both stages.-PrecompileAllswitch and its explicit PowerShell false form. Preserve the used-only choice on in-game restart.Tested
warm --used, and the fresh desktop profile reported full warm-up off.git diff --check.GPUs tested: n/a. Windows launcher tests used a synthetic executable.
AI-assisted: yes, OpenAI Codex GPT-6.2 Sol. Independently reviewed by separate read-only GPT-6.2 Sol reviewer runs.
Checklist
main.Verified: it applies on the current
main, and its tests pass - 26 intest_leonida_launcher.py(3 new) and 6 intest_win_launchers.py(1 new), all OK.And one measured concern about the new default, from this machine.
What the change does, in its own words: the default becomes
-PrecompileAll- "translate all shaders and warm every pipeline recorded in earlier runs" - and the help text says "an hour or more and use gigabytes of driver cache".The number it does not have is the memory one, and I measured it yesterday for #3041 on this machine (RTX 4090, 64 GB) with
leonida warmon a real book:--jobsAbout 8-11 MB for each pipeline at peak, and the peak follows the count, not the concurrency.
known.rsand a real book both say the title creates about 84,000 pipelines (I have awarmrun that printed83563 pipelines known). The drawn-with subset is some 2,000 - but "every recorded" is the whole book.So the default this sets is a warm-up whose memory grows past what an 8 GB card's machine has before it finishes, on exactly the machines that already arrive in this repository with "out of memory" reports (#3041, the 8 GB threads).
-PrecompileUsed- the drawn-with subset - is the shape that fits there, and it is this same pull request that gives it a name.What I would suggest: keep
PrecompileAllavailable but not default for every card, or gate it on free memory (thewarmmemory figure above is enough to size the gate: free memory minus 2 GB, divided by 10 MB), or at least say the RAM in the help text next to the hour and the gigabytes.What I did not measure: a full warm-up of the whole book - the peaks above are at 140 and 540 pipelines, and extrapolating to 84,000 is arithmetic, not a measurement. I am not claiming 84,000 was run.
AI-assisted: yes - DeepSeek v4.1 (flash).
Written with an AI assistant.
Thanks for testing this and recording the host RAM peaks. I added a system RAM note to the startup output and D3D12 guide in
0413012fa. The startup output points to-PrecompileUsedfor warming a smaller set. All 32 Windows and desktop launcher tests passed after the edit.The two measurements change both the number of pipelines and the number of workers.
warm.rsreplaces compiler children after batches of at most 40, andknown.rsreads the whole book in each child while copying just that batch’s entries. The samples show several GB of RAM use, but they do not establish a per-pipeline memory requirement that we could use to size a gate. The change keeps the requested full default. Worker limits are being handled separately in #3071.Thanks for verifying the launcher paths and the merge tree. I updated the PR description to say that a fresh pipeline book starts empty, to call out host RAM, and to point to the launcher settings and PowerShell switches.
#3071 and #3027 cover separate mitigations. The worker cap reduces peak concurrency. The exit-code warning can report a failed top-level process, while the supervisor can currently record a failed child and still return success. A fixed free-memory cutoff would need measurements with the same book and worker count on lower-memory hosts.
I reproduced the pause/resume issue, made both launchers retain the selected warm-up mode, and verified it with the launcher tests and a Node smoke test. GitHub rejected the push because #3172 is already in the merge queue. I left it queued so the requested default can land.