GPU: a dispatch waits for its compute pipeline within a budget of its own, not without limit (fixes #628) #1767
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1767"
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 nick0451 on 2026-11-29T00:00:19Z.
Fixes #628 (the first-start crash at
+0x23cf683), which comes with #243.What was wrong
#243 made a dispatch build its compute pipeline on the asking thread (
p.make()inpipeline::make::ready), one pipeline after another and with no limit. On a fresh build's first start most compute pipelines are new. The title then waits in one frame for many of them in turn, past its 30 s watchdog (screen_budget's comment names it), while it loads. It stops with a null write atvictory-image+0x23cf683.Bisected in #628 (
git bisect --first-parent 32ecacf..923e38c): the first bad commit is the merge of #243 (17612c3). Confirmed with #243's own switch on current main: of two fresh first starts of the same code, the one withVICTORY_PIPELINE_COMPUTE_WAIT=0reached the world, and the default one crashed.The change (
crates/victory-gpu/src/pipeline/make.rs)A dispatch now waits the way a draw does, in
wait, with a budget of its own:VICTORY_COMPUTE_WAIT_MS, 10 s a frame. That is the same as the screen passes' budget, and below the watchdog. The pipeline is queued withstart(p, REQUESTED)as before, so the workers make the new pipelines side by side while the dispatch waits.VICTORY_PIPELINE_COMPUTE_WAIT=0still means the draws' half-second budget.a dispatch was waited for), like the screen passes.pending_pipeline_is_recorded_for_the_next_launch) now expects the budgeted wait. A pipeline still being made past the budget is recorded for the next launch, as a draw's is. Undercfg(test)the compute budget is 50 ms, so the test doesn't wait 10 s.Tested
RTX 3090 24 GB (driver 610.88), i9-14900K, 32 GB, Windows 11, release builds, Series S, frame generation off. The same frozen save for every start. Each first start was a fresh copy of the executable with its own file hash.
923e38c/d4b5d51)+0x23cf683while loadingNormal play, after the warm-up starts:
ERRORline. 19 dispatches were waited for within the budget as new pipelines streamed in. fps 18.4 / 20.0 against main's 20.9, inside that scene's run-to-run variation (traffic: one main run was 16.9).cargo test -p victory-gpu --lib: 550 passed.cargo clippy --workspace --all-targets -- -D warnings: only the two existing findings invictory-shader/src/emit/lower.rsthat main has too.Not tested: the prison corridor itself (#243's original scene), as I have no save there.
Found, bisected and tested with an AI assistant (Claude Code); every number above is from this PC's runs.
🤖 Generated with Claude Code
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by nick0451 on 2026-11-29T00:10:19Z.
A note for review: #315 (Lyrnc, opened before #243 was merged) fixes the same crash the same way, with armin's cap from fxceless/victory-fork#1450. I missed it when I looked for competing fixes before opening this. Tested it the same way as this PR, so the two can be weighed:
923e38c/d4b5d51)+0x23cf68374113b0)(RTX 3090, the same frozen save and settings, a new executable name and file hash for every start.)
How the two differ:
waitpath and accounting as the screen passes, and no early-frame exception. It merges cleanly on main. One frame's worst case is 10 s for screen passes, 10 s for dispatches and 0.5 s for draws, which is still below the 30 s watchdog.Either one fixes #628 here. I'm happy for whichever fits better to land and the other to close. If #315 is preferred, its 600-frame exception is the one part I couldn't test, as it never came into play on this save.
🤖 Generated with Claude Code
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by nick0451 on 2026-11-29T00:29:04Z.
Closing:
88244e8on main ("a frame waits at most 3 s in all for its compute pipelines") fixes #628 the same way, so this one isn't needed. Thanks!One more data point for #628 from tonight's runs on the pre-fix base (
d4b5d51): the+0x23cf683crash also hit a second start of an already-warmed build in 4 of 8 starts of one benchmark, 3 of them after the build's first start (the very first start crashed too). So it is not only a first-start crash: it can come on any start while pipelines are still being made. I'll post first-start results for the new main on #628 once I've run them.🤖 Generated with Claude Code
Pull request closed