Pipeline library: no rebuild at the end of a run shorter than 10 minutes (a preload was thrown away a minute later) #3459
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3459"
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 trustno1-coder/VIctory-NVIDIA. Originally posted by OGShotz on 2026-11-29T23:31:16Z.
What it changes
At the end of a run the pipeline library is rebuilt from the pipelines that run used, once it is larger than
VICTORY_LIBRARY_KEEP_MB(compact). A run that ended at the menu was meant to leave it alone:COMPACT_LEASTasks for 1,000 used pipelines.That count no longer tells a menu run apart. The early list's pipelines are started from the book at the title's first pipeline (
make::prefetch), so they are live within a minute. On 2026-11-29 a run closed one minute after a preload, at the menu, had 4,477 live and rebuilt a 1.48 GB library of 14,663 pipelines into 241 MB of 3,662 (before=1484661916 after=241460424 kept=3662). The preload's work was gone.A run now also needs 10 minutes (
COMPACT_AFTER_MS, fromhost::now_ms) before the library is rebuilt. The "not rebuilt" line gives the run's length.How it was tested
only_large_libraries_of_runs_that_reached_the_world_are_rebuilt, which now also checks a run of 66 s with 4,477 pipelines (not rebuilt) and a run of exactly 10 minutes (rebuilt).cargo testpassed for the crates it touches: on this branch (main716a0c99+ this commit),cargo test --release -p victory-gpu --lib library16 passed. The wholevictory-gpulib suite: 913 passed, 2 failed, the same 2 that fail on main without this change (every_switch_of_the_translator_is_in_the_key, stale names in its lists, see #3210;places_written_after_sending_are_learned, which passes alone).Checked for overlap
compacts()and takes the library writer lock incompact(). That does not catch this case (the 4,477 were unique), and the two merge without conflict.🤖 Generated with Claude Code
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by andrewpozdnakov7-jpg on 2026-11-30T10:50:56Z.
I reproduced #3883 on release
v2026.11.29.05/ main41adb551and repeated the same scenario with @OGShotz's0b9d595applied as2e5d33d.Native Windows WARP, diagnostics build. I populated a real D3D12 pipeline library with 5,000 generated names for one synthetic compute pipeline and set the limit to 1 MiB. A fresh process opened the file, loaded exactly 1,000 entries through
library::pipeline, calledlibrary::finishwithin the first second, then deserialized the resulting file and checked every original name.41adb55141adb551+ this PRThe same assertion fails on main and passes with the PR. The existing
pipeline::librarytests passed 13/13 on both builds. The PR's boundary test still permits compaction at ten minutes when the original size and use thresholds are met.@JSa25, if you can build with this PR, could you repeat the same short walk after
preload --allat the default limit and share the final library line and file size? The WARP test covers the short-session path. A normal game run that reaches ten minutes can still discard entries it did not use.The GitHub check stopped in workspace Clippy on the unused
unwind_copyfunction invictory-loader. I reproduced that diagnostic previously on clean41adb551. The CI test step was skipped.AI-assisted with OpenAI Codex.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by OGShotz on 2026-11-30T11:15:38Z.
Thanks @andrewpozdnakov7-jpg for reproducing #3883 and testing this so thoroughly. The 1,000-of-5,000 table on WARP shows the short-run loss clearly, and it's good to know the boundary test still allows compaction at ten minutes. A run from @JSa25 after
preload --allat the default limit would be a great real-game check alongside it.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by andrewpozdnakov7-jpg on 2026-11-30T15:45:19Z.
@OGShotz, I repeated the short-session check on
v2026.11.30.01(c71899d). This release writes the pipeline library to the adapter's own directory, so the fixture seeds and reopens that active file. WARP 1.0.22 used 5,000 generated entries, visited 1,000, and calledfinishin under a second.The library unit suite passed 20/20 on each revision. The patched suite includes the ten-minute boundary. Both local builds used the same temporary #4018 unit-test build fix.
Current release review branch contains only your change, with your Git author preserved. The staged asset check passed.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ajcorrea on 2026-11-30T20:26:10Z.
+1 for this, from the user side.
Short runs right after a preload are exactly how testing goes: I just bisected a stutter regression (see #3733) with nine builds, each run 3–4 minutes on the same route. With the default
VICTORY_LIBRARY_KEEP_MB=1024, a short run like that rewrites the library down to what it touched, and the next run builds the rest while playing, which is the very stutter being measured. One short test run quietly spoils the next one.As a workaround I set
VICTORY_LIBRARY_KEEP_MB=0for the whole bisect: the library stayed at 1.07 GB across all nine runs, with 3,702 pipelines inearly-pipelines.txt, and no run paid for the one before it.RTX 3060 Ti 8 GB, Ryzen 7 7800X3D, 32 GB, Windows 11.
A minimum run length before rebuilding (your 10 minutes) looks like the right guard. Perhaps the run should also have to pass
VICTORY_PRELOAD_USED_MINpipelines, so a long session spent idle at the menu doesn't trigger a rebuild either.View 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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.