Skip to content

Count completed host pipeline outcomes by stage - #1127

Open
ghptc wants to merge 1 commit into
trustno1-coder:mainfrom
ghptc:perf/pso
Open

ghptc wants to merge 1 commit into
trustno1-coder:mainfrom
ghptc:perf/pso

Conversation

@ghptc

@ghptc ghptc commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

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
ghptc marked this pull request as ready for review November 28, 2026 13:51
MystifiedSky added a commit to MystifiedSky/VIctory-NVIDIA-Improved that referenced this pull request Nov 28, 2026
…tno1-coder#1127)

(cherry picked from commit b81ab20e50dc746d28308294f68ef07d809fee37)
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