Skip to content

Persist first-use pipeline history without serializing the driver library - #1989

Open
NotADonky43 wants to merge 1 commit into
trustno1-coder:mainfrom
NotADonky43:fix/early-history-checkpoint
Open

NotADonky43 wants to merge 1 commit into
trustno1-coder:mainfrom
NotADonky43:fix/early-history-checkpoint

Conversation

@NotADonky43

Copy link
Copy Markdown
Contributor

Fixes #1982. A burst of new actual-use keys starts one background writer. It coalesces observations for one second, merges with the on-disk set under a cross-process lock, and atomically replaces only early-pipelines.txt. Clean processes (including warm workers) do not publish. Failures leave a pending retry; a forced save also flushes pending hints. No changes to sampler safety, dispatch ordering, shader translation, or the pressured native-library save interval. Abrupt termination before the first checkpoint can still lose uncheckpointed observations. Native test covers locked-file retry, racing observation, preservation of existing keys, and no-op clean flush. Real Windows RTX 5070 Ti test on cumulative 8388c62b: seeded a private run with 1627 hints, observed 1629 before closing at the checkpoint. Native library SHA256 unchanged. A second process loaded the 1629-key list. Normal cumulative start with 1787 hints reached six heavy rendering windows. No title data or cache contents attached. Related performance evidence in #1268; this PR verifies persistence, not a new FPS gain.

@github-actions github-actions Bot added pr-fix Pull request: fixes a bug startup Does not launch, stops on a start or loading screen labels Nov 29, 2026
@github-actions github-actions Bot changed the title [pr-fix][startup] Persist first-use pipeline history without serializing the driver library Persist first-use pipeline history without serializing the driver library Nov 29, 2026
Hjgyhfyh added a commit to Hjgyhfyh/VIctory-NVIDIA-RTX5050 that referenced this pull request Nov 29, 2026
@Nazzgy

Nazzgy commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Independent reproduction on the unpatched 829188e Series S build under low Windows commit headroom. Two full PSO keys kept recurring in draw-drop records late in gameplay. Both were already in known-pipelines.bin, and both were missing from the early list and completed warm-up set. The run repeatedly took around half a second per frame while new compiles were being deferred.

A useful end-to-end case for this PR is a late PSO request that reaches the memory guard, followed by an exit before the next library save. Check that its exact key is already in early-pipelines.txt, the subsequent warm-up stores it, and the next game loads that library. Also check the rendered 3D scene before comparing FPS. A white or dark world can still present successfully with a visible HUD and FPS counter.

Targeted warm-up follow-up on the same 829188e executable and checkpoint with the same Series S window settings. A private copy of the library stored all 12 observed keys and loaded on the following run. The two recurring keys stopped appearing in draw-drop logs. From 120 to 180 seconds after the first DLSS upscale, one-second reports containing a frame of at least 480 ms went from 51 of 51 to 1 of 57. The draw counts differed in that interval, so this comparison characterizes the stall pattern in these runs. It documents why retaining late PSO keys matters for the next warm-up.

@ArturoWolff

Copy link
Copy Markdown

Corroborating Nazzgy's late-PSO history result on Linux/Proton, with two retained runs of unmodified 829188e9 (RTX 4060 8 GB, 16 GB RAM, GE-Proton 11-14). Both used the same ordinary starting profile and effective rendering settings, including requested RT, full write-back and DLSS/FG off. The second seeded the first run's ordinary application caches, not its driver cache. Both reached a defective opening cinematic, not rendered gameplay; the guard remained enabled.

I compared the exact distinct keys in the normal capped draws dropped for pipelines not made yet records with each retired run's early-pipelines.txt and slow-pipelines.txt, without changing either list.

Retained observation Cold Application-cache seeded
Drop-log records 12 20
Distinct reported pipeline keys 106 140
Distinct retained early keys 10 11
Distinct retained slow keys 1 1
Reported drop keys absent from both lists 106 140
Of those, reported in at least two drop-log records 23 46
Drop-log records after the last successful library save 12 / 12 20 / 20

The receiving baseline's ready already records demand before the PSO is ready; note_used marks new keys dirty. But the persisted early list still depends on the successful native-library/slow-list writes. This is consistent with the late-history gap in #1982 and explains why a nonempty but incomplete early list is not evidence of useful prewarm coverage.

The log exposes at most 16 distinct keys per emitted record, and not every frame is logged. These are lower bounds, not the full requested set or a count of driver allocation failures. I have not established that every missing key has a persisted recipe, tested this PR, or obtained a matched prewarm/gameplay improvement. I agree with the proposed request-after-save regression: verify persistence of late requested keys independently, then distinguish described recipes, successful native PSO creation/storage, loads on the next clean start, and actual scene progress. This also seems useful for the separate RT preparation/restart work in #2148. No raw keys, shader bytes or cache contents attached.

AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol High).

moritz-eckhard-nickel added a commit to moritz-eckhard-nickel/VIctory-NVIDIA that referenced this pull request Nov 30, 2026
…tory without serializing the driver library)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-fix Pull request: fixes a bug startup Does not launch, stops on a start or loading screen

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Checkpoint observed early pipeline keys independently of driver-library saves

3 participants