Skip to content

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

Open
IxMxAMAR wants to merge 1 commit into
fxceless:mainfrom
IxMxAMAR:gpu/name-slow-pipeline-makes
Open

IxMxAMAR wants to merge 1 commit into
fxceless:mainfrom
IxMxAMAR:gpu/name-slow-pipeline-makes

Conversation

@IxMxAMAR

Copy link
Copy Markdown

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.
@IxMxAMAR

Copy link
Copy Markdown
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant