diff options
| author | Aslan2142 <jan.trencansky@protonmail.com> | 2026-11-27 14:19:01 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-11-27 14:19:01 +0100 |
| commit | ec91d695ca5ffebbf327c2127ea49d89547a4e81 (patch) | |
| tree | b41c80bee71fcd8a24327c387588f6f0483ed7e7 /docs | |
| parent | 17d3af0b652c50d1c787e6341739144251dbaa12 (diff) | |
| parent | d4830779134edfc079f0a7419303ce9615c01269 (diff) | |
Merge pull request #2260 from Tyrannys/claude/pipeline-prewarm-order
runtime: prewarm graphics pipelines in recorded order on the compile pool (RT-PIPELINE-PREWARM-ORDER phase 2)
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/d3d12_vulkan.md | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/d3d12_vulkan.md b/docs/d3d12_vulkan.md index e7a1632d6..50dd51614 100644 --- a/docs/d3d12_vulkan.md +++ b/docs/d3d12_vulkan.md | |||
| @@ -2816,6 +2816,24 @@ Pipeline creation: | |||
| 2816 | A root signature the runtime does not know is hashed by its address, so the key of a pipeline made with one can | 2816 | A root signature the runtime does not know is hashed by its address, so the key of a pipeline made with one can |
| 2817 | change from one run to the next. The file is local, like the cache files, and is not meant to be attached to a | 2817 | change from one run to the next. The file is local, like the cache files, and is not meant to be attached to a |
| 2818 | report: quote the counts. It changes no build, order or cache. | 2818 | report: quote the counts. It changes no build, order or cache. |
| 2819 | `LEONIDA_PIPELINE_PREWARM_ORDER=<file>` reads such a log at boot and builds, ahead of their first draw, the graphics | ||
| 2820 | and mesh pipelines an earlier run asked for first (RT-PIPELINE-PREWARM-ORDER, phase 2; `runtime/src/pipeline_prewarm.h`). | ||
| 2821 | `1` names `pipeline_order.log` beside the session cache; it is read before this run's own record is appended, so | ||
| 2822 | both variables can be on together. Of the runs recorded on this GPU (vendor and device id), the one with the most | ||
| 2823 | records is read, the newest on a tie. When the title creates a PSO whose key is in it, each recorded variant is | ||
| 2824 | queued on the compile workers as a warm-up at its recorded rank: after every demanded build, one warm-up at a time | ||
| 2825 | and none while a demanded build runs (`PipelineCompiler`; the compile-gate finding in "Compile workers" below is | ||
| 2826 | why), ahead of the compute warm-up's size order and before the cache checkpoint. A variant 0 built at create is | ||
| 2827 | skipped. A console stream kept for its first bind (`LEONIDA_PIPELINE_COMPILE=on-demand`) is otherwise parsed only | ||
| 2828 | there, which would leave the prewarm no lead: when its pipeline is in the plan, the parse is queued as its first | ||
| 2829 | prewarm job instead (at the rank of its first recorded variant, on a compile worker), and its variants follow with | ||
| 2830 | their ranks. A bind that comes first waits for that parse, which it would otherwise have done itself. Records are taken in order until their recorded build times add up to | ||
| 2831 | `LEONIDA_PIPELINE_PREWARM_BUDGET_MS` (default 300000; a record with no build time counts 1000 ms), and at most | ||
| 2832 | `LEONIDA_PIPELINE_PREWARM_MAX_ENTRIES` (default 4096). Compute records are left to the compute warm-up and to | ||
| 2833 | `gta6rt --precompile-pipelines`. A missing or unreadable file, a file with no readable record and a file from | ||
| 2834 | another GPU are ignored with one `[rt] pipeline-prewarm:` line; a damaged line is skipped, as are line types a v1 | ||
| 2835 | reader does not know (`E`). A queued prewarm holds no reference: a PSO released first drops it. One that is already | ||
| 2836 | running when the title submits still holds the compile gate (`LEONIDA_COMPILE_GATE`), as any warm-up does. | ||
| 2819 | A queued build holds no reference to its PSO or device (`PipelineCompiler`, `runtime/shims/d3d12_pipeline_compile.h`). | 2837 | A queued build holds no reference to its PSO or device (`PipelineCompiler`, `runtime/shims/d3d12_pipeline_compile.h`). |
| 2820 | A PSO's last release drops its queued builds and returns at once; one already running is left to finish, and the | 2838 | A PSO's last release drops its queued builds and returns at once; one already running is left to finish, and the |
| 2821 | worker deletes the PSO after it (`PipelineState::last_release`). The PSO's device reference goes at the release, so | 2839 | worker deletes the PSO after it (`PipelineState::last_release`). The PSO's device reference goes at the release, so |