Repository navigation
Conversation
The relay's fetch buffer and the card-back fetch buffer were made 16 MiB at
a time, and where the system refused that the layer ended the run through
host::fail ("no memory to fetch what shaders wrote to the card's memory"),
though the PC had room for the few megabytes a fetch needs.
Both now step down (16 MiB rounded, 1 MiB, the least the bytes allow; not
the first while host memory pressure is on), try the least once more after a
moment, and if none can be made the fetch is skipped, counted and logged
loudly (NO MEMORY TO FETCH): the pieces stay as they were in title memory
until a later fetch of them. A read-back buffer is retried once the same
way. VICTORY_FETCH_STEPDOWN=0 restores the single 16 MiB try and the fatal
failure.
Tests (fetchmem.rs): the step-down sizes, the pressure case, the retry of
the least, and the count of skipped fetches.
|
Second machine for this: Windows 11, RTX 3060, Ryzen 7 5700X, Rust 1.98.1 (pinned), applied on current
Reading the paths, since an allocation failure can't be forced on a real card from a test:
Not checked: a run that actually hits the failure (the unit tests drive |
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.
What was wrong. A failed 16 MiB allocation for a fetch buffer ended the title, even when the PC was only briefly short of memory.
The fix.
NO MEMORY TO FETCHis logged, and the title goes on.VICTORY_FETCH_STEPDOWN=0restores the old behaviour.Related open PRs #1472 (retry texture staging smaller) and #625 cover nearby allocations, but not the fetch buffers.
How it was tested. RTX 5070, Windows 11. There are five tests in
fetchmem.rscovering the step-down sizes, the single retry, the skip and the switch.cargo test --workspacepasses apart fromrepository_passes_policy, which already fails onmain:lower.rsis over the 640 KiB file-size limit there (#1493 raises it). Clippy reports only the 16 findings already onmain, none on lines this PR changes. Thevictory-gpuwatch::tests are flaky on this machine in files this PR does not touch, and pass on a rerun.