Skip to content

[ROCm] Update ROCm to 10.1 and MORI to v1.2.4 and amd-smi fixes + AITER v0.1.28.post1 - #62536

Open
rasmith wants to merge 40 commits into
vllm-project:mainfrom
rasmith:rocm_10_1
Open

rasmith wants to merge 40 commits into
vllm-project:mainfrom
rasmith:rocm_10_1

Conversation

@rasmith

@rasmith rasmith commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Overview

This PR updates the current ROCm Dockerfile.rocm_base to 10.1 and MORI to v1.2.4.

Things to note:

  • Cherry-picks over changes from [ROCm][CI] Bump the default ROCm image to ROCm 10.1; use TheRock's triton wheel #62531
  • rocm-smi_lib was removed from 10.1
  • It's no longer necessary to pip install amd-smi anymore, its included in 10.1
  • MORI version v1.2.3.post1 doesn't have fix: migrate GPU topology from rocm_smi to amd_smi (ROCm 10.1+) ROCm/mori#663 but v1.2.4 does, which builds with 10.1
  • The ROCR fixes needed in 10.0 needed to be updated for 10.1 (applying the patch to the newer version in rocm-systems) users/rasmith/10.1/hsa_gpu_edge_signal
  • amd-smi is the replacement for rocm-smi, but this broke a number of things:
    • kv connector tests
    • any test that was using rocm-smi before
  • Fixed any breakage caused by the rocm-smi removal and made it use amd-smi
  • Needed to add a Python .pth file so amd-smi can always be found, without having to change the Dockerfile or always have to ensure one doesn't forget to add it to PYTHONPATH. We might need to file an issue so that it gets installed properly through the usual Rock wheel installs.
  • Ray needed to be updated since the current version depends on rocm-smi, but the newer versions now use amd-smi.
  • Update the ROCm kernel symbol map tool to recognize the device code that ROCm 10.1's compiler produces, so kernel-based CI test selection keeps working, see [CI][ROCm] Export kernel source maps for CI selection #59100.
  • Need AITER v0.1.28.post1 for to avoid the perf loss due to 10.1 compiler change

Extra

amd-smi has an option if you want the old rocm-smi output:

  • amd-smi --rocm-smi

Claims

  • Dockerfile builds
  • Preserves ROCR performance benefits
  • CI parity (TDB)
  • Image and wheel pipeline still works (TBD)

Validation

  • Dockerfile needs to build
  • Will need parity with CI
  • Did a run with the ROCR fixes to check performance still preserved.

Details

ROCR performance check

Performance run to check that the ROCR performance fixes are preserved:

model tp num-prompts on tok/s off tok/s delta TPOT on/off (ms) TTFT on/off (ms)
Llama-3.1-8B 4 10 475.79 394.30 +20.7% 2.08 / 2.52 21.52 / 21.53
gpt-oss-120b 8 30 187.53 139.40 +34.5% 5.31 / 7.15 26.82 / 28.26
GLM-5.2-FP8 (AITER=1) 8 10 80.42 66.24 +21.4% 12.31 / 14.97 139.59 / 140.38

Currently builds:

Result of:

DOCKER_BUILDKIT=1 docker build -f docker/Dockerfile.rocm_base --build-arg -t vllm-base:rocm10_1 .

was

=> [final 6/6] RUN echo "BASE_IMAGE: ubuntu:22.04" > /app/versions.txt     && echo "PYTHON_VERSION: 3.12" >> /app/versions.txt     && echo "ROCM_SDK_VERSION: 10.1.0" >> /app/versions.txt     && echo "T  2.4s
 => exporting to image                                                                                                                                                                                      6.1s
 => => exporting layers                                                                                                                                                                                     6.1s
 => => writing image sha256:640f8b0d8f1ea2c03f5ec637a9b0bb13cbd2d729c43863ec26be7b82734784d5                                                                                                                0.0s
 => => naming to docker.io/library/vllm-base:rocm10_1                                

Commands used to benchmark were:

vllm serve "$MODEL" --dtype auto -tp "$TP" --port 8620 \
   --no-enable-prefix-caching --disable-uvicorn-access-log --trust-remote-code \
   --max-model-len 101372 --kv-cache-dtype fp8 &

 vllm bench serve --model "$MODEL" --host 127.0.0.1 --port 8620 \
   --trust-remote-code --percentile-metrics tpot,ttft,itl,e2el \
   --dataset-name random --ignore-eos --temperature 0 \
   --max-concurrency 1 --num-prompts "$NP" \
   --random-input-len 1024 --random-output-len 1024 \
   --ready-check-timeout-sec 1800 \
   --save-result --result-filename bench.json

