diff options
| author | radv-tinker <221537828+radv-tinker@users.noreply.github.com> | 2026-11-23 00:26:54 +0000 |
|---|---|---|
| committer | radv-tinker <221537828+radv-tinker@users.noreply.github.com> | 2026-11-23 00:30:02 +0000 |
| commit | 1c604af1a0a9649ae2eef19156a7c0627c676318 (patch) | |
| tree | 20cc8c18641dec460576a6bbe0edba58ce0626bb /runtime/src/tls_host.cpp | |
| parent | aa2988cc555bad7ecd508b48a702adbb32fe7c95 (diff) | |
vk_pipeline_check: large modules share a memory budget instead of compiling alone
Modules over --large-module-bytes compiled one at a time with every other thread waiting. On the translated
corpus that is 695 modules (the ray-tracing compute shaders, ~14k RDNA2 instructions each, ~4.9 MB of SPIR-V),
about 12 s and 2 GB each on RADV GFX1201, so the pipelines stage spent hours mostly single-threaded.
large_module_gate.h lets large modules in while 512 bytes per SPIR-V byte fits 3/4 of the memory available at
start (Linux: MemAvailable and the cgroup v2 memory.max room up the tree; Windows: ullAvailPhys), one always
admitted when none is in, small modules never held back. Unknown memory keeps the old exclusive gate, as does
--large-parallel 1. malloc_trim(0) after each large module returns what glibc kept in per-thread arenas.
40 modules (27 large), Mesa shader cache off, RX 9070 XT / Mesa 25.3.6: 297 s -> 83 s on 6 threads (7.1 -> 8.3 GB
peak), 56 s on 12 threads (15.1 GB).
Tested: large_module_gate_test (Linux, and the clang-cl build under Proton), ctest on Linux (40 passed, 2
skipped), vk_pipeline_check over 40 real modules in three modes, and the pipelines stage over the corpus with the
gate: 26,000+ of 26,503 modules in 15 min, none failed. The largest module (26 MB of SPIR-V) was still compiling
alone on RADV after 25 min, as it would under the old gate. AI-assisted.
Diffstat (limited to 'runtime/src/tls_host.cpp')
0 files changed, 0 insertions, 0 deletions