warm: create the pipelines folder on a fresh cache #456

Open
github-bot wants to merge 1 commit from github-bot/gh-456 into a-publier AGit
Owner

@⁠Jackster on GitHub · 2026-11-27 02:57 UTC · original
Jackster:fix/warm-fresh-cache → a-publier · +37 −2 · 3 files · 1 commits · open

What

victory warm fails on a cache the title has never written to — the ordering the README describes:

> victory warm --limit 0 --jobs 1
0 pipelines known, 0 made before (e9cc66c4ece2c90a), 0 bad; 0 to make, 1 processes
Error: The system cannot find the path specified. (os error 3)
exit code: 1

Why

warm::folder() derived <cache>\pipelines from cache_subdir("shaders"), which creates only <cache>\shaders. run() then opened warm-done.txt, slow-pipelines.txt and warm-bad.txt with create(true) inside the missing folder — create(true) makes a file, never a directory.

The folder is otherwise made by a title run (victory-gpu's pipeline.rs and pipeline/library.rs), so this only bites anyone who runs warm first. The existing test hid it by pre-creating the folder.

Change

  • folder() creates the folder, and names the path if it cannot.
  • Zero known pipelines now exits 0, prints its usual 0 pipelines known ... 0 to make line, and leaves the empty pipelines folder and book files behind.
  • New test warm_creates_the_missing_pipelines_folder starts from a cache with no pipelines folder: it runs warm --limit 0, checks the folder and warm-done.txt exist, then that a second warm --used run succeeds. On 4eb6cfd it fails with the same os error 3.
  • README: shaders is the step that helps before a first run; warm needs pipelines from an earlier run on the same driver, so on a fresh cache it has nothing to make.
  • No change to the in-game recorder.

Testing

  • cargo test -p victory --locked and --all-features (warm_bad: 2 passed each)
  • cargo test -p xtask --locked — the documented-switch and asset-policy checks over the README change
  • cargo clippy -p victory -p xtask --all-targets --locked -- -D warnings, default and --all-features

Related, though distinct: #293 is the same "no cache yet" confusion for shaders and translate --warm.

**@⁠Jackster** on GitHub · 2026-11-27 02:57 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/456) `Jackster:fix/warm-fresh-cache` → `a-publier` · +37 −2 · 3 files · 1 commits · open ## What `victory warm` fails on a cache the title has never written to — the ordering the README describes: ``` > victory warm --limit 0 --jobs 1 0 pipelines known, 0 made before (e9cc66c4ece2c90a), 0 bad; 0 to make, 1 processes Error: The system cannot find the path specified. (os error 3) exit code: 1 ``` ## Why `warm::folder()` derived `<cache>\pipelines` from `cache_subdir("shaders")`, which creates only `<cache>\shaders`. `run()` then opened `warm-done.txt`, `slow-pipelines.txt` and `warm-bad.txt` with `create(true)` inside the missing folder — `create(true)` makes a file, never a directory. The folder is otherwise made by a title run (`victory-gpu`'s `pipeline.rs` and `pipeline/library.rs`), so this only bites anyone who runs `warm` first. The existing test hid it by pre-creating the folder. ## Change - `folder()` creates the folder, and names the path if it cannot. - Zero known pipelines now exits 0, prints its usual `0 pipelines known ... 0 to make` line, and leaves the empty `pipelines` folder and book files behind. - New test `warm_creates_the_missing_pipelines_folder` starts from a cache with no `pipelines` folder: it runs `warm --limit 0`, checks the folder and `warm-done.txt` exist, then that a second `warm --used` run succeeds. On `4eb6cfd` it fails with the same os error 3. - README: `shaders` is the step that helps before a first run; `warm` needs pipelines from an earlier run on the same driver, so on a fresh cache it has nothing to make. - No change to the in-game recorder. ## Testing - `cargo test -p victory --locked` and `--all-features` (`warm_bad`: 2 passed each) - `cargo test -p xtask --locked` — the documented-switch and asset-policy checks over the README change - `cargo clippy -p victory -p xtask --all-targets --locked -- -D warnings`, default and `--all-features` Related, though distinct: #293 is the same "no cache yet" confusion for `shaders` and `translate --warm`.
README tells new users to run `victory warm --used` before their first
run. On a cache the title has never written to, <cache>\pipelines does
not exist: folder() derived it from cache_subdir("shaders"), which only
creates <cache>\shaders, then run() opened warm-done.txt and the other
book files inside the missing folder and failed with os error 3.

Create the folder in folder(), with a context naming the path. Zero
known pipelines now exits 0, prints "0 pipelines known ... 0 to make",
and leaves the empty pipelines folder and book files behind, as the
README's ordering expects. The in-game recorder is unchanged.

Add warm_creates_the_missing_pipelines_folder to warm_bad.rs: it starts
from a cache with no pipelines folder, runs warm --limit 0, checks the
folder and warm-done.txt are created, then that a second warm --used run
succeeds. It fails before this change with the same os error 3.

README: say that `shaders` is the step that helps before a first run and
that `warm` needs pipelines from an earlier run on the same driver, since
a fresh cache has none to make.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 02:58:56 +00:00
Author
Owner

@⁠lvndrpup on GitHub · 2026-11-27 03:55 UTC · original · reviewed

Checked on Windows 11 build 26300, Rust 1.98.1, debug:

