gpu/pipeline: adapter-keyed PSO cache filenames and atomic rename (1/4 of #51) #56
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/PastiiJay--klbf-lab!56
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-56"
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?
@Vladimir-Human on GitHub · 2026-11-26 00:26 UTC · original
Vladimir-Human:perf/split-adapter-pso-cache→beta· +539 −44 · 1 files · 1 commits · openPart 1/4 of the split requested on #51, cleanly branched from
beta(78ad5711).Scope
crates/victory-gpu/src/pipeline/library.rs.AdapterKey(VendorId,DeviceId,Revision, andis_softwareflag;GetAdapterLuidis used only to locate the matching DXGI adapter) so WARP/iGPU/dGPU runs never overwrite or load an incompatible GPU's cache blob.Verification (with
VICTORY_D3D12_DEBUG=1)cargo test -p victory-gpu pipeline::library: passed (includesadapter_keys_produce_distinct_filenames_for_hardware_and_software,legacy_fallback_reads_hardware_cache_and_never_touches_it_on_warp,warp_save_does_not_discard_hardware_pipeline_library)cargo test -p victory-gpu --all-features --lib pipeline::library: passedcargo test -p victory-gpu: full crate test suite passed (157 passed; 0 failed; 3 ignored)cargo run -p xtask -- policy --staged: passed (library.rsis 58,047 bytes)@PastiiJay on GitHub · 2026-11-26 00:34 UTC · original
Got it, part 1/4 is in the queue. One detail: the code still keys the filename on vendor, device, revision and the software flag (the LUID is only used to find the adapter), while the description lists SubSysId and AdapterLuid too, so the summary could use the same fix as #51.
@Vladimir-Human on GitHub · 2026-11-26 00:48 UTC · original
Good catch, thanks @PastiiJay — updated the PR #56 description to list only
(VendorId, DeviceId, Revision, is_software)in the filename key and note thatAdapterLuidis only used to look up the DXGI adapter.@HandshakeHackin on GitHub · 2026-11-26 02:44 UTC · original
I compared the split with the version we tested earlier.
pipeline/library.rsis byte-for-byte identical in356690cand7d31a81(Git blob9d948988). The earlier Windows WARP save/reopen run covered this file, including preserving both synthetic hardware and legacy cache files. Windows runOne detail for the PR description: two processes saving the same adapter key in the same cache directory derive the same
.tmppath. The test verified isolation between hardware and WARP. I’d narrow the concurrent-exit claim to distinct adapter keys unless there’s a separate same-key writer test. Filename construction · Save path@HandshakeHackin on GitHub · 2026-11-26 04:40 UTC · original
I found a cache-isolation case with the default Microsoft Basic Render Driver on native Windows. DXGI returned
1414:008cwith flags0x0for the default device and the same IDs with flags0x2for explicit WARP. On356690c, the default device got the-hwfilename and opened all 30 bytes of a synthetic unsuffixed legacy file. Explicit WARP got-swand read zero bytes. BeforeThe attached commit recognizes the Basic Render Driver by its PCI ID as well as the software flag. Both devices then selected
-swand read zero legacy bytes. All seven library tests passed. I also checked that sharing this key works on the runner. A compute pipeline saved on one device reopened by name on the other, in both directions, with mapped and buffered storage (four cache hits). Cherry-pick91ef4c9· After · Cache round tripsView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.