Count completed host pipeline outcomes by stage #1127

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

@⁠ghptc on GitHub · 2026-11-28 13:43 UTC · original
ghptc:perf/pso → main · +226 −47 · 3 files · 1 commits · open

Count completed host pipeline outcomes by stage

An absent library or static-sampler bypass could increment “made” even when the driver refused creation. Report completed requests per compute, conventional graphics and mesh pipeline, including graphics using the depth-bounds stream. Every completed request takes one of three paths through the library decision. It bypasses the library, loads a pipeline, or receives a lookup refusal. Both bypass and lookup refusal can produce a successful or refused creation. Each successful named creation attempts a store. Store refusal preserves the usable PSO and its successful creation count.

The aggregate records elapsed nanoseconds in the load, create and store paths. Those times include the locks and diagnostic calls belonging to the operation. They sum elapsed worker time and can overlap between workers. Reporting follows the existing save hooks with a separate 20-second throttle and forced report, including when no library exists. Accounting occurs after each request returns. A process or worker that aborts inside a driver call can leave that request out. Existing early-start and shader-translation cache counters retain their distinct meanings.

Tests. A CPU mock drives the same resolve function used by the D3D12 adapter through 16 combinations of named/bypass, load, creation and store outcomes. It checks returned values, forbidden callback paths, and the three accounting identities. The Windows-target production code, static-sampler test, and stream callers type-checked with default and diagnostics features.

Prior work. The NVIDIA-fork’s six pipeline-library PR title matches covered cache creation, storage, disk writes, adapter keys, preloading and scheduling. #770 correlates compute creation with the first bind from logs. Searches for PSO counters and “store failures” found no equivalent completed-call accounting. The parent project’s library and counter titles were also screened. Null-library behavior #120 · Library saving #919 · First-bind analysis #770

Reproduce

From this independent PR head with the pinned Rust toolchain on Linux, compile the production module directly.

set -eu
scratch=$(mktemp -d)
printf '#[path="%s/crates/victory-gpu/src/pipeline/library/outcomes.rs"] mod production;\n' "$PWD" > "$scratch/test.rs"
rustc --edition=2024 --test -A dead_code "$scratch/test.rs" -o "$scratch/check"
"$scratch/check" --test-threads=1

On Windows use cargo test --release --locked -j 2 -p victory-gpu --lib pipeline::library::outcomes::tests -- --test-threads=1. The mock exercises all 16 combinations of availability and load, create and store outcomes. #1114 changes static-sampler cache policy and the slow list. The Windows target type-checked with and without diagnostics. The CPU regressions passed again on the submitted commit. Gameplay timings and driver overhead remain unmeasured.

**@⁠ghptc** on GitHub · 2026-11-28 13:43 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1127) `ghptc:perf/pso` → `main` · +226 −47 · 3 files · 1 commits · open # Count completed host pipeline outcomes by stage An absent library or static-sampler bypass could increment “made” even when the driver refused creation. Report completed requests per compute, conventional graphics and mesh pipeline, including graphics using the depth-bounds stream. Every completed request takes one of three paths through the library decision. It bypasses the library, loads a pipeline, or receives a lookup refusal. Both bypass and lookup refusal can produce a successful or refused creation. Each successful named creation attempts a store. Store refusal preserves the usable PSO and its successful creation count. The aggregate records elapsed nanoseconds in the load, create and store paths. Those times include the locks and diagnostic calls belonging to the operation. They sum elapsed worker time and can overlap between workers. Reporting follows the existing save hooks with a separate 20-second throttle and forced report, including when no library exists. Accounting occurs after each request returns. A process or worker that aborts inside a driver call can leave that request out. Existing early-start and shader-translation cache counters retain their distinct meanings. **Tests.** A CPU mock drives the same resolve function used by the D3D12 adapter through 16 combinations of named/bypass, load, creation and store outcomes. It checks returned values, forbidden callback paths, and the three accounting identities. The Windows-target production code, static-sampler test, and stream callers type-checked with default and diagnostics features. **Prior work.** The NVIDIA-fork’s six pipeline-library PR title matches covered cache creation, storage, disk writes, adapter keys, preloading and scheduling. #770 correlates compute creation with the first bind from logs. Searches for PSO counters and “store failures” found no equivalent completed-call accounting. The parent project’s library and counter titles were also screened. [Null-library behavior #120](https://git.gtahub.st/github/trustno1-coder--VIctory-NVIDIA/pulls/120) · [Library saving #919](https://git.gtahub.st/github/trustno1-coder--VIctory-NVIDIA/pulls/919) · [First-bind analysis #770](https://git.gtahub.st/github/trustno1-coder--VIctory-NVIDIA/pulls/770) ## Reproduce From this independent PR head with the pinned Rust toolchain on Linux, compile the production module directly. ```bash set -eu scratch=$(mktemp -d) printf '#[path="%s/crates/victory-gpu/src/pipeline/library/outcomes.rs"] mod production;\n' "$PWD" > "$scratch/test.rs" rustc --edition=2024 --test -A dead_code "$scratch/test.rs" -o "$scratch/check" "$scratch/check" --test-threads=1 ``` On Windows use `cargo test --release --locked -j 2 -p victory-gpu --lib pipeline::library::outcomes::tests -- --test-threads=1`. The mock exercises all 16 combinations of availability and load, create and store outcomes. #1114 changes static-sampler cache policy and the slow list. The Windows target type-checked with and without diagnostics. The CPU regressions passed again on the submitted commit. Gameplay timings and driver overhead remain unmeasured.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 14:33:53 +00:00
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/pipeline/library.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1127'
git switch 'github-bot/gh-1127'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1127'
git switch 'github-bot/gh-1127'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1127'
git switch 'main'
git merge --squash 'github-bot/gh-1127'
git switch 'main'
git merge --ff-only 'github-bot/gh-1127'
git switch 'main'
git merge 'github-bot/gh-1127'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!1127
No description provided.