cargo test -p victory --test warm_bad warm_creates_the_missing_pipelines_folder
4eb6cfd with only this PR's test file fails: 0 pipelines known, 0 made before …, 0 bad; 0 to make, 1 processes, then Error: The system cannot find the path specified. (os error 3)
this PR (63b110f) passes

At 63b110f the whole cargo test -p victory passes (33 tests). It also merges cleanly with #305, which changes the same test file.

**@⁠lvndrpup** on GitHub · 2026-11-27 03:55 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/456#pullrequestreview-6083269387) · **reviewed** Checked on Windows 11 build 26300, Rust 1.98.1, debug: | `cargo test -p victory --test warm_bad` | `warm_creates_the_missing_pipelines_folder` | |---|---| | `4eb6cfd` with only this PR's test file | fails: `0 pipelines known, 0 made before …, 0 bad; 0 to make, 1 processes`, then `Error: The system cannot find the path specified. (os error 3)` | | this PR (`63b110f`) | passes | At `63b110f` the whole `cargo test -p victory` passes (33 tests). It also merges cleanly with #305, which changes the same test file.
Author
Owner

@⁠adrianmjim on GitHub · 2026-11-27 06:51 UTC · original

Tested on RX 7900 XT (RDNA3), driver 32.0.32029.2010, Windows 11 26300, Rust 1.98.1, release. Base is 4eb6cfd, PR is 63b110f. I ran the real victory.exe warm on a fresh empty VICTORY_CACHE_DIR, with VICTORY_D3D12_ADAPTER=4294967295 (no device).

case 4eb6cfd 63b110f
warm (default jobs) os error 3, exit 1 exit 0
warm --used os error 3, exit 1 exit 0
warm --limit 0 --jobs 1, then warm --limit 0 --jobs 1 --used on the same cache os error 3, exit 1 (both) exit 0 (both), pipelines\ has warm-done, warm-bad and slow-pipelines files
<cache>\pipelines is a file summary line, then os error 3, exit 1 Error: creating <cache>\pipelines, caused by os error 183, exit 1

Interaction with #403 (6aea6e8):

  • With #403's warm.rs alone, a fresh cache prints its new hint (no pipelines recorded: ...) and then still fails with os error 3. play.ps1 -Warm runs warm --used, so it fails on a fresh cache without this PR.
  • With both merged, the hint prints and warm exits 0. warm.rs merges cleanly.
  • README.md conflicts with #403. Both add a paragraph after the same block saying warm has nothing to make before a recorded run. The README conflict with #389 is only an adjacent hunk.

Minor, not from this PR: an empty warm ends with sum -0 s. With this fix, that is now the normal output on a fresh cache.

Not tested: warm with a real host device and recorded pipelines.

**@⁠adrianmjim** on GitHub · 2026-11-27 06:51 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/456#issuecomment-7211905582) Tested on RX 7900 XT (RDNA3), driver 32.0.32029.2010, Windows 11 26300, Rust 1.98.1, release. Base is 4eb6cfd, PR is 63b110f. I ran the real `victory.exe warm` on a fresh empty `VICTORY_CACHE_DIR`, with `VICTORY_D3D12_ADAPTER=4294967295` (no device). | case | 4eb6cfd | 63b110f | |---|---|---| | `warm` (default jobs) | os error 3, exit 1 | exit 0 | | `warm --used` | os error 3, exit 1 | exit 0 | | `warm --limit 0 --jobs 1`, then `warm --limit 0 --jobs 1 --used` on the same cache | os error 3, exit 1 (both) | exit 0 (both), `pipelines\` has warm-done, warm-bad and slow-pipelines files | | `<cache>\pipelines` is a file | summary line, then os error 3, exit 1 | `Error: creating <cache>\pipelines`, caused by os error 183, exit 1 | Interaction with #403 (6aea6e8): - With #403's `warm.rs` alone, a fresh cache prints its new hint (`no pipelines recorded: ...`) and then still fails with os error 3. `play.ps1 -Warm` runs `warm --used`, so it fails on a fresh cache without this PR. - With both merged, the hint prints and `warm` exits 0. `warm.rs` merges cleanly. - `README.md` conflicts with #403. Both add a paragraph after the same block saying `warm` has nothing to make before a recorded run. The README conflict with #389 is only an adjacent hunk. Minor, not from this PR: an empty `warm` ends with `sum -0 s`. With this fix, that is now the normal output on a fresh cache. Not tested: `warm` with a real host device and recorded pipelines.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/456/head:github-bot/gh-456'
git switch 'github-bot/gh-456'

Merge

Merge the changes and update on Forgejo.
git switch 'a-publier'
git merge --no-ff 'github-bot/gh-456'
git switch 'github-bot/gh-456'
git rebase 'a-publier'
git switch 'a-publier'
git merge --ff-only 'github-bot/gh-456'
git switch 'github-bot/gh-456'
git rebase 'a-publier'
git switch 'a-publier'
git merge --no-ff 'github-bot/gh-456'
git switch 'a-publier'
git merge --squash 'github-bot/gh-456'
git switch 'a-publier'
git merge --ff-only 'github-bot/gh-456'
git switch 'a-publier'
git merge 'github-bot/gh-456'
git push origin 'a-publier'
This discussion has been locked. Commenting is limited to contributors.
No description provided.