Import and Install Ability

Since amdsmi is now included in 10.1 but is not a complete package, I needed to add an amdsmi build step in the Dockerfile and make sure that the vLLM wheels would still work when users install them. I wanted to detail the results of that here.

Every table below compares the same five vLLM builds. Tables that only concern this PR use the three 10.1 ones.

  • 7.2.3 — vLLM v0.32.0, shipped.
  • 10.0 — vLLM nightly, shipped.
  • 10.1 base (bd84cb1a6f) — this PR before the .pth was added. amdsmi via ENV PYTHONPATH.
  • 10.1 .pth (513d206965) — what the PR has carried since. amdsmi via a .pth.
  • 10.1 PR (bc5e7f00d6) — this change. amdsmi installed as a package.

The three 10.1 columns were measured on images built from those commits.

Every measurement is on one host with 8 GPUs (gfx950 / MI355X), so a correct amdsmi reports 8. A 0 means it enumerated none.

How amdsmi reaches the user

7.2.3 10.0 10.1 base 10.1 .pth 10.1 PR
In the image Installed wheel Installed, plus ENV PYTHONPATH ENV PYTHONPATH .pth file Installed wheel
vLLM wheel pins amdsmi ✅ ✅ ✅ ❌ ✅
Loader patch Not needed find_spec lookup None None .patch file

In the Docker image

7.2.3 10.0 10.1 base 10.1 .pth 10.1 PR
import amdsmi when CI sets PYTHONPATH ✅ ✅ ❌ ✅ ✅
Run a model when CI sets PYTHONPATH ✅ ✅ ❌ ✅ ✅
pip show amdsmi ✅ ✅ ❌ ❌ ✅

This is why the .pth was added. CI's run-amd-test.sh sets PYTHONPATH=/vllm-workspace, replacing the ENV PYTHONPATH the base image relied on. import amdsmi then raises ModuleNotFoundError, vLLM falls back to UnspecifiedPlatform, and running a model fails with RuntimeError: Device string must not be empty. A .pth lives in site-packages, so nothing a caller puts in PYTHONPATH can displace it. An installed package has the same property. Without that override every column works, so the override is the whole of the difference.

Installing the vLLM wheel on a clean machine

A stock python:3.12 container — no ROCm, no vLLM — with the GPUs passed through, following the install docs:

uv venv --python 3.12 --seed --managed-python
source .venv/bin/activate
uv pip install <that commit's vLLM wheel>

The vLLM wheel contains no amdsmi files and ships no .pth. It only declares Requires-Dist: amdsmi==..., and the index serves amdsmi as a separate 87 KB wheel that pip pulls in — the same arrangement as torch and triton.

Nothing from the ROCm image exists here, so each column is only what its own wheel brings:

base (pins unpatched) .pth (pins nothing) PR (pins patched)
pip show amdsmi ✅ ❌ ✅
import amdsmi on its own ❌ OSError ❌ ModuleNotFoundError ✅
import torch, then import amdsmi ✅ ❌ ✅
vLLM detects the GPUs ✅ ❌ ✅
Run a model ✅ ❌ ✅

.pth is the regression: no pin, so no amdsmi, so UnspecifiedPlatform and RuntimeError: Device string must not be empty.

Two independent problems sit behind those red cells:

  • No pin. The build pins whatever is installed, and a .pth installs nothing — so amdsmi quietly dropped out of the vLLM wheel's requirements. It was not removed on purpose.
  • An unpatched loader. base does install amdsmi, but its copy cannot find the AMD SMI library unless something has already loaded it. vLLM survives this because it imports torch first. A bare import amdsmi does not.

The PR fixes both: an amdsmi wheel built from the SDK's own sources with the loader patched, installed in the image and pinned by the vLLM wheel.

Installing the vLLM wheel: inside the image, three ways

The same wheels, but installed inside that commit's own vLLM image rather than on a clean machine, with the image's own vLLM uninstalled first. The contrast with the table above is the point: here the image's .pth or ENV PYTHONPATH still exists and can rescue an install that the wheel alone would not. Three ways to make the environment — the image's system Python, a plain python3 -m venv, and the documented uv venv --managed-python.

after installing that commit's wheel base .pth PR
system python3: import amdsmi ✅ ✅ ✅
system python3: pip show amdsmi ✅ ❌ ✅
python3 -m venv: import amdsmi ✅ ❌ ✅
uv venv --managed-python: import amdsmi ✅ ❌ ✅
GPUs reported in a venv, after import torch (8 is correct) 0 no amdsmi to ask 8
which amdsmi a venv ends up using the image's SDK copy, via PYTHONPATH none the venv's own

