GPU: a pipeline library save with no memory for its buffer waits, not aborts (port of upstream #2007) #1326
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!1326
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1326"
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?
@CwWwWwW on GitHub · 2026-11-26 15:30 UTC · original
CwWwWwW:port/library-save-oom→main· +23 −1 · 1 files · 1 commits · closed without mergingProblem
When the pipeline library's file cannot be mapped - the file system refuses the mapping, or
VICTORY_LIBRARY_MAP=0-library::serialisefalls back to an infalliblevec![0u8; size]. The serialised library is about 1.7 GB on NVIDIA (each pipeline's machine code), and an allocation of that size the host cannot give aborts the whole process mid-run: upstream sawmemory allocation of 2650101862 bytes failedon an RTX 4050 Laptop.Upstream VIctory fixed this in commit 321a4bc (pull request #2007, by Kevin); this is that fix ported to the fork, which keeps the mapped path and the fallback the upstream change targets.
Change
zeroed(n) -> Option<Vec<u8>>allocates withtry_reserve_exact; no memory returnsNoneandserialisereturns an error instead of aborting.savelogs it and leaves the save for a later one (the pipelines stay counted as added, so a later save retries); the run continues.Tests
a_save_buffer_the_host_cannot_give_is_refused: a size the host cannot give isNone, 100 bytes are zeros.cargo test -p victory-gpu --lib --locked: 218 passed, 0 failed, 6 ignored.cargo clippy -p victory-gpu --all-targets --locked -- -D warnings: clean.(CI note: the
checkjob on main is currently red on the asset-policy violation; #1322 fixes that, after which this can be rebased.)Pull request closed