GPU: save only changed host pipeline-library shards #1650
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1651"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by avt0m4t48 on 2026-11-24T20:28:30Z.
GPU-PIPELINE-LIBRARY-SIZE, tracked in #1633.
Partition host pipeline-library entries by the first hexadecimal digit of the existing content hash. The sixteen files open on first use, and a save serializes only the opened shards with new entries. Each file is replaced atomically. Failed serialization or writes retain the dirty state for a later save. The early-pipeline list saves independently.
Existing
host-pipelines.binfiles stay untouched. A shard miss can fall back to the legacy library and promote a successful lookup into the new shard. This preserves warm legacy entries. After the first miss the legacy blob can remain in memory until exit, and the legacy file and new shards coexist on disk until the legacy file is removed separately. Saves are serialized within one process. Separate processes sharing a cache still replace a shared shard on a last-writer-wins basis.Verification:
cargo check --locked --tests --target x86_64-pc-windows-msvc -p victory-gpu --features diagnostics,blake3/pure.VICTORY_D3D12_WARP=1andcargo test --locked -p victory-gpu --features diagnostics pipeline::library:: -- --nocapturepassed 7/7, including creating, saving, reopening and loading a real synthetic D3D12 compute pipeline. Windows verificationThis changes file granularity. Merge-tree checks found conflicts with #275 (background saves), #1041 (pipeline deduplication), and #640 (failed-save retry) in the library file. These need reconciliation if combined. Title workload I/O savings and physical-adapter behavior remain unmeasured.
AI-assisted, using original source and synthetic inputs.
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T22:19:53Z.
Review: COMMENTED
Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.
Only changed host pipeline-library shards are saved: serialize() per shard, device()/shard() accessors, old monolith kept for shard misses opened lazily. 28K diff, Windows-only — the shard-miss fallback path deserves a Windows CI run with a real library.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:23:17Z.
Automated triage for the maintainers. Closing because another open pull request covers the same change.
See #1653. Same sharding task as #1653 (#1633) in four times the code, with a legacy-file fallback that keeps the old blob in memory.
If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:33:24Z.
Automated triage for the maintainers.
Needs rebase. This pull request conflicts with
main(conflicting:crates/victory-gpu/src/pipeline/library.rs). It will be reviewed once it is rebased onto the currentmain.Generated by Claude Code
Pull request closed