GPU: name a host pipeline a worker has held for a minute #458

Open
github-bot wants to merge 1 commit from github-bot/gh-458 into main AGit
Owner

@⁠IxMxAMAR on GitHub · 2026-11-25 01:12 UTC · original
IxMxAMAR:gpu/name-slow-pipeline-makes → main · +108 −2 · 3 files · 1 commits · open

Some driver compiles never end. On an RX 9070 XT (Adrenalin 32.0.32029.2010), AMD's compiler kept one pipeline worker on compute 39f0e9aeb156a61c for whole runs (the early start of a skipped pipeline, #172) while its own heap grew past 30 GB. The frame line only ever said (1 being made), so it took several runs and an outside memory probe to name the shader.

Change

  • Each pipeline worker records which pipeline it holds and since when (make::hold).
  • With the frame statistics, every second, a pipeline held for 60 s or more is named once in a warning, with its shaders as stage hash, the form VICTORY_SKIP_PIPELINES takes:
    a host pipeline is still being made: the driver's compile may never end (VICTORY_SKIP_PIPELINES takes its shader hashes) shaders=compute 39f0e9aeb156a61c seconds=61
  • Pipelines made on the calling thread (make::now, or when no worker could start) are not watched: a compile that never ends there stops that thread outright, which shows anyway.

Not gated on diagnostics: the frame statistics run in every build.

Tests

  • New pipeline::make::tests::a_pipeline_held_a_minute_is_named_once (no GPU: a start time a minute back stands for the endless compile): named once at 60 s, not again 5 s later, and a pipeline held 30 s less is not named.
  • cargo test -p victory-gpu --lib: 113 passed. cargo clippy -p victory-gpu --all-targets -- -D warnings, with and without --all-features: clean.

Made with the help of an AI.

**@⁠IxMxAMAR** on GitHub · 2026-11-25 01:12 UTC · [original](https://github.com/fxceless/victory-fork/pull/458) `IxMxAMAR:gpu/name-slow-pipeline-makes` → `main` · +108 −2 · 3 files · 1 commits · open Some driver compiles never end. On an RX 9070 XT (Adrenalin 32.0.32029.2010), AMD's compiler kept one pipeline worker on `compute 39f0e9aeb156a61c` for whole runs (the early start of a skipped pipeline, #172) while its own heap grew past 30 GB. The frame line only ever said `(1 being made)`, so it took several runs and an outside memory probe to name the shader. ## Change - Each pipeline worker records which pipeline it holds and since when (`make::hold`). - With the frame statistics, every second, a pipeline held for 60 s or more is named once in a warning, with its shaders as `stage hash`, the form `VICTORY_SKIP_PIPELINES` takes: `a host pipeline is still being made: the driver's compile may never end (VICTORY_SKIP_PIPELINES takes its shader hashes) shaders=compute 39f0e9aeb156a61c seconds=61` - Pipelines made on the calling thread (`make::now`, or when no worker could start) are not watched: a compile that never ends there stops that thread outright, which shows anyway. Not gated on `diagnostics`: the frame statistics run in every build. ## Tests - New `pipeline::make::tests::a_pipeline_held_a_minute_is_named_once` (no GPU: a start time a minute back stands for the endless compile): named once at 60 s, not again 5 s later, and a pipeline held 30 s less is not named. - `cargo test -p victory-gpu --lib`: 113 passed. `cargo clippy -p victory-gpu --all-targets -- -D warnings`, with and without `--all-features`: clean. Made with the help of an AI.
Some driver compiles never end. On an RX 9070 XT (Adrenalin 32.0.32029.2010),
AMD's compiler kept one pipeline worker on compute 39f0e9aeb156a61c for whole
runs while its own heap grew past 30 GB, and the frame line only ever said
"(1 being made)".

Each worker now records which pipeline it holds and since when. From the frame
statistics, every second, a pipeline held for 60 s or more is named once in a
warning with its shaders as `stage hash`, the hashes VICTORY_SKIP_PIPELINES
takes. Pipelines made on the calling thread (make::now, no workers) are not
watched: a never-ending compile there stops that thread outright.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:43:47 +00:00
Author
Owner

@⁠IxMxAMAR on GitHub · 2026-11-25 02:37 UTC · original

Seen in the game: a run of c96b4f2 with this PR (plus #195, #459, #318 and a NaN guard), RX 9070 XT, 39f0e9aeb156a61c not skipped, logged

WARN victory_gpu::pipeline::make: a host pipeline is still being made: the driver's compile may never end (VICTORY_SKIP_PIPELINES takes its shader hashes) shaders=compute 39f0e9aeb156a61c seconds=61

The pipeline was made 11 s later (about 70 s in all, in line with tightfall's ~80 s since 1684989), and no other pipeline was held for a minute in the 14-minute run. On a tree from before 1684989, the same line would have named the compile that never ended within its first minute.

**@⁠IxMxAMAR** on GitHub · 2026-11-25 02:37 UTC · [original](https://github.com/fxceless/victory-fork/pull/458#issuecomment-7150958535) Seen in the game: a run of `c96b4f2` with this PR (plus #195, #459, #318 and a NaN guard), RX 9070 XT, `39f0e9aeb156a61c` not skipped, logged ``` WARN victory_gpu::pipeline::make: a host pipeline is still being made: the driver's compile may never end (VICTORY_SKIP_PIPELINES takes its shader hashes) shaders=compute 39f0e9aeb156a61c seconds=61 ``` The pipeline was made 11 s later (about 70 s in all, in line with tightfall's ~80 s since 1684989), and no other pipeline was held for a minute in the 14-minute run. On a tree from before 1684989, the same line would have named the compile that never ended within its first minute.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/458/head:github-bot/gh-458'
git switch 'github-bot/gh-458'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-458'
git switch 'github-bot/gh-458'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-458'
git switch 'github-bot/gh-458'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-458'
git switch 'main'
git merge --squash 'github-bot/gh-458'
git switch 'main'
git merge --ff-only 'github-bot/gh-458'
git switch 'main'
git merge 'github-bot/gh-458'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.