Repository navigation
control: also check device free memory on integrated GPUs - #132
Open
tvukovic-amd wants to merge 1 commit into
Open
tvukovic-amd wants to merge 1 commit into
tvukovic-amd wants to merge 1 commit into
Conversation
On Linux integrated GPUs the budget deficit came only from /proc/meminfo MemAvailable. A BIOS carve-out is not part of MemAvailable, so with a large carve-out aimdo never evicted, the device filled up and torch/HIP ran out of memory (Flux.2 Dev on Strix Halo with a 64 GB carve-out). Also poll cuMemGetInfo, as on discrete GPUs, and use whichever deficit is larger. With GTT the device limit is the GTT size, so this also keeps aimdo below that limit; when RAM is the tighter limit the MemAvailable deficit prevails as before.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
This branch has not been deployed
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.
On Linux iGPUs,
cuda_budget_deficit()computes the budget deficit only from/proc/meminfo MemAvailable. A BIOS carve-out is not part of MemAvailable. With a large carve-out, aimdo therefore never sees any pressure. It keeps loading weights until the device is full, and torch/HIP then runs out of memory.Fix
Keep the
MemAvailabledeficit unchanged. Also pollcuMemGetInfo, the same way the discrete GPU path does (VRAM_HEADROOM), and use whichever deficit is larger. aimdo then evicts for whichever pool runs out first:MemAvailabledeficit prevails as before.If
cuMemGetInfofails, behavior is unchanged: theMemAvailabledeficit alone decides. Discrete GPUs and Windows are untouched. Windowspoll_budget_deficit()already takes the max of the DXCore/WDDM budget and cuMemGetInfo.