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

Open
IxMxAMAR wants to merge 1 commit from upstream-pr/458 into main
IxMxAMAR commented 2026-11-25 01:12:15 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by IxMxAMAR on 2026-11-25T01:12:15Z.


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.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6594816569 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/458). Originally posted by [IxMxAMAR](https://github.com/IxMxAMAR) on 2026-11-25T01:12:15Z. --- 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 commented 2026-11-25 03:06:34 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by IxMxAMAR on 2026-11-25T02:37:11Z.


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.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7150958535 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/458#issuecomment-7150958535). Originally posted by [IxMxAMAR](https://github.com/IxMxAMAR) on 2026-11-25T02:37:11Z. --- 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 cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/458:upstream-pr/458'
git switch 'upstream-pr/458'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/458'
git switch 'upstream-pr/458'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/458'
git switch 'upstream-pr/458'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/458'
git switch 'main'
git merge --squash 'upstream-pr/458'
git switch 'main'
git merge --ff-only 'upstream-pr/458'
git switch 'main'
git merge 'upstream-pr/458'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
fxceless/victory-fork!458
No description provided.