← Back to Pull requests

feat(gpu): select the GPU vendor with features.gpu.vendor #3792

Closed
unknown closed this pull request without merging on Nov 17, 2026 09:39 UTC
View on GitHub
unknown unknown commented on Nov 15, 2026 06:14 UTC
Author

What does this PR do?

Adds features.gpu.vendor, the vendor of the GPUs on the nodes: nvidia (default) or amd, validated as an enum. Replaces #3767 (features.gpu.amd.enabled), which is closed.

With vendor: amd:

  • on Agent 7.86.0+, the core agent container gets DD_GPU_AMD_ENABLED=true and AMD_VISIBLE_DEVICES=all. User-set values win.

  • without requiredRuntimeClassName, the pod gets no RuntimeClass and uses the node's default runtime.

  • NVIDIA-only settings are not added: DD_ENABLE_NVML_DETECTION, NVIDIA_VISIBLE_DEVICES, the nvidia-container-devices mount, MKNOD, and the GKE COS driver-lib mount.
  • The minimum Agent version for each vendor is set in the vendorMinAgentVersion table.

    After (this PR):

    spec:
      features:
        gpu:
          enabled: true
          vendor: amd
          # requiredRuntimeClassName: <AMD RuntimeClass>   # optional, if the cluster defines one
    

    Equivalent today (without this PR):

    spec:
      features:
        gpu:
          enabled: true
          requiredRuntimeClassName: ""
      override:
        nodeAgent:
          containers:
            agent:
              env:
                - name: DD_GPU_AMD_ENABLED
                  value: "true"
                - name: AMD_VISIBLE_DEVICES
                  value: all
    

    | vendor | requiredRuntimeClassName | Pod RuntimeClass | AMD env vars | NVIDIA settings | Warning |
    |---|---|---|---|---|---|
    | unset or nvidia | unset | nvidia | no | yes | no |
    | unset or nvidia | any value | that value | no | yes | no |
    | amd | unset | "" (node default runtime) | yes, on Agent 7.86+ | no | no |
    | amd | nvidia | nvidia | yes, on Agent 7.86+ | no | yes |
    | amd | amd or another value | that value | yes, on Agent 7.86+ | no | no |
    | amd | "" | "" | yes, on Agent 7.86+ | no | no |
    | amd on GKE Autopilot | any | same as nvidia | no | yes | no |

    Unset or nvidia is identical to main. Below Agent 7.86, vendor: amd still sets the RuntimeClass and skips the NVIDIA settings, but adds no AMD env vars. GKE Autopilot ignores vendor. Any other value is rejected by the CRD.

    Motivation

    Agent 7.86 ships an opt-in amd_gpu core check. Today it needs requiredRuntimeClassName plus manual env overrides. AMD tooling doesn't define a standard Kubernetes RuntimeClass, so the vendor is selected explicitly.

    The setting is a single value because the node-agent DaemonSet has one RuntimeClass. For clusters with several GPU vendors, use a DatadogAgentProfile per node pool.

    Additional Notes

  • The minimum Agent version is a per-vendor table (vendorMinAgentVersion). A new vendor (TPU next) only needs a table entry and its env vars.

  • The version comes from the node Agent image the operator will run: the bundled image, spec.override.nodeAgent.image and the experimental image override.

  • spec.override.nodeAgent.runtimeClassName still wins.

  • The CDI mount, hostPID, the pod-resources socket and the system-probe GPU module (privileged mode) are kept for all vendors.

  • The only warning is vendor: amd with requiredRuntimeClassName: nvidia. It's an operator log line on each reconcile and never blocks reconciliation.
  • Minimum Agent Versions

    Agent: v7.86.0 for the AMD check (vendor: amd).
    Cluster Agent: n/a

    Describe your test plan

  • Unit tests (feature/gpu/feature_test.go):

  • - vendor unset, nvidia and amd, each with the RuntimeClass unset, nvidia, amd and ""
    - NVIDIA env vars, mounts, MKNOD and the GKE COS driver libs are skipped for amd, including on system-probe in privileged mode
    - Agent 7.85, 7.86.0-rc.3, non-semver tags and image overrides
    - GKE Autopilot
    - user env and override.nodeAgent.runtimeClassName win
    - the amd + nvidia warning (capturing logger)
    - a test vendor added to the version table
  • go test ./... (root and api/) and make lint pass.

  • Hardware: MI300X VF (kubeadm), with an operator built from this branch before the review changes and Agent 7.86.0-rc.7:

  • - vendor: amd with no RuntimeClass gave amd_gpu [OK], and the data arrived in Datadog.
    - amd + amd, amd + nvidia, vendor unset and Agent 7.85.2 matched the expected pod spec.
    - KSM was disabled for the test, because chart 2.32.0 lacks the DRA RBAC that operator main needs (#3703).
    - The review changes (NVIDIA settings skipped, RuntimeClass below 7.86, enum) are covered by unit tests only.

    Checklist

  • PR has at least one valid label: bug, enhancement, refactoring, documentation, tooling, and/or dependencies

  • PR has a milestone or the qa/skip-qa label

  • All commits are signed (see: [signing commits][1])
  • [1]: https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits

    Diff: 593 lines (+444 / -149) across 7 files Reviewer: gjulianm Review duration: 3084m
    All Vouch review confidence checks passed
    Residual risk 0.20 = Change Risk (0.50) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.50 · 593 lines diff across 7 files
    0.50
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.382
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #3792"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 50% (MEDIUM) · Higher = larger blast radius
    50%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 19.8% · Safe to merge
    19.8%