GPU: save only changed host pipeline-library shards #1651

Closed
github-bot wants to merge 2 commits from gh-pr/1651/head into gh-pr/1651/base
Owner

@⁠avt0m4t48 on GitHub · 2026-11-24 20:28 UTC · original
avt0m4t48:fix/pipeline-library-shards → main · +506 −95 · 2 files · 2 commits · closed without merging

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.bin files 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:

  • Linux standalone Rust tests of shard selection, dirty saves, failed-save retry and competing replacements: 4/4 with warnings denied.
  • Linux Windows-target compile: cargo check --locked --tests --target x86_64-pc-windows-msvc -p victory-gpu --features diagnostics,blake3/pure.
  • Windows WARP: VICTORY_D3D12_WARP=1 and cargo test --locked -p victory-gpu --features diagnostics pipeline::library:: -- --nocapture passed 7/7, including creating, saving, reopening and loading a real synthetic D3D12 compute pipeline. Windows verification

This 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.

**@⁠avt0m4t48** on GitHub · 2026-11-24 20:28 UTC · [original](https://github.com/Marvisak/VIctory/pull/1651) `avt0m4t48:fix/pipeline-library-shards` → `main` · +506 −95 · 2 files · 2 commits · closed without merging 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.bin` files 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: - Linux standalone Rust tests of shard selection, dirty saves, failed-save retry and competing replacements: 4/4 with warnings denied. - Linux Windows-target compile: `cargo check --locked --tests --target x86_64-pc-windows-msvc -p victory-gpu --features diagnostics,blake3/pure`. - Windows WARP: `VICTORY_D3D12_WARP=1` and `cargo test --locked -p victory-gpu --features diagnostics pipeline::library:: -- --nocapture` passed 7/7, including creating, saving, reopening and loading a real synthetic D3D12 compute pipeline. [Windows verification](https://github.com/avt0m4t48/VIctory/actions/runs/45480625023) This 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:39:55 +00:00
github-bot closed this pull request 2026-11-26 04:39:55 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 01:23 UTC · original

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.

**@⁠Marvisak** on GitHub · 2026-11-25 01:23 UTC · [original](https://github.com/Marvisak/VIctory/pull/1651#issuecomment-7149492805) 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.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 01:33 UTC · original

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 current main.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 01:33 UTC · [original](https://github.com/Marvisak/VIctory/pull/1651#issuecomment-7149682692) <!-- victory-triage v1 head=955905163ecb3d8f800b5d0a3514b76c5ec8cebd verdict=needs-rebase at=2026-11-25T01:33:23Z --> 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 current `main`. --- _Generated by [Claude Code](https://claude.ai/code)_

Pull request closed

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/Marvisak--VIctory!1651
No description provided.