feat(linux): add AMD MI300X ROCm bootstrap#8824
Draft
wenhug wants to merge 4 commits into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds initial end-to-end wiring for AMD MI300X ROCm enablement on AKS Linux nodes by introducing an AMD_GPU_NODE CSE signal, an AMD driver install/validation path in Ubuntu CSE, and an optional VHD prebake proof-of-concept behind an AMD_ROCM feature flag.
Changes:
- Plumbs
AMD_GPU_NODEfrom AgentBaker and aks-node-controller into the Linux CSE environment and routes AMD GPU nodes through a newensureAmdGpuDriverspath. - Implements Ubuntu 24.04-specific ROCm/AMDGPU installation + validation logic (DKMS/module/device nodes +
rocminfo/rocm-smichecks) and cleans up temporary apt repo configuration afterward. - Adds a VHD prebake path gated by
AMD_ROCMand extends the Linux VHD content tests to verify the prebaked marker/packages/module config and repo cleanup.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| vhdbuilder/scripts/linux/ubuntu/tool_installs_ubuntu.sh | Adds ROCm/AMDGPU VHD prebake functions (repo setup/cleanup, module autoload, validation, install). |
| vhdbuilder/packer/test/linux-vhd-content-test.sh | Adds a new testAmdRocmPrebake gated by AMD_ROCM to validate prebaked ROCm state and repo cleanup. |
| vhdbuilder/packer/install-dependencies.sh | Wires the AMD_ROCM feature flag to invoke installAmdRocmPrebake during VHD build and logs the marker. |
| pkg/agent/variables.go | Adds an amdGpuNode CSE variable derived from EnableAMDGPU. |
| pkg/agent/variables_test.go | Adds unit tests asserting amdGpuNode string output. |
| pkg/agent/baker_test.go | Adds a Linux CSE command test asserting AMD_GPU_NODE=true for an MI300X SKU config. |
| parts/linux/cloud-init/artifacts/ubuntu/cse_install_ubuntu.sh | Adds ROCm/AMDGPU install + validation logic for Ubuntu 24.04 amd64, SKU gating, marker writing, and repo cleanup. |
| parts/linux/cloud-init/artifacts/cse_main.sh | Routes AMD_GPU_NODE=true through ensureAmdGpuDrivers before the NVIDIA driver path. |
| parts/linux/cloud-init/artifacts/cse_helpers.sh | Adds AMD ROCm-related error codes for the CSE path. |
| parts/linux/cloud-init/artifacts/cse_cmd.sh | Emits AMD_GPU_NODE into the CSE environment. |
| aks-node-controller/parser/parser.go | Adds AMD_GPU_NODE to the generated CSE environment map. |
| aks-node-controller/parser/parser_test.go | Extends parser tests to validate AMD_GPU_NODE presence/values in env. |
| aks-node-controller/parser/helper.go | Adds getEnableAmdGpu helper for config parsing. |
Comment on lines
+277
to
+280
| cat > /etc/apt/sources.list.d/rocm.list <<EOF | ||
| deb [arch=amd64 signed-by=${rocm_gpg_keyring_path}] https://repo.radeon.com/rocm/apt/${rocm_version} ${ubuntu_codename} main | ||
| deb [arch=amd64 signed-by=${rocm_gpg_keyring_path}] https://repo.radeon.com/graphics/${rocm_version}/ubuntu ${ubuntu_codename} main | ||
| EOF |
wenhug
force-pushed
the
wenhug/amd-mi300x-rocm-bootstrap
branch
from
July 6, 2026 23:05
129990c to
03945de
Compare
Comment on lines
+256
to
+260
| amdRocmRepoBaseUrl() { | ||
| local repo_base_url="${AMD_ROCM_REPO_BASE_URL:-https://repo.radeon.com}" | ||
| repo_base_url="${repo_base_url%/}" | ||
| case "${repo_base_url}" in | ||
| https://*) |
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 this PR does / why we need it:
This draft validates the AgentBaker CSE path for AKS-managed AMD MI300X ROCm bootstrap. It adds the wiring needed for an AKS node to identify itself as an AMD GPU node, install the ROCm host driver/runtime pieces during node provisioning, and expose devices that the AMD device plugin can consume.
The implementation is intentionally scoped to Ubuntu 24.04 amd64 and:
Standard_ND96isr_MI300X_v5Standard_ND96is_MI300X_v5Main changes:
AMD_GPU_NODEthrough AgentBaker and aks-node-controller.ensureAmdGpuDriversbefore the NVIDIA path.amdgpu-dkmslibdrm-amdgpu-devrocm-corerocminforocm-smi-libamdgpumodule autoload and removes stale blacklist/install-false entries./dev/kfd, render devices,gfx942, and the MI300X product name.The earlier VHD prebake proof of concept has been removed from this PR so the production CSE path can be reviewed independently.
Validation performed:
make generatego test ./pkg/agent(cd aks-node-controller && go test ./parser)Standard_ND96isr_MI300X_v5Ubuntu 24.04 VM joined through AKS Flex NodeReady,amd.com/gpu=8, reboot recovery,gfx942, andAMD Instinct MI300X VFDraft blocker / follow-ups:
repo.radeon.com. Before production merge, the GPU/AgentBaker owners need to approve an AKS-controlled mirror/package distribution model and component update ownership.Which issue(s) this PR fixes:
Related to https://dev.azure.com/msazure/CloudNativeCompute/_workitems/edit/10382752