Repository navigation
Conversation
…inity mask With ProjectLeonida#2233's defaults (8 workers, threads-1 = 7 large builds at once), a story load under Wine slowed from ~50-79 submissions/s to 0.1-0.5/s at about 5,100 submissions and never recovered, so the title's 300 s stall guard fired; with LEONIDA_COMPILE_THREADS=1 the same build lived (z3r0rc, ProjectLeonida#1608). Native Windows boots show the same knee at ~5,000-5,700 submissions, with troughs of 0.06-0.6/s that recover in 20-60 s. A CPU stress run of PipelineCompiler (1 vs 8 workers, 20,000 warm-ups queued, demanded builds at every submission) queued at the same rate both ways, so the queue itself is not the stall; what changed is how many builds run in the driver and on the host at once. - LEONIDA_COMPILE_HEAVY_MAX defaults to 2 (1 with two workers), the most the general and graphics-only workers could run before the pool. An explicit count still wins. - The default worker count is half the processors in the process's affinity mask, not the machine's count, so a process limited to some processors does not start more workers than it can run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…zed from Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Independent Wine retest of MEASURED, scheduler capacity. I submitted eight large-class and eight small-class callbacks to the real
On all 16 CPUs, the base ran seven parked large callbacks alongside one small callback. The PR ran two large and six small callbacks concurrently. An explicit 8/7 restored the base result even with MEASURED, GPU teardown. The unmodified teardown fixture completed 3/3 per revision per GPU on RTX 4070 SUPER (620.73.04) and Radeon Raphael (RADV 26.3.1). I enabled Khronos validation in the host loader because the layer was unavailable to the test inside Wine. Each run reported the same AI-assisted with OpenAI Codex. |
|
Verified on The header change compiles through the shim (that target links it), and the test the pull request extends passes with the change rather than instead of it: What the two commits do, in their own words: the pool now defaults to 2 large builds and sizes itself from the affinity mask, and its startup line names the processors it was sized from - which is the part I would have wanted the first time a pool size was questioned in a log. Not tested: the full runtime build ( Written with an AI assistant. |
|
Independent verification on this machine (Windows 11, MSVC 19.44.35226), and the honest result is "builds and passes, but the negative control is impossible by design" - which is itself informative here. 1. It applies. 2. It builds and passes, three times: 3. The negative control does not work the way it usually does, and the reason is worth stating. Reverting only The test asserts on A measurement error I made and caught: my first attempt at that control ran the previous binary - the build had failed and I suppressed the output, so What I did not test: the behaviour the defaults actually change. Written with an AI assistant. |
|
Independent check on Windows (not the author), at
Environment: Ryzen 9 7950X3D, Windows 11 Pro 10.0.26200.9711. Based on AI-assisted: yes (opencode). |
|
Follow-up check of the compile pool together with the background budget. I merged AI-assisted with OpenAI Codex. |
|
Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime ( |
Claimed in the coordination issue as: COMPILE-POOL-SAFE-DEFAULT (#1608 (comment)). Found by z3r0rc (#1608 (comment)).
What and why
#2233's compile pool runs 8 workers by default, and lets threads-1 = 7 of them build large modules at once. z3r0rc bisected a story-load stall under Wine to exactly that PR:
LEONIDA_COMPILE_THREADS=1, the same build lives to the end of the run.Our own native Windows boots (8 workers, 7 large) show the same knee, milder:
A CPU stress run of
PipelineCompilerrules out the queue itself:This PR is the safe default; the root cause is still open:
LEONIDA_COMPILE_HEAVY_MAXnow defaults to 2 (1 with two workers). That is the most the general worker and the graphics-only worker could run before the pool. An explicit count still wins, soLEONIDA_COMPILE_HEAVY_MAX=7gives the old behavior.GetProcessAffinityMask), still 2 to 8. It was half ofstd::thread::hardware_concurrency(), the machine's count. A process limited to 4 of 32 processors now starts 2 workers, not 8. The pool's startup line also prints the processor count.GlobalMemoryStatusEx). That waits for z3r0rc's A/Bs (LEONIDA_COMPILE_HEAVY_MAX=1,LEONIDA_COMPILE_THREADS=2,LEONIDA_BIG_COMPILE_BUDGET_MB=4096).Docs:
docs/d3d12_vulkan.mdandruntime/README.mdgive the new defaults and why.Tested
d3d12_compile_pool_testcovers the new settings:LEONIDA_SERIAL_BIG_COMPILES=1, 1 large build.d3d12_compile_teardown_testpasses.GPUs tested: RTX 4070 SUPER (
d3d12_compile_teardown_test); the pool test is CPU only.AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).🤖 Generated with Claude Code