perf(gpu): add opt-in sharded pipeline library storage (VICTORY_SHARDED_PSO=1) #419

Closed
github-bot wants to merge 660 commits from github-bot/gh-419 into main AGit
Owner

@⁠Vladimir-Human on GitHub · 2026-11-28 15:22 UTC · original
Vladimir-Human:perf/optin-sharded-pso-library → main · +60615 −5476 · 208 files · 660 commits · closed without merging

Implements the sharded PSO library storage portion of item #2 from #401 strictly opt-in (VICTORY_SHARDED_PSO=1, default OFF = 0).

Summary (4e5defe)

  • pipeline/library/sharded.rs + pipeline/library.rs route pipeline library entries across 64 lazy shards (128 MiB payload cap/shard), flushing only dirty shards atomically (temp + rename) instead of rewriting a monolithic cache blob, and isolating/rebuilding corrupt shards without losing healthy ones.
  • When VICTORY_SHARDED_PSO is unset or 0, retains exact monolithic host-pipelines.bin path and preserves all static-sampler / adapter-key gates; Cargo.lock untouched.
  • Note: full SamplerDescriptorHeap[] indirection is left for a dedicated follow-up (see roadmap note on #401).

Verification

  • cargo xtask policy: OK
  • cargo clippy -p victory-gpu --all-targets --locked -- -D warnings & --features diagnostics: 0 warnings
  • VICTORY_D3D12_DEBUG=1 & VICTORY_D3D12_WARP=1 cargo test -p victory-gpu --features diagnostics --locked --lib pipeline::: 58/58 passed on both
**@⁠Vladimir-Human** on GitHub · 2026-11-28 15:22 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/419) `Vladimir-Human:perf/optin-sharded-pso-library` → `main` · +60615 −5476 · 208 files · 660 commits · closed without merging Implements the sharded PSO library storage portion of item #2 from #401 strictly opt-in (`VICTORY_SHARDED_PSO=1`, default OFF = `0`). ### Summary (`4e5defe`) - `pipeline/library/sharded.rs` + `pipeline/library.rs` route pipeline library entries across 64 lazy shards (128 MiB payload cap/shard), flushing only dirty shards atomically (temp + rename) instead of rewriting a monolithic cache blob, and isolating/rebuilding corrupt shards without losing healthy ones. - When `VICTORY_SHARDED_PSO` is unset or `0`, retains exact monolithic `host-pipelines.bin` path and preserves all static-sampler / adapter-key gates; `Cargo.lock` untouched. - Note: full `SamplerDescriptorHeap[]` indirection is left for a dedicated follow-up (see roadmap note on #401). ### Verification - `cargo xtask policy`: **OK** - `cargo clippy -p victory-gpu --all-targets --locked -- -D warnings` & `--features diagnostics`: **0 warnings** - `VICTORY_D3D12_DEBUG=1` & `VICTORY_D3D12_WARP=1` `cargo test -p victory-gpu --features diagnostics --locked --lib pipeline::`: **58/58 passed** on both
All behavioral changes default OFF (`0`) so baseline execution/DXIL is unchanged
unless explicitly opted in.

Verified: synced=3; policy OK; clippy OK; clippy-diag OK; HW OK (58p); WARP OK (58p) (repairs=0)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 15:26:16 +00:00
Author
Owner

@⁠Garu667 on GitHub · 2026-11-28 18:48 UTC · original

Tested on an RTX 3080 10 GB (4e5defe, Series S, 5 min runs, 1 warm-up run excluded, 3 pairs):

mean fps p10 prep median
off 15.3 / 14.4 / 14.6 10.4 / 6.1 / 7.7 46.5 / 49.0 / 50.8 ms
VICTORY_SHARDED_PSO=1 15.6 / 15.4 / 15.2 9.9 / 9.0 / 8.5 48.4 / 47.5 / 47.8 ms

Slightly ahead with shards on (~+4% mean fps, better p10 in 2 of 3 pairs), but close to run-to-run noise here. No issues seen; pipelines loaded from the library were the same count both ways (~1050).

**@⁠Garu667** on GitHub · 2026-11-28 18:48 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/419#issuecomment-7244067849) Tested on an RTX 3080 10 GB (`4e5defe`, Series S, 5 min runs, 1 warm-up run excluded, 3 pairs): | | mean fps | p10 | prep median | |---|---|---|---| | off | 15.3 / 14.4 / 14.6 | 10.4 / 6.1 / 7.7 | 46.5 / 49.0 / 50.8 ms | | `VICTORY_SHARDED_PSO=1` | 15.6 / 15.4 / 15.2 | 9.9 / 9.0 / 8.5 | 48.4 / 47.5 / 47.8 ms | Slightly ahead with shards on (~+4% mean fps, better p10 in 2 of 3 pairs), but close to run-to-run noise here. No issues seen; pipelines loaded from the library were the same count both ways (~1050).
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-29 11:35 UTC · original

Thanks for the paired sharded-library results. The small improvement is close to the observed variation, so I wouldn't claim a general FPS gain. The equal library-hit counts are useful; cold reload, corrupt-shard recovery and memory overhead matter more for deciding whether to expand this.

**@⁠TaynanGT** on GitHub · 2026-11-29 11:35 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/419#issuecomment-7255218039) Thanks for the paired sharded-library results. The small improvement is close to the observed variation, so I wouldn't claim a general FPS gain. The equal library-hit counts are useful; cold reload, corrupt-shard recovery and memory overhead matter more for deciding whether to expand this.
github-bot closed this pull request 2026-11-30 17:08:48 +00:00
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-30 17:08 UTC · original

main has moved to a new line of the code and everything is now named Vice-Tay, so this PR no longer applies as it is (details in #468). If you'd like this change in, please rebuild it on the current main and open a new PR; I'll review it there.

**@⁠TaynanGT** on GitHub · 2026-11-30 17:08 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/419#issuecomment-7285772760) `main` has moved to a new line of the code and everything is now named Vice-Tay, so this PR no longer applies as it is (details in #468). If you'd like this change in, please rebuild it on the current `main` and open a new PR; I'll review it there.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.