[PR #2393] [MERGED] runtime: --precompile-pipelines builds the skip-listed programs unless --skip-listed (RT-PRECOMPILE-SKIP-LIST-EXPLICIT) #2395

Closed
opened 2026-11-26 21:21:06 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/2393
Author: @aslan2142
Created: 11/26/2026
Status: ✅ Merged
Merged: 11/26/2026
Merged by: @aslan2142

Base: main ← Head: precompile-skip-list-explicit


📝 Commits (1)

  • 7610956 d3d12: --precompile-pipelines builds the skip-listed programs unless --skip-listed

📊 Changes

8 files changed (+238 additions, -31 deletions)

View changed files

📝 docs/d3d12_vulkan.md (+18 -3)
📝 docs/linux_proton.md (+13 -4)
📝 docs/running.md (+22 -6)
📝 runtime/CMakeLists.txt (+12 -0)
📝 runtime/shims/d3d12_precompile.h (+6 -0)
📝 runtime/shims/d3d12_vulkan_device.cpp (+39 -14)
📝 runtime/src/main.cpp (+5 -4)
➕ runtime/test/check_precompile_skip_list.cmake (+123 -0)

📄 Description

gta6rt --precompile-pipelines now builds the compute programs LEONIDA_SKIP_COMPUTE names. It leaves them out only when given --skip-listed, and its last line counts what it built and what it left out.

Claim: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7198146296

Credit: the method is @MoonEyes's finding. They showed first, on an RTX 4060, that the large library programs build offline with the skip list unset and that the journal then serves them in the game. This PR makes the precompile do that by default; the measurements below repeat their test on an AMD card.

What changes

  • precompile_compute_pipelines builds every compute entry, whether LEONIDA_SKIP_COMPUTE names it or not. When the list names some, one line says how many and that they are built anyway.
  • New flag --skip-listed, next to --filter: it leaves the listed entries out, one not built (LEONIDA_SKIP_COMPUTE, --skip-listed) line each.
  • The last line now covers the whole run, for example:
    [precompile] done: 1 built (1 compiled, 0 from a cache), 0 journaled already, 0 being built by another process, 0 failed; left out: 1 of 1 listed in LEONIDA_SKIP_COMPUTE (--skip-listed), 0 not buildable, 0 filtered out; in 0 s
  • Entries cut by --limit now count as filtered out.
  • BuildHost::unbuildable no longer checks the list. --compile-server still leaves listed programs out, as before: it runs for a game that drops their dispatches.
  • Docs: docs/running.md, docs/linux_proton.md and docs/d3d12_vulkan.md describe the new behaviour and no longer give compile time as the reason for the skip list. The lines about the pipelines stage are untouched (MAKE-GAME-PIPELINES-VIA-RUNTIME).

Why

  • LEONIDA_SKIP_COMPUTE is a play-time setting: the game drops the listed programs' dispatches.
  • Players run the precompile with the game's environment, as docs/running.md tells them. So their skip list kept those programs out of the journal for good, and a later run without the list had to compile them in the game.
  • A pipelines stage that calls this precompile would have inherited the same behaviour.

Measurements

RX 7900 XTX, RADV (Mesa 26.3.1), Wine, native wave64 pack (--wave64-emulate off):

  • All 721 library/ programs of 2 MiB or more built.
  • 360 of them took 170 s on 32 threads, 2.5 to 32 s each, with a peak of 14 GiB of RAM.
  • The largest (13 MiB) built in 28.5 s alone.
  • The 89-167 s per program in the docs came from wave64-emulated packs.
  • World runs with all 721 in the journal, LEONIDA_RT_AS=off and no skip list (one run per condition):
    • the journal served them all: 2,700 compute pipelines from the journal, against 1,900 with the skip list set, and none built in the game;
    • run A (a local build of main 56bdd7e88 plus four then-open PRs) reached the world with no GPU fault for 404 s, then the game stopped submitting with the GPU idle (a lock in the runtime is suspected; cause not found);
    • run B (main bd6ba97ab) hit a read page fault at about 214 s, then a graphics-ring timeout 30 s later and a lost device, with every queue idle in the dispatch markers.
  • The same idle-queue device loss also happens with the skip list set (two more runs the same day, one of them with acceleration structures built). With the skip list set, the best runs reach about 11 minutes and stop on a title breakpoint.
  • So on this card the loss is not shown to come from the large programs, and running them got no further. Whether their output is correct is not measured.
  • The docs therefore drop compile time as the reason for the skip list but keep the skip list plus LEONIDA_RT_AS=off as the setting our longest runs used. The RTX 3090 Linux/Proton report stays as its author's.

Tests

The branch is one commit on main bd6ba97ab. The rebase from 935a2cd5b had no conflicts. The full Wine suite ran before the rebase; the other checks below were run again on bd6ba97ab.

  • New ctest precompile_skip_list (runtime/test/check_precompile_skip_list.cmake). It uses two synthetic compute modules, one of them listed, and runs the precompile three times:
    • with the list set and no flag, both entries are built;
    • with --skip-listed, only the unlisted one is built and the listed one is named;
    • in the first journal again, both are journaled already.
  • It fails on main (a 56bdd7e88 build): main leaves the listed entry out, writes 1 journal file instead of 2, and rejects --skip-listed. It passes on this branch, before and after the rebase onto bd6ba97ab (under Wine, iGPU).
  • Windows runtime, clang-cl + xwin cross-build, under Wine on the Ryzen 7950X3D iGPU (RADV, Mesa 26.3.1). Full suite, before the rebase: 418 pass, 24 fail, 39 skip. Against main at 56bdd7e88 the only changes are the new test and xmem_write_watch (a known flake) going from fail to pass. No test went from pass to fail.
  • Linux runtime build and ctest on bd6ba97ab (iGPU): 112 of 112 passed, 2 skipped.
  • tests/test_docs_*.py, tests/test_ci_registration.py, tests/test_ctest_registration.py, tests/test_text_write_line_endings.py: pass.
  • scripts/check_no_game_data.py on the changed files: clean.

Not tested

  • MSVC (/W4 /permissive-) and native Windows: left to CI.
  • NVIDIA. With a wave64-emulated pack the large programs still take minutes each to build. The docs point to --big-threads and --skip-listed there.
  • A full precompile of a game library on this branch: the measurements above come from --filter runs of the same code path.
  • Overlap with #2198 (--verify): it touches the same selection loop, the usage line and PrecompileOptions. Expect a small textual conflict but none in behaviour: its check runs with every LEONIDA_* variable cleared and looks for 0 failed, which the new last line keeps.

AI-assisted (Claude Code, Claude Opus 5.5 and Claude Fable 5.2)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/2393 **Author:** [@aslan2142](https://github.com/aslan2142) **Created:** 11/26/2026 **Status:** ✅ Merged **Merged:** 11/26/2026 **Merged by:** [@aslan2142](https://github.com/aslan2142) **Base:** `main` ← **Head:** `precompile-skip-list-explicit` --- ### 📝 Commits (1) - [`7610956`](https://github.com/ubiquitarianism/leonida/commit/76109561f4e392fd0da97a2d4b936b35c83e821a) d3d12: --precompile-pipelines builds the skip-listed programs unless --skip-listed ### 📊 Changes **8 files changed** (+238 additions, -31 deletions) <details> <summary>View changed files</summary> 📝 `docs/d3d12_vulkan.md` (+18 -3) 📝 `docs/linux_proton.md` (+13 -4) 📝 `docs/running.md` (+22 -6) 📝 `runtime/CMakeLists.txt` (+12 -0) 📝 `runtime/shims/d3d12_precompile.h` (+6 -0) 📝 `runtime/shims/d3d12_vulkan_device.cpp` (+39 -14) 📝 `runtime/src/main.cpp` (+5 -4) ➕ `runtime/test/check_precompile_skip_list.cmake` (+123 -0) </details> ### 📄 Description `gta6rt --precompile-pipelines` now builds the compute programs `LEONIDA_SKIP_COMPUTE` names. It leaves them out only when given `--skip-listed`, and its last line counts what it built and what it left out. Claim: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7198146296 Credit: the method is @MoonEyes's [finding](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7198006861). They showed first, on an RTX 4060, that the large library programs build offline with the skip list unset and that the journal then serves them in the game. This PR makes the precompile do that by default; the measurements below repeat their test on an AMD card. ## What changes - `precompile_compute_pipelines` builds every compute entry, whether `LEONIDA_SKIP_COMPUTE` names it or not. When the list names some, one line says how many and that they are built anyway. - New flag `--skip-listed`, next to `--filter`: it leaves the listed entries out, one `not built (LEONIDA_SKIP_COMPUTE, --skip-listed)` line each. - The last line now covers the whole run, for example: `[precompile] done: 1 built (1 compiled, 0 from a cache), 0 journaled already, 0 being built by another process, 0 failed; left out: 1 of 1 listed in LEONIDA_SKIP_COMPUTE (--skip-listed), 0 not buildable, 0 filtered out; in 0 s` - Entries cut by `--limit` now count as filtered out. - `BuildHost::unbuildable` no longer checks the list. `--compile-server` still leaves listed programs out, as before: it runs for a game that drops their dispatches. - Docs: `docs/running.md`, `docs/linux_proton.md` and `docs/d3d12_vulkan.md` describe the new behaviour and no longer give compile time as the reason for the skip list. The lines about the `pipelines` stage are untouched (MAKE-GAME-PIPELINES-VIA-RUNTIME). ## Why - `LEONIDA_SKIP_COMPUTE` is a play-time setting: the game drops the listed programs' dispatches. - Players run the precompile with the game's environment, as `docs/running.md` tells them. So their skip list kept those programs out of the journal for good, and a later run without the list had to compile them in the game. - A `pipelines` stage that calls this precompile would have inherited the same behaviour. ## Measurements RX 7900 XTX, RADV (Mesa 26.3.1), Wine, native wave64 pack (`--wave64-emulate off`): - All 721 `library/` programs of 2 MiB or more built. - 360 of them took 170 s on 32 threads, 2.5 to 32 s each, with a peak of 14 GiB of RAM. - The largest (13 MiB) built in 28.5 s alone. - The 89-167 s per program in the docs came from wave64-emulated packs. - World runs with all 721 in the journal, `LEONIDA_RT_AS=off` and no skip list (one run per condition): - the journal served them all: 2,700 compute pipelines from the journal, against 1,900 with the skip list set, and none built in the game; - run A (a local build of `main` `56bdd7e88` plus four then-open PRs) reached the world with no GPU fault for 404 s, then the game stopped submitting with the GPU idle (a lock in the runtime is suspected; cause not found); - run B (`main` `bd6ba97ab`) hit a read page fault at about 214 s, then a graphics-ring timeout 30 s later and a lost device, with every queue idle in the dispatch markers. - The same idle-queue device loss also happens with the skip list set (two more runs the same day, one of them with acceleration structures built). With the skip list set, the best runs reach about 11 minutes and stop on a title breakpoint. - So on this card the loss is not shown to come from the large programs, and running them got no further. Whether their output is correct is not measured. - The docs therefore drop compile time as the reason for the skip list but keep the skip list plus `LEONIDA_RT_AS=off` as the setting our longest runs used. The RTX 3090 Linux/Proton report stays as its author's. ## Tests The branch is one commit on `main` `bd6ba97ab`. The rebase from `935a2cd5b` had no conflicts. The full Wine suite ran before the rebase; the other checks below were run again on `bd6ba97ab`. - New ctest `precompile_skip_list` (`runtime/test/check_precompile_skip_list.cmake`). It uses two synthetic compute modules, one of them listed, and runs the precompile three times: - with the list set and no flag, both entries are built; - with `--skip-listed`, only the unlisted one is built and the listed one is named; - in the first journal again, both are journaled already. - It fails on `main` (a `56bdd7e88` build): main leaves the listed entry out, writes 1 journal file instead of 2, and rejects `--skip-listed`. It passes on this branch, before and after the rebase onto `bd6ba97ab` (under Wine, iGPU). - Windows runtime, clang-cl + xwin cross-build, under Wine on the Ryzen 7950X3D iGPU (RADV, Mesa 26.3.1). Full suite, before the rebase: 418 pass, 24 fail, 39 skip. Against `main` at `56bdd7e88` the only changes are the new test and `xmem_write_watch` (a known flake) going from fail to pass. No test went from pass to fail. - Linux runtime build and `ctest` on `bd6ba97ab` (iGPU): 112 of 112 passed, 2 skipped. - `tests/test_docs_*.py`, `tests/test_ci_registration.py`, `tests/test_ctest_registration.py`, `tests/test_text_write_line_endings.py`: pass. - `scripts/check_no_game_data.py` on the changed files: clean. ## Not tested - MSVC (`/W4 /permissive-`) and native Windows: left to CI. - NVIDIA. With a wave64-emulated pack the large programs still take minutes each to build. The docs point to `--big-threads` and `--skip-listed` there. - A full precompile of a game library on this branch: the measurements above come from `--filter` runs of the same code path. - Overlap with #2198 (`--verify`): it touches the same selection loop, the usage line and `PrecompileOptions`. Expect a small textual conflict but none in behaviour: its check runs with every `LEONIDA_*` variable cleared and looks for `0 failed`, which the new last line keeps. AI-assisted (Claude Code, Claude Opus 5.5 and Claude Fable 5.2) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 21:21:06 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#2395
No description provided.