Skip to content

Commit cd75b41

Browse files
authored
[ROCm] [DOC] Update the Documentation to include ROCm Nightly Wheel support (vllm-project#38457)
Signed-off-by: tjtanaa <tunjian.tan@embeddedllm.com>
1 parent acd3854 commit cd75b41

1 file changed

Lines changed: 118 additions & 7 deletions

File tree

docs/getting_started/installation/gpu.rocm.inc.md

Lines changed: 118 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
<!-- markdownlint-disable MD041 MD051 -->
22
--8<-- [start:installation]
33

4-
vLLM supports AMD GPUs with ROCm 6.3 or above. Pre-built wheels are available for ROCm 7.0.
4+
vLLM supports AMD GPUs with ROCm 6.3 or above. Pre-built wheels are available for ROCm 7.0 and ROCm 7.2.1.
5+
6+
#### Prebuilt Wheels
7+
8+
| ROCm Variant | Python Version | ROCm Version | glibc Requirement | Supported Versions |
9+
| ------------ | -------------- | ------------ | ----------------- | ------------------ |
10+
| `rocm700` | 3.12 | 7.0 | >= 2.35 | `0.14.0` to `0.18.0` |
11+
| `rocm721` | 3.12 | 7.2.1 | >= 2.35 | Nightly releases after commit `171775f306a333a9cf105bfd533bf3e113d401d9` |
512

613
--8<-- [end:installation]
714
--8<-- [start:requirements]
@@ -23,26 +30,112 @@ If you need a different ROCm version or want to use an existing PyTorch installa
2330
To install the latest version of vLLM for Python 3.12, ROCm 7.0 and `glibc >= 2.35`.
2431

2532
```bash
26-
uv pip install vllm --extra-index-url https://wheels.vllm.ai/rocm/
33+
uv pip install vllm --extra-index-url https://wheels.vllm.ai/rocm/ --upgrade
2734
```
2835

2936
!!! tip
30-
You can find out about which ROCm version the latest vLLM supports by checking the index in extra-index-url [https://wheels.vllm.ai/rocm/](https://wheels.vllm.ai/rocm/) .
37+
You can find out about which ROCm version the latest vLLM supports by checking the `vllm` package in index in extra-index-url <https://wheels.vllm.ai/rocm/> at [https://wheels.vllm.ai/rocm/vllm](https://wheels.vllm.ai/rocm/vllm) .
38+
39+
Another approach is that you can use this following commands to automatically extract the wheel variants:
40+
41+
```bash
42+
# automatically extract the available rocm variant
43+
export VLLM_ROCM_VARIANT=$(curl -s https://wheels.vllm.ai/rocm/vllm | grep -oP 'rocm\d+' | head -1)
44+
45+
# automatically extract the vLLM version
46+
export VLLM_VERSION=$(curl -s https://wheels.vllm.ai/rocm/vllm | grep -oP 'vllm-\K[0-9.]+' | head -1)
47+
48+
# inspect if the ROCm version is compatible with your environment
49+
echo $VLLM_ROCM_VARIANT
50+
echo $VLLM_VERSION
51+
```
3152

3253
To install a specific version and ROCm variant of vLLM wheel.
3354

3455
```bash
35-
uv pip install vllm --extra-index-url https://wheels.vllm.ai/rocm/0.15.0/rocm700
56+
# version without the `v`
57+
uv pip install vllm==${VLLM_VERSION} --extra-index-url https://wheels.vllm.ai/rocm/${VLLM_VERSION}/${VLLM_ROCM_VARIANT}
58+
59+
# Example
60+
uv pip install vllm==0.18.0 --extra-index-url https://wheels.vllm.ai/rocm/0.18.0/rocm700
3661
```
3762

3863
!!! warning "Caveats for using `pip`"
3964

40-
We recommend leveraging `uv` to install vLLM wheel. Using `pip` to install from custom indices is cumbersome, because `pip` combines packages from `--extra-index-url` and the default index, choosing only the latest version, which makes it difficult to install wheel from custom index if exact versions of all packages are specified exactly. In contrast, `uv` gives the extra index [higher priority than the default index](https://docs.astral.sh/uv/pip/compatibility/#packages-that-exist-on-multiple-indexes).
65+
We recommend leveraging `uv` to install the vLLM wheel. Using `pip` to install from custom indices is cumbersome because `pip` combines packages from `--extra-index-url` and the default index, choosing only the latest version. This makes it difficult to install a wheel from a custom index unless exact versions of all packages are specified. In contrast, `uv` gives the extra index [higher priority than the default index](https://docs.astral.sh/uv/pip/compatibility/#packages-that-exist-on-multiple-indexes).
4166

42-
If you insist on using `pip`, you have to specify the exact vLLM version and full URL of the wheel path `https://wheels.vllm.ai/rocm/<version>/<rocm-variant>` (which can be obtained from the web page).
67+
If you insist on using `pip`, you need to specify the exact vLLM version in the package name and provide the custom index URL `https://wheels.vllm.ai/rocm/${VLLM_VERSION}/${VLLM_ROCM_VARIANT}` via `--extra-index-url`.
4368

4469
```bash
45-
pip install vllm==0.15.0+rocm700 --extra-index-url https://wheels.vllm.ai/rocm/0.15.0/rocm700
70+
pip install vllm==0.18.0+rocm700 --extra-index-url https://wheels.vllm.ai/rocm/0.18.0/rocm700
71+
```
72+
73+
#### Install the latest code
74+
75+
LLM inference is a fast-evolving field, and the latest code may contain bug fixes, performance improvements, and new features that are not released yet. To allow users to try the latest code without waiting for the next release, vLLM provides wheels for every commit since commit `171775f306a333a9cf105bfd533bf3e113d401d9` on <https://wheels.vllm.ai/rocm/nightly/>. The custom index to be used is `https://wheels.vllm.ai/rocm/nightly/${VLLM_ROCM_VARIANT}`
76+
77+
**NOTE:** The first ROCm Variant that supports nightly wheel is ROCm 7.2.1
78+
79+
To install from latest nightly index, run:
80+
81+
```bash
82+
# automatically extract the available rocm variant
83+
export VLLM_ROCM_VARIANT=$(curl -s https://wheels.vllm.ai/rocm/nightly | \
84+
grep -oP 'rocm\d+' | head -1 | sed 's/%2B/+/g')
85+
86+
# inspect if the ROCm version is compatible with your environment
87+
echo $VLLM_ROCM_VARIANT
88+
89+
uv pip install --pre vllm \
90+
--extra-index-url https://wheels.vllm.ai/rocm/nightly/${VLLM_ROCM_VARIANT} \
91+
--index-strategy unsafe-best-match
92+
```
93+
94+
##### Install specific revisions
95+
96+
If you want to access the wheels for previous commits (e.g. to bisect the behavior change, performance regression), you can specify the commit hash in the URL, example:
97+
98+
```bash
99+
export VLLM_COMMIT=5b8c30d62b754b575e043ce2fc0dcbf8a64f6306
100+
101+
export VLLM_ROCM_VARIANT=$(curl -s https://wheels.vllm.ai/rocm/${VLLM_COMMIT} | \
102+
grep -oP 'rocm\d+' | head -1 | sed 's/%2B/+/g')
103+
104+
# Extract the version from the wheel URL
105+
export VLLM_VERSION=$(curl -s https://wheels.vllm.ai/rocm/${VLLM_COMMIT}/${VLLM_ROCM_VARIANT}/vllm/ | \
106+
grep -oP 'vllm-\K[^-]+' | head -1 | sed 's/%2B/+/g')
107+
108+
# inspect the version if it is compatible with the ROCm version of your environment
109+
echo $VLLM_ROCM_VARIANT
110+
echo $VLLM_VERSION
111+
112+
uv pip install vllm==${VLLM_VERSION} \
113+
--extra-index-url https://wheels.vllm.ai/rocm/${VLLM_COMMIT}/${VLLM_ROCM_VARIANT} \
114+
--index-strategy unsafe-best-match
115+
```
116+
117+
!!! warning "`pip` caveat"
118+
119+
Using `pip` to install from nightly indices is _not supported_, because `pip` combines packages from `--extra-index-url` and the default index, choosing only the latest version, which makes it difficult to install a development version prior to the released version. In contrast, `uv` gives the extra index [higher priority than the default index](https://docs.astral.sh/uv/pip/compatibility/#packages-that-exist-on-multiple-indexes).
120+
121+
If you insist on using `pip`, you need to specify the exact vLLM version in the package name and provide the custom index URL (which can be obtained from the web page).
122+
123+
```bash
124+
export VLLM_COMMIT=5b8c30d62b754b575e043ce2fc0dcbf8a64f6306
125+
126+
export VLLM_ROCM_VARIANT=$(curl -s https://wheels.vllm.ai/rocm/${VLLM_COMMIT} | \
127+
grep -oP 'rocm\d+' | head -1 | sed 's/%2B/+/g')
128+
129+
# Extract the version from the wheel URL
130+
export VLLM_VERSION=$(curl -s https://wheels.vllm.ai/rocm/${VLLM_COMMIT}/${VLLM_ROCM_VARIANT}/vllm/ | \
131+
grep -oP 'vllm-\K[^-]+' | head -1 | sed 's/%2B/+/g')
132+
133+
# inspect the version if it is compatible with the ROCm version of your environment
134+
echo $VLLM_ROCM_VARIANT
135+
echo $VLLM_VERSION
136+
137+
pip install vllm==${VLLM_VERSION} \
138+
--extra-index-url https://wheels.vllm.ai/rocm/${VLLM_COMMIT}/${VLLM_ROCM_VARIANT}
46139
```
47140

48141
--8<-- [end:pre-built-wheels]
@@ -193,6 +286,24 @@ docker run --rm \
193286
--model Qwen/Qwen3-0.6B
194287
```
195288

289+
To use the docker image as base for development, you can launch it in interactive session through overriding the entrypoint.
290+
291+
???+ console "Commands"
292+
```bash
293+
docker run --rm -it \
294+
--group-add=video \
295+
--cap-add=SYS_PTRACE \
296+
--security-opt seccomp=unconfined \
297+
--device /dev/kfd \
298+
--device /dev/dri \
299+
-v ~/.cache/huggingface:/root/.cache/huggingface \
300+
--env "HF_TOKEN=$HF_TOKEN" \
301+
--network=host \
302+
--ipc=host \
303+
--entrypoint /bin/bash \
304+
vllm/vllm-openai-rocm:<tag>
305+
```
306+
196307
#### Use AMD's Docker Images (Deprecated)
197308

198309
!!! warning "Deprecated"

0 commit comments

Comments
 (0)