Group MIG instances by parent GPU when applying allocation policies - #2036
Open
jonathan-meiri wants to merge 1 commit into
Open
jonathan-meiri wants to merge 1 commit into
jonathan-meiri wants to merge 1 commit into
Conversation
jonathan-meiri
force-pushed
the
mig-parent-aware-allocation
branch
from
September 15, 2026 19:31
c2a88b2 to
b84769f
Compare
|
Thanks for the contribution. We will review this PR soon. |
jonathan-meiri
force-pushed
the
mig-parent-aware-allocation
branch
2 times, most recently
from
September 22, 2026 07:47
33abf0b to
4f2ddf6
Compare
Allocation buckets keyed on the device UUID, so each MIG instance looked like a distinct physical GPU. distributed/packed/spread could therefore stack a multi-slot request onto MIG instances of one physical card. Bucket by physical GPU instead: MIG instances group by parent (from Device.Index), other devices by UUID. Follow-up to NVIDIA#1936. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Co-Authored-By: runatom-ai <258621014+runatom-ai@users.noreply.github.com> Signed-off-by: Jonathan Meiri <33288957+Meiri28@users.noreply.github.com>
jonathan-meiri
force-pushed
the
mig-parent-aware-allocation
branch
from
September 23, 2026 05:54
4f2ddf6 to
06b21ab
Compare
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.
What
Allocation candidates are bucketed by the device UUID (
AnnotatedID.GetID()). A MIG instance has its own UUID, so every MIG instance looks like a distinct physical GPU. As a result a multi-slot request underdistributed/packed(andspread, in #1936) can land entirely on MIG instances of a single physical card, even when the intent is to span distinct GPUs.This is pre-existing behavior surfaced during review of #1936 (thanks @tariq1890).
Fix
Bucket candidates by the physical GPU instead of the advertised device:
Device.Index("<gpu>:<mig>").Devices.PhysicalGPUKeycentralizes this, andgreedyAlloc/prepareCandidatesuse it. All three policies benefit;distributed/packedare unchanged for non-MIG setups.Test
TestDistributedAlloc_MIG_SpansDistinctPhysicalGPUssets up two idle MIG instances on GPU 0 and one busier time-sliced instance on GPU 1; a 2-slot request now spans both physical GPUs. It fails on the pre-fix bucketing and passes with it.Follow-up to #1936.