Reuse shared warm marks for the selected adapter library #4192

Open
Hellwire wants to merge 1 commit from upstream-pr/4192 into main
Hellwire commented 2026-11-30 17:17:49 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Hellwire on 2026-11-30T17:17:49Z.


Problem

victory warm --used with VICTORY_WARM_SHARED=1 checks for a pipeline library at the root of the cache. The runtime now stores the active library under adapters/<device>. This makes a second preload rebuild already cached PSOs when there is no root-level library.

Change

Use the same adapter selection and cache path as the runtime, then check that the selected D3D12 device can open the saved library before reusing its marks. The check leaves the normal library writer free to load the latest saved file later.

Verification

The Windows production build and 11 CLI warm tests passed. The D3D12 hardware and WARP fixture covers compatible scoped and legacy files, a cache belonging to another adapter, and an invalid scoped file. On an RTX 3070 Ti, a fresh process reused all 2,730 supported marked entries in 1.97 seconds with the scoped library alone. With the same marks and an empty library directory, it reused zero.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5570151862 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4192). Originally posted by [Hellwire](https://github.com/Hellwire) on 2026-11-30T17:17:49Z. --- ## Problem `victory warm --used` with `VICTORY_WARM_SHARED=1` checks for a pipeline library at the root of the cache. The runtime now stores the active library under `adapters/<device>`. This makes a second preload rebuild already cached PSOs when there is no root-level library. ## Change Use the same adapter selection and cache path as the runtime, then check that the selected D3D12 device can open the saved library before reusing its marks. The check leaves the normal library writer free to load the latest saved file later. ## Verification The Windows production build and 11 CLI warm tests passed. The D3D12 hardware and WARP fixture covers compatible scoped and legacy files, a cache belonging to another adapter, and an invalid scoped file. On an RTX 3070 Ti, a fresh process reused all 2,730 supported marked entries in 1.97 seconds with the scoped library alone. With the same marks and an empty library directory, it reused zero.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/4192:upstream-pr/4192'
git switch 'upstream-pr/4192'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/4192'
git switch 'upstream-pr/4192'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/4192'
git switch 'upstream-pr/4192'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/4192'
git switch 'main'
git merge --squash 'upstream-pr/4192'
git switch 'main'
git merge --ff-only 'upstream-pr/4192'
git switch 'main'
git merge 'upstream-pr/4192'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
trustno1-coder/VIctory-NVIDIA!4192
No description provided.