A .pth is the one mechanism a user's own virtual environment throws away. It lives in the image's site-packages, so neither venv recipe sees it, and that state has no pin to install amdsmi instead.

ENV PYTHONPATH surviving a venv is a liability, not a feature. Base's pin does install amdsmi into the venv, but PYTHONPATH then shadows it with the image's SDK copy, which pairs with the venv's own torch and reports 0 GPUs instead of 8 — a wrong answer rather than an error.

Building vLLM from source

Two kinds of editable install are tested:

python3 setup.py develop   # what the ROCm install docs prescribe. `pip install .` does not work there
pip install -e .

Both run inside that commit's own image against a bind-mounted checkout, with PYTORCH_ROCM_ARCH=gfx950, after removing the vLLM the image ships so it cannot shadow the build. They agree on every row below.

after either editable install base .pth PR
The build succeeds ✅ ✅ ✅
pip show amdsmi ❌ ❌ ✅
import amdsmi ✅ ✅ ✅
Run a model ✅ ✅ ✅
Run a model when CI sets PYTHONPATH ❌ ✅ ✅

The last row is the developer-facing form of the CI failure: build editable on base under that PYTHONPATH and vLLM cannot run a model.

The docs' amdsmi step, which a source builder outside these images still needs:

7.2.3 10.0 10.1 base 10.1 .pth 10.1 PR
The documented step runs clean ✅ ✅ ❌ ❌ ✅
Lines in that step 1 2 2 2 4
pip show amdsmi afterwards ✅ ✅ ❌ ❌ ✅

The 10.1 SDK stopped shipping packaging metadata, so the documented pip install fails there. The PR's step supplies that metadata and the loader patch itself, and shrinks back to one line once a future SDK restores it.

AI assistance used and reviewed by the author.

Pull Request Checklist
  • I used vLLM's /pr-checklist skill. (Mandatory for agents, optional for humans).

  • AI assistance was used during the creation of this PR.

  • [X ] Design Fit: Minimizes impact on core components, reuses existing functionality, and justifies added complexity.

  • [X ] Testing and Validation: Validates the change and ensures any added tests are meaningful and reliable, with CI coverage or documented CI resource constraints and validation performed outside CI.

  • [ X] Code Quality and Style: Keeps code and comments clear and concise, and updates relevant documentation and examples.

  • Pull Request Contents: Includes a brief summary and relevant links, supports claims with evidence, explains root causes and implementation trade-offs, and follows the contributing guide.

Signed-off-by: Randall Smith <Randall.Smith@amd.com>

@claude claude 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.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@mergify mergify Bot added ci/build rocm Related to AMD ROCm labels Oct 19, 2026
@github-project-automation github-project-automation Bot moved this to Todo in AMD Oct 19, 2026
Rohan138 and others added 2 commits October 19, 2026 15:18
…iton wheel

Move the TheRock stack from ROCm 10.0 to 10.1, keeping torch 2.13
(2.13.0+rocm10.1.0). Its torch pins triton 3.8.0+git669b31ac.rocm10.1.0, the
release/internal/3.8.x commit we were building from source, so install that
wheel and drop the triton source build, the torch repack and the METADATA
edit. All pins resolve from the stable index, so drop the nightly extra index.

The wheel/image variant becomes rocm101 (setup.py derives it from the SDK
version); rename the release pipeline's rocm100 steps and the perf-eval image
tag to match, and update the install docs.

Co-authored-by: Claude
Signed-off-by: Rohan Potdar <rohan.potdar@amd.com>
@mergify

mergify Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Documentation preview: https://vllm--62536.org.readthedocs.build/en/62536/

@mergify mergify Bot added the documentation Improvements or additions to documentation label Oct 19, 2026
rasmith and others added 2 commits October 19, 2026 15:35
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
@Rohan138 Rohan138 added the ready ONLY add when PR is ready to merge/full CI is needed label Oct 20, 2026
@github-actions

Copy link
Copy Markdown

✅ @rasmith, CI is now available for this PR.

  • /ci run starts upstream CI; /amd-ci run starts AMD CI only.
  • Run commands test your branch with every commit currently on its upstream target branch. If it is behind, the bot merges the target branch into it first (pull before pushing again). Append --allow-stale to a run command to test an outdated branch as is, at your own risk.
  • /ci retry retries failed jobs in the CI build for the current PR head. If the current head has no CI build, it starts a new CI build for the current head containing only jobs that failed in the latest earlier CI build for this PR.
  • /amd-ci retry retries failed jobs in AMD CI for the current PR head. Use /amd-ci run when the current head has no AMD CI build.
  • /ci cancel cancels scheduled or running CI builds for this PR branch; /amd-ci cancel does the same for AMD CI only.

@Rohan138

Copy link
Copy Markdown
Collaborator

/ci run

@Rohan138

Copy link
Copy Markdown
Collaborator

/amd-ci run nightly

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #96172 for commit 1f39d71b8d11.

ℹ️ This PR is 1 commit behind upstream main. Merged upstream main into this branch as 1f39d71b8d11 before starting CI. Pull the branch before pushing more changes.

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite AMD CI #15045 for commit 1f39d71b8d11.

@mergify

mergify Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Hi @rasmith, the pre-commit checks have failed. Please run:

uv pip install pre-commit>=4.5.1
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

@mergify mergify Bot added the needs-rebase label Nov 3, 2026
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
@rasmith

rasmith commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

/ci run

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

✅ Triggered Buildkite CI #100005 for commit fa3a10ae2c6e.

ℹ️ This PR is 2 commits behind upstream main. Merged upstream main into this branch as fa3a10ae2c6e before starting CI. Pull the branch before pushing more changes.

@mergify mergify Bot removed the needs-rebase label Nov 4, 2026
@mawong-amd

Copy link
Copy Markdown
Member

Not a blocker, but something to keep in mind if users see RCCL perf differences from ROCm 10.1: sgl-project/sglang#45576

@dmitrii-galantsev

dmitrii-galantsev commented Nov 4, 2026 •

Copy link
Copy Markdown

I suspect this patch will conflict once ROCm/rocm-systems#14510 gets merged?

@rasmith

rasmith commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

I suspect this patch will conflict once ROCm/rocm-systems#14510 gets merged?

Oh nice, will this make it into 10.2?

- tests/compile/fusions_e2e/
commands:
- rocm-smi
- amd-smi

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.

Oh btw, this reminded me, do we need to also check ci-infra repo and replace any rocm-smi calls? is it getting fully deprecated in 10.1? or are these changes here just paving the way?

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.

It's fully gone, so yeah.

@rasmith rasmith Nov 5, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oh btw, this reminded me, do we need to also check ci-infra repo and replace any rocm-smi calls? is it getting fully deprecated in 10.1? or are these changes here just paving the way?

I don't know much about ci-infra, but rocm-smi has been completely removed.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

it's back in 10.2 AFAIK, but we are planning to deprecate it yes :)

@rasmith

rasmith commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

/amd-ci run nightly --allow-stale

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

✅ Triggered Buildkite AMD CI #15770 for commit fa3a10ae2c6e.

⚠️ This PR is 24 commits behind upstream main. Running CI at your own risk because --allow-stale was requested; outdated CI configuration may cause failures. Before merging, merge or rebase onto the latest main, then rerun /amd-ci run nightly on the latest PR commit.

@rasmith

rasmith commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

/ci run

@rasmith

rasmith commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

/amd-ci run nightly

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

✅ Triggered Buildkite CI #100298 for commit 987a06c594ae.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

✅ Triggered Buildkite AMD CI #15775 for commit 987a06c594ae.

@rasmith rasmith changed the title [ROCm] Update ROCm to 10.1 and MORI to v1.2.4 and amd-smi fixes [ROCm] Update ROCm to 10.1 and MORI to v1.2.4 and amd-smi fixes + AITER v0.1.28.post1 Nov 5, 2026
@rasmith

rasmith commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

/ci retry

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

✅ Queued 2 failed job(s) for retry in Buildkite CI #100298.

@dmitrii-galantsev

Copy link
Copy Markdown

I suspect this patch will conflict once ROCm/rocm-systems#14510 gets merged?

Oh nice, will this make it into 10.2?

I think it might be too late for 10.2 which sucks!

@rasmith

rasmith commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

/ci run

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

✅ Triggered Buildkite CI #100643 for commit 221ed6b4264b.

@rasmith

rasmith commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

/amd-ci run nightly

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

✅ Triggered Buildkite AMD CI #15785 for commit 221ed6b4264b.

@mergify

mergify Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Hi @rasmith, the pre-commit checks have failed. Please run:

uv pip install pre-commit>=4.5.1
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

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

ci/build documentation Improvements or additions to documentation kv-connector mooncake Mooncake KV-transfer / EC-transfer nixl NIXL KV connector / multi-tiered KV offloading (KVCR) ready ONLY add when PR is ready to merge/full CI is needed rocm Related to AMD ROCm

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

8 participants