Skip to content

Label every GPU model on mixed nodes and keep GPU workloads off them - #60

Open
salexo wants to merge 1 commit into
mainfrom
fix/mixed-gpu-model-nodes
Open

salexo wants to merge 1 commit into
mainfrom
fix/mixed-gpu-model-nodes

Conversation

@salexo

@salexo salexo commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Release with #64. This PR keeps device-plugin pods off nodes with mixed GPU models and points those nodes to DRA, which #64 adds. Released alone, clusters with mixed-model nodes lose capacity for GPU services until #64 ships.

Why

The accelerator detector labelled each GPU node with the first GPU's model and the count of all GPUs, because the default aim-runtime detect-hardware output reports one model per accelerator type. A node with 4 x MI350P and 2 x R9700 was labelled aim-accelerator.MI350P=6, and a node whose first card had an unrecognised device ID got no model labels at all.

Labelling every model correctly isn't enough on its own. The device-plugin resources (amd.com/gpu, nvidia.com/gpu) are a single pool per node, so a pod on a node with several GPU models can be given a model other than the one its profile targets, or a mix of models. Once the second model is labelled, its profiles would start matching the node and could receive the wrong GPUs.

What changes

  • Detector: builds one detection per model from detect-hardware --verbose, which lists every GPU. Unrecognised GPUs are skipped and logged instead of hiding the node. Runtimes that predate --verbose fall back to the previous output.
  • Mixed-node marker: nodes with more than one GPU model get feature.node.kubernetes.io/aim-accelerator.mixed-models.GPU=<number of models>.
  • Profile matching: every v1alpha2 GPU profile's node affinity gets a mixed-models.GPU DoesNotExist term, including profiles without a model or vendor. The profile's node mismatch reasons name these nodes and point to installing the GPU DRA driver and using DRA allocation to schedule onto them. CPU profiles are unaffected.
  • Device table: adds the MI350P VF device ID (0x75b8) to KnownAmdDevices, matching aim-build's table.
  • Docs and changelog: the label pages, the profile affinity docs, a new "Nodes with mixed GPU models" section, and an [Unreleased] changelog entry.

Behaviour changes to call out

  • Upgrading restarts every GPU inference service once. The new term changes every GPU profile's node affinity, so every projected runtime and InferenceService pod template changes. Where there are no spare GPUs for the replacement pods, a rollout waits with the old pods still serving. This is recorded in the changelog.
  • Services already on a mixed node keep running, but their replacement pods can't be scheduled there.
  • Images whose aim-runtime lacks --verbose keep the old one-model labels and publish no marker. This is documented.

This is a standalone prerequisite for DRA support, which is the intended way to schedule onto these nodes. That will come in a follow-up PR.

Testing

  • go test ./internal/... passes; gofmt is clean, and golangci-lint 2.5.0 reports 0 issues on the changed packages.
  • The detector's Python tests pass (56, 10 of them new). The per-model parsing was also checked against aim-build's real --verbose serialisation of a mixed node.
  • Not run: the new chainsaw test tests/e2e/v1alpha2/mixed-gpu-models/resolved-affinity, which checks the term is in a GPU profile's resolved affinity and not in a CPU profile's. The detector also hasn't been run on real mixed hardware.

Comment thread internal/utils/resources.go Resolved
Comment thread docs/docs/admin/upgrading.md Resolved
@salexo salexo added this to the v0.2.8 milestone Nov 10, 2026
williamanzen
williamanzen previously approved these changes Nov 10, 2026

@williamanzen williamanzen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great work, lgtm!

@salexo
salexo force-pushed the fix/mixed-gpu-model-nodes branch from b2b8190 to 673940d Compare November 11, 2026 15:13
@salexo
salexo force-pushed the fix/mixed-gpu-model-nodes branch 2 times, most recently from f39177e to 2ae99a6 Compare November 19, 2026 10:16
bjorn-amd
bjorn-amd previously approved these changes Nov 25, 2026
williamanzen
williamanzen previously approved these changes Nov 26, 2026

@williamanzen williamanzen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but is tagged to be released with #64 but #64 is not in the milestone for release?

@AVSuni AVSuni removed this from the v0.2.8 milestone Nov 26, 2026
bjorn-amd
bjorn-amd previously approved these changes Nov 30, 2026

@bjorn-amd bjorn-amd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still approved! Create a stack with #64 so they are merged together ?

* Label every GPU model on nodes that mix GPU models
* Keep GPU workloads off nodes with mixed GPU models
* Mention DRA in the mixed-model reason only for AMD nodes
* Count unrecognised GPUs toward the mixed-models marker
@salexo
salexo dismissed stale reviews from bjorn-amd and williamanzen via f30890b December 1, 2026 08:54
@salexo
salexo force-pushed the fix/mixed-gpu-model-nodes branch from 4489df7 to f30890b Compare December 1, 2026 08:54
@bjorn-amd bjorn-amd added this to the v0.2.9 milestone Dec 2, 2026

@williamanzen williamanzen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still LGTM!

This branch has not been deployed

No deployments
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.

4 participants