Repository navigation
Conversation
… aborts (upstream #2007) Ported from upstream VIctory commit 321a4bc (pull request #2007, Kevin): the save path that cannot map the library's file (the file cannot be mapped, or VICTORY_LIBRARY_MAP=0) made an infallible vec![0u8; size]. The library is about 1.7 GB on NVIDIA (each pipeline's machine code), and an allocation of that size the host cannot give aborted the whole process mid-run ("memory allocation of 2650101862 bytes failed", RTX 4050 Laptop). The buffer now comes from try_reserve_exact; no memory leaves the save for a later one (the pipelines stay counted as added) and the run goes on. The mapped path is unchanged; only the fallback buffer is. Test: a_save_buffer_the_host_cannot_give_is_refused (a size the host cannot give is refused, 100 bytes are zeros). cargo test -p victory-gpu --lib: 218 passed, 0 failed, 6 ignored; cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
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.)