Skip to content

Support NVIDIA MIG slices in the Kubernetes backend - #4389

Draft
peterschmidt85 wants to merge 9 commits into
masterfrom
pr_kubernetes_mig
Draft

peterschmidt85 wants to merge 9 commits into
masterfrom
pr_kubernetes_mig

Conversation

@peterschmidt85

@peterschmidt85 peterschmidt85 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Design doc and real-cluster results: MIG support for the Kubernetes backend

Summary

  • MIG slices created by the NVIDIA GPU Operator, with either the single or the mixed strategy, are offered
    as GPUs of the parent model with the slice's memory. For example, a 1g.10gb slice of an A100 is A100:10GB.
  • A run gets slices only when its GPU memory has an upper bound (gpu: A100:10GB). A run with gpu: A100 gets
    only whole GPUs. --full-offers shows everything.
  • With the mixed strategy, each nvidia.com/mig-<profile> resource on a node is its own offer, next to the
    node's whole GPUs. The pod requests that resource.
  • After a pod fails to schedule, only offers for the same GPU resource are skipped. Before, every offer in the
    cluster was skipped, so a failed 3g.20gb attempt also ruled out the cluster's 4g.20gb slices and whole GPUs.
  • The change is limited to the Kubernetes backend: no new configuration and no model changes. The docs get a MIG
    section under the Kubernetes backend.

Out of scope

  • Requesting a specific MIG profile, e.g., 3g.40gb vs 4g.40gb. Slices are matched by memory only.
  • GPU metrics for slices in dstack metrics (a follow-up).
  • GKE's built-in MIG (gpu-partition-size) without the GPU Operator.

Testing

On GKE (A100 40GB, GPU Operator v26.7.2, driver 595), these layouts all passed:

  • single strategy next to whole-GPU nodes;
  • mixed strategy with whole GPUs and slices on one node;
  • MIG only.

The results are in the design doc.


Generated by Claude Code

Offer MIG slices created by the NVIDIA GPU Operator (single and mixed
strategies) as GPUs of the parent model with the profile's memory,
e.g. a 1g.10gb slice of an A100 is A100:10GB.

- Single strategy: a node whose nvidia.com/gpu.product is
  <model>-MIG-<profile> is offered as that many slices.
- Mixed strategy: each nvidia.com/mig-<profile> resource on a node is
  offered separately next to the node's whole GPUs; the pod requests that
  resource and its node affinity uses the parent product label.
- Runs get slices only when the GPU memory spec has an upper bound, so
  gpu: A100 never lands on a slice; --full-offers shows everything.
- After a failed scheduling attempt, skip only offers for the same GPU
  resource in the cluster, so a 3g.20gb failure doesn't rule out the
  cluster's 4g.20gb slices or whole GPUs.

Tested on GKE 1.36 with GPU Operator v26.7.2 (driver 595) and A100 40GB
nodes across single, mixed and MIG-only layouts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EDgQBSHAm1rxrhSUXWziy3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EDgQBSHAm1rxrhSUXWziy3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EDgQBSHAm1rxrhSUXWziy3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EDgQBSHAm1rxrhSUXWziy3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EDgQBSHAm1rxrhSUXWziy3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EDgQBSHAm1rxrhSUXWziy3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EDgQBSHAm1rxrhSUXWziy3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EDgQBSHAm1rxrhSUXWziy3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EDgQBSHAm1rxrhSUXWziy3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants