Skip to content

add amd support - #705

Merged
hami-robot[bot] merged 3 commits into
Project-HAMi:masterfrom
FouoF:master
Aug 3, 2026
Merged

add amd support#705
hami-robot[bot] merged 3 commits into
Project-HAMi:masterfrom
FouoF:master

Conversation

@FouoF

@FouoF FouoF commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind documentation

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Checklist:

  • npm run lint and npm run format:check pass
  • npm run build succeeds for both en and zh
  • Chinese translation updated if English docs changed (or noted why not)
  • Commits are signed off (git commit -s)

Summary by CodeRabbit

  • New Features

    • Added comprehensive documentation for sharing AMD GPUs, including setup, configuration, verification, troubleshooting, and cleanup.
    • Added examples for allocating AMD GPU memory and compute units.
    • Documented supported AMD Instinct/ROCm devices, including memory and compute isolation capabilities.
  • Documentation

    • Added AMD GPU guides and examples in English and Chinese.
    • Updated documentation navigation and roadmap status to reflect completed AMD GPU support.

Signed-off-by: Jifei Wang <jifei.wang@dynamia.ai>
@hami-robot hami-robot Bot added kind/documentation Improvements or additions to documentation dco-signoff: yes labels Aug 3, 2026
@hami-robot
hami-robot Bot requested review from rootsongjc and windsonsea August 3, 2026 03:38
@netlify

netlify Bot commented Aug 3, 2026

Copy link
Copy Markdown

Deploy Preview for project-hami ready!

Name Link
🔨 Latest commit 991595d
🔍 Latest deploy log https://app.netlify.com/projects/project-hami/deploys/6a702f10b2acf400084cdee3
😎 Deploy Preview https://deploy-preview-705--project-hami.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The documentation adds AMD GPU sharing guides and allocation examples. It updates English and Chinese navigation, supported-device tables, and contributor roadmaps to describe AMD GPU support.

Changes

AMD GPU documentation

Layer / File(s) Summary
AMD GPU sharing guides
docs/userguide/amd-device/enable-amd-gpu-sharing.md, i18n/zh/.../amd-device/enable-amd-gpu-sharing.md
Adds setup, deployment, resource validation, workload examples, troubleshooting, cleanup, and operational instructions for AMD GPU sharing.
AMD GPU allocation examples
docs/userguide/amd-device/examples/allocate-core-and-memory.md, i18n/zh/.../amd-device/examples/allocate-core-and-memory.md, sidebars.js, i18n/zh/.../current.json
Adds examples for requesting AMD GPU memory and compute-unit quotas and registers the guide and examples in the documentation navigation.
AMD GPU support status
docs/userguide/device-supported.md, i18n/zh/.../userguide/device-supported.md, docs/contributor/roadmap.md, i18n/zh/.../contributor/roadmap.md
Adds AMD Instinct/ROCm support details and marks AMD GPU device support as completed in both roadmaps.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: rootsongjc, windsonsea

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately identifies the pull request's primary change: adding AMD support documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@hami-robot hami-robot Bot added the size/L label Aug 3, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/userguide/amd-device/enable-amd-gpu-sharing.md (1)

172-177: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix the failing Prettier check before merge.

The pipeline reports a Prettier formatting failure, but it does not identify the file or token. Run Prettier across all four changed Markdown files and rerun the check.

npx prettier --write \
  docs/userguide/amd-device/enable-amd-gpu-sharing.md \
  i18n/zh/docusaurus-plugin-content-docs/current/userguide/amd-device/enable-amd-gpu-sharing.md \
  docs/userguide/amd-device/examples/allocate-core-and-memory.md \
  i18n/zh/docusaurus-plugin-content-docs/current/userguide/amd-device/examples/allocate-core-and-memory.md

npx prettier --check \
  docs/userguide/amd-device/enable-amd-gpu-sharing.md \
  i18n/zh/docusaurus-plugin-content-docs/current/userguide/amd-device/enable-amd-gpu-sharing.md \
  docs/userguide/amd-device/examples/allocate-core-and-memory.md \
  i18n/zh/docusaurus-plugin-content-docs/current/userguide/amd-device/examples/allocate-core-and-memory.md
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/userguide/amd-device/enable-amd-gpu-sharing.md` around lines 172 - 177,
Run Prettier with write mode on all four changed Markdown documents, then rerun
the same targeted Prettier check and retain the formatter’s changes so every
file passes.

Source: Pipeline failures

🧹 Nitpick comments (1)
docs/userguide/amd-device/enable-amd-gpu-sharing.md (1)

120-128: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Pin the workload image used by the examples.

rocm/pytorch:latest does not identify the tested ROCm/PyTorch build behind the displayed output. Use a concrete tag or digest, then apply it consistently to the Chinese guide and both allocation examples.

Proposed change
-      image: rocm/pytorch:latest
+      image: rocm/pytorch:<tested-tag-or-digest>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/userguide/amd-device/enable-amd-gpu-sharing.md` around lines 120 - 128,
Update the workload image reference in the example manifests, including the
visible pytorch container configuration, from rocm/pytorch:latest to one
concrete tested tag or digest. Apply the same pinned reference consistently
across the Chinese guide and both allocation examples, preserving the existing
commands and behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/userguide/amd-device/enable-amd-gpu-sharing.md`:
- Around line 76-81: Update the Helm install command in
docs/userguide/amd-device/enable-amd-gpu-sharing.md lines 76-81 and the
corresponding command in
i18n/zh/docusaurus-plugin-content-docs/current/userguide/amd-device/enable-amd-gpu-sharing.md
lines 77-82 to include --dependency-update.

---

Outside diff comments:
In `@docs/userguide/amd-device/enable-amd-gpu-sharing.md`:
- Around line 172-177: Run Prettier with write mode on all four changed Markdown
documents, then rerun the same targeted Prettier check and retain the
formatter’s changes so every file passes.

---

Nitpick comments:
In `@docs/userguide/amd-device/enable-amd-gpu-sharing.md`:
- Around line 120-128: Update the workload image reference in the example
manifests, including the visible pytorch container configuration, from
rocm/pytorch:latest to one concrete tested tag or digest. Apply the same pinned
reference consistently across the Chinese guide and both allocation examples,
preserving the existing commands and behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 480b35ab-e243-43a2-a898-c391c49064a7

📥 Commits

Reviewing files that changed from the base of the PR and between a0b4368 and 11c8331.

📒 Files selected for processing (10)
  • docs/contributor/roadmap.md
  • docs/userguide/amd-device/enable-amd-gpu-sharing.md
  • docs/userguide/amd-device/examples/allocate-core-and-memory.md
  • docs/userguide/device-supported.md
  • i18n/zh/docusaurus-plugin-content-docs/current.json
  • i18n/zh/docusaurus-plugin-content-docs/current/contributor/roadmap.md
  • i18n/zh/docusaurus-plugin-content-docs/current/userguide/amd-device/enable-amd-gpu-sharing.md
  • i18n/zh/docusaurus-plugin-content-docs/current/userguide/amd-device/examples/allocate-core-and-memory.md
  • i18n/zh/docusaurus-plugin-content-docs/current/userguide/device-supported.md
  • sidebars.js

Comment thread docs/userguide/amd-device/enable-amd-gpu-sharing.md
FouoF and others added 2 commits August 3, 2026 11:58
Signed-off-by: Jifei Wang <jifei.wang@dynamia.ai>
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Jifei Wang <jifei.wang@dynamia.ai>
Co-authored-by: Cursor <cursoragent@cursor.com>
@FouoF
FouoF marked this pull request as ready for review August 3, 2026 07:36
@hami-robot
hami-robot Bot requested a review from archlitchi August 3, 2026 07:37

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
docs/userguide/amd-device/enable-amd-gpu-sharing.md (1)

42-75: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Restrict the privileged DaemonSet to AMD nodes.

Chart 0.0.1 sets node_selector_enabled: false, so the command does not render the chart’s nodeSelector. The container is privileged: true, which runs every DaemonSet daemon on all eligible nodes. Enable node selection in the install command or override the bundled node_selector value, and document the AMD-node label or cluster-specific selector.

Suggested command change
   --namespace kube-system \
-  --create-namespace
+  --create-namespace \
+  --set node_selector_enabled=true
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/userguide/amd-device/enable-amd-gpu-sharing.md` around lines 42 - 75,
Update the “Deploy amd-device-plugin” installation instructions to enable the
chart’s node selection and constrain the privileged DaemonSet to AMD-capable
nodes. Include the required AMD node label or an explicitly documented
cluster-specific selector, and ensure the command overrides
node_selector_enabled and node_selector rather than relying on the chart 0.0.1
defaults.
i18n/zh/docusaurus-plugin-content-docs/current/userguide/amd-device/enable-amd-gpu-sharing.md (1)

43-75: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Restrict the privileged DaemonSet to AMD nodes.

amd-device-plugin chart 0.0.1 defaults node_selector_enabled: false while the container runs securityContext.privileged: true. After the suggested helm upgrade --install, add a node selector that limits pods to AMD nodes, such as enabling and setting node_selector_enabled: true plus a cluster-specific node_selector label, or labeling AMD nodes and documenting that required label.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@i18n/zh/docusaurus-plugin-content-docs/current/userguide/amd-device/enable-amd-gpu-sharing.md`
around lines 43 - 75, Update the amd-device-plugin deployment guidance to
restrict its privileged DaemonSet to AMD nodes. Document enabling
node_selector_enabled and configuring a cluster-specific node_selector, or
require and document an equivalent AMD-node label, alongside the Helm
installation instructions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/userguide/amd-device/enable-amd-gpu-sharing.md`:
- Around line 76-83: Update the Helm installation commands in
docs/userguide/amd-device/enable-amd-gpu-sharing.md lines 76-83 and
i18n/zh/docusaurus-plugin-content-docs/current/userguide/amd-device/enable-amd-gpu-sharing.md
lines 77-84 to enable node selectors and restrict the DaemonSet to AMD GPU nodes
using the documented AMD PCI label and amd64 architecture selector.

---

Outside diff comments:
In `@docs/userguide/amd-device/enable-amd-gpu-sharing.md`:
- Around line 42-75: Update the “Deploy amd-device-plugin” installation
instructions to enable the chart’s node selection and constrain the privileged
DaemonSet to AMD-capable nodes. Include the required AMD node label or an
explicitly documented cluster-specific selector, and ensure the command
overrides node_selector_enabled and node_selector rather than relying on the
chart 0.0.1 defaults.

In
`@i18n/zh/docusaurus-plugin-content-docs/current/userguide/amd-device/enable-amd-gpu-sharing.md`:
- Around line 43-75: Update the amd-device-plugin deployment guidance to
restrict its privileged DaemonSet to AMD nodes. Document enabling
node_selector_enabled and configuring a cluster-specific node_selector, or
require and document an equivalent AMD-node label, alongside the Helm
installation instructions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 859272e8-b6e6-4075-b138-7f7472a4b0d0

📥 Commits

Reviewing files that changed from the base of the PR and between 11c8331 and 991595d.

📒 Files selected for processing (3)
  • docs/userguide/amd-device/enable-amd-gpu-sharing.md
  • i18n/zh/docusaurus-plugin-content-docs/current/userguide/amd-device/enable-amd-gpu-sharing.md
  • sidebars.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • sidebars.js

Comment on lines +76 to +83
Deploy [amd-device-plugin](https://github.com/Project-HAMi/amd-device-plugin) to all AMD GPU nodes. Chart `0.0.1` defaults to image `ghcr.io/project-hami/amd-device-plugin:0.0.1` and installs the bundled `libamvgpu.so` hook onto the node through a `postStart` lifecycle hook:

```bash
helm upgrade --install amd-gpu \
https://github.com/Project-HAMi/amd-device-plugin/releases/download/amd-gpu-helm-0.0.1/amd-gpu-0.0.1.tgz \
--namespace kube-system \
--create-namespace
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

Project-HAMi amd-device-plugin helm values node_selector_enabled values.yaml

💡 Result:

The node_selector_enabled parameter and related node_selector settings are features of the official ROCm k8s-device-plugin Helm chart [1][2], not the Project-HAMi Helm chart [3][4]. Project-HAMi does not use the node_selector_enabled flag in its values.yaml [3][4]. Instead, HAMi manages device plugin deployment and node configuration through its own parameters, such as devicePlugin.nvidiaNodeSelector (which defaults to {"gpu": "on"}) [4] and per-node configurations managed via ConfigMaps [5]. If you are using the ROCm k8s-device-plugin Helm chart (found on Artifact Hub [1]), the node_selector_enabled value in values.yaml functions as follows: 1. Purpose: When set to true, it enables the use of node_selector in the DaemonSet specification [2][6]. 2. Default: It defaults to false [1][2]. 3. Configuration: When node_selector_enabled is true, the chart uses the labels defined under node_selector in values.yaml [1][2]. A common default selector used by this chart is feature.node.kubernetes.io/pci-0300_1002.present: "true" [1][2]. If you are attempting to configure node selection in Project-HAMi, you should refer to the devicePlugin.nvidiaNodeSelector field in the HAMi Helm chart values.yaml or define per-node overrides in the hami-device-plugin ConfigMap [3][4][5].

Citations:


🌐 Web query:

raw.githubusercontent.com/Project-HAMi/amd-device-plugin/amd-gpu-helm-0.0.1/helm/amd-gpu/values.yaml

💡 Result:

The URL provided, raw.githubusercontent.com/Project-HAMi/amd-device-plugin/amd-gpu-helm-0.0.1/helm/amd-gpu/values.yaml, refers to a location that does not correspond to an official or maintained component of the Project-HAMi repository [1]. Project-HAMi is a middleware project designed to facilitate the virtualization and sharing of heterogeneous AI accelerators (such as GPUs, NPUs, and DCUs) across Kubernetes workloads [1]. While the project actively supports multiple hardware vendors, the official device management, scheduling, and configuration for all supported accelerators, including AMD, are centralized within the main Project-HAMi Helm chart (located in the charts/hami directory of the Project-HAMi/HAMi repository) [2][3][1]. Key distinctions to note: - AMD device support: Project-HAMi has been actively developing support for AMD Instinct GPUs, including features for GPU memory limiting and computing unit (CU) partitioning [4][5]. This implementation is integrated directly into the core HAMi project infrastructure [1]. - Independent Plugins: Native AMD device plugins (such as the one found at github.com/ROCm/k8s-device-plugin) are designed for the native Kubernetes scheduler and are not directly compatible with the HAMi scheduler, which requires specific protocols for device annotation and vGPU allocation [6][1]. - Configuration: All configuration for HAMi, including device-specific settings, is managed through the central HAMi Helm chart values.yaml and associated ConfigMaps [7][1]. If you are looking to configure AMD support within HAMi, you should refer to the official documentation and the main values.yaml file found in the Project-HAMi/HAMi repository [7][1].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Fetch and inspect only the chart values/template metadata needed for DaemonSet scheduling,
# without running any repository code.
url="https://raw.githubusercontent.com/Project-HAMi/amd-device-plugin/amd-gpu-helm-0.0.1/helm/amd-gpu/values.yaml"
template_url="https://raw.githubusercontent.com/Project-HAMi/amd-device-plugin/amd-gpu-helm-0.0.1/helm/amd-gpu/templates/daemonset.yaml"

tmpdir="$(mktemp -d)"
trap 'rm -rf "$tmpdir"' EXIT

wget -qO- "$url" 2>/dev/null > "$tmpdir/values.yaml" || curl -sSL "$url" > "$tmpdir/values.yaml"
wget -qO- "$template_url" 2>/dev/null > "$tmpdir/daemonset.yaml" || curl -sSL "$template_url" > "$tmpdir/daemonset.yaml"

python3 - <<'PY' "$tmpdir/values.yaml" "$tmpdir/daemonset.yaml"
import sys
from pathlib import Path
for p in sys.argv[1:]:
    print(f"\n--- {Path(p).name}:")
    data = Path(p).read_text()
    for needle in ["node_selector_enabled", "nodeSelector", "nodeAffinity", "podAffinity", "privileged", "postStart"]:
        idx = data.find(needle)
        if idx >= 0:
            start = max(0, idx-120)
            end = min(len(data), idx+220)
            print(f"\n[context] {needle}:")
            print(data[start:end].replace("\n", "\n"))

data = Path(sys.argv[1]).read_text()
print("\n--- relevant selectors/config in values.yaml ---")
for line in data.splitlines():
    if any(s in line for s in ["node_selector_enabled", "nodeSelector", "nodeAffinity", "postStart"]):
        print(line)
PY

Repository: Project-HAMi/website

Length of output: 1336


Scope the AMD device-plugin DaemonSet to AMD nodes.

values.yaml sets node_selector_enabled: false, so the privileged plugin DaemonSet is not limited to the AMD node_selector labels documented in the chart. Add a Helm selector override, such as --set node_selector_enabled=true --set stringArrayValues=node_selector={feature.node.kubernetes.io/pci-0300_1002.present=true,kubernetes.io/arch=amd64}, to both the English and mirrored Chinese instructions.

📍 Affects 2 files
  • docs/userguide/amd-device/enable-amd-gpu-sharing.md#L76-L83 (this comment)
  • i18n/zh/docusaurus-plugin-content-docs/current/userguide/amd-device/enable-amd-gpu-sharing.md#L77-L84
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/userguide/amd-device/enable-amd-gpu-sharing.md` around lines 76 - 83,
Update the Helm installation commands in
docs/userguide/amd-device/enable-amd-gpu-sharing.md lines 76-83 and
i18n/zh/docusaurus-plugin-content-docs/current/userguide/amd-device/enable-amd-gpu-sharing.md
lines 77-84 to enable node selectors and restrict the DaemonSet to AMD GPU nodes
using the documented AMD PCI label and amd64 architecture selector.

@archlitchi archlitchi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

@hami-robot

hami-robot Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: archlitchi, FouoF

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@hami-robot hami-robot Bot added the approved label Aug 3, 2026
@hami-robot
hami-robot Bot merged commit c5f52fe into Project-HAMi:master Aug 3, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants