Skip to content

00-Environment

AMD

🛠️ ROCm Environment Setup

Unified environment baseline · ROCm 10.0.0 (TheRock + ROCm.AI) · Prerequisite for all subsequent chapters

Back to Home | 中文

Introduction

  This chapter serves as the environment baseline for the entire hello-rocm project. It targets ROCm 10.0.0 (ROCm Core SDK, released 2026-08-26) and covers installation, verification, and uninstallation on both Windows and Ubuntu.

  All subsequent chapters (01-Deploy, 02-Fine-tune, etc.) depend on this setup. To use a different ROCm version or GPU architecture, refer to the GPU Architecture Reference Table for substitutions. For 10.0.0 vs 7.14.0, plus AMD Skills / Hyperloom / ROCm CLI, see the ROCm 10.0.0 release notes.

🚀 Major release: ROCm 10.0.0 is built on TheRock and ships ROCm.AI for the first time. 7.14.0 finished the move from a monolithic bundle to a modular Core SDK. 10.0.0 folds install, validation, serving, and optimization into three new entry points:

  • AMD Skills: official AMD optimization knowledge inside Claude / Cursor / Codex;
  • Hyperloom: an open-source auto-optimizer that profiles, finds bottlenecks, rewrites kernels, and tunes parameters;
  • ROCm CLI: install, verify, deploy, and manage from one command surface.

The pip / uv flow still works, but the wheel index moved from repo.amd.com/rocm/whl-multi-arch/ to https://stable.repo.amd.com/rocm/whl-next/. Linux apt / dnf repos now live on stable.repo.amd.com. See the TheRock transition guide and the official latest docs.

💡 Platform recommendation: Windows supports ROCm for quick inference and experimentation, but the full ROCm toolchain (rocminfo, amd-smi, multi-GPU, containerized deployment, etc.) is best supported on Ubuntu. We recommend Ubuntu 24.04 as the primary development environment; Windows works well for lightweight inference and quick testing.

⚠️ Windows users must read: Before installation, verify that your Adrenalin Driver version and Windows version meet the requirements (see version table below), or ROCm will not function.


Version Requirements

ItemRequirementDownload
ROCm10.0.0 (ROCm Core SDK / TheRock)Official install page
PyTorch2.13.0Via uv (see below)
Python3.11 / 3.12 / 3.13 / 3.14Managed by uv
Windows Version11 25H2
Adrenalin Driver (Windows)26.8.1⬇️ Download Adrenalin 26.8.1
Visual Studio 2022 (Windows)Community, select "Desktop development with C++"⬇️ Download VS 2022
Ubuntu24.04.4 (GA kernel 6.8) / 26.04 (GA kernel 7.0)Ubuntu Downloads

⚠️ Ryzen APU users note (Ubuntu 24.04): Ryzen APUs (gfx1150 / 1151 / 1152 / 1153 / 1103) require the OEM kernel 6.14 on Ubuntu 24.04: sudo apt install linux-oem-24.04c, then reboot.

AI Ecosystem Compatibility

ROCm 10.0.0 provides optimized support for popular deep learning frameworks and AI inference engines (a full upgrade over 7.14.0):

Framework / EngineSupported VersionNotes
PyTorch2.13.0Also 2.12.0 / 2.11.0; Windows is validated on 2.13.0
JAX0.11.0Also 0.10.2 / 0.10.0
vLLM0.27.0Official images cover gfx1151 and other client / APU targets
SGLang0.5.15Instinct and selected Radeon GPUs
TensorFlow2.21Also 2.20 / 2.19.1

💡 These versions replace the 7.14.0-era PyTorch 2.12.0 / JAX 0.10.0 / vLLM 0.23.0 / SGLang 0.5.13. See vLLM inference. Full delta: ROCm 10.0.0 release notes.


Table of Contents


1. Windows 11 Installation

Example: Ryzen AI Max+ 395 (gfx1151)

📖 Official docs: Install ROCm on Windows | Install PyTorch

1.1 Prerequisites Check

✅ CheckRequirement
Windows VersionMust be Windows 11 25H2 (Settings → System → About)
Adrenalin DriverMust be 26.8.1 (⬇️ Download)
Visual Studio 2022 (Optional)Community edition, select "Desktop development with C++" (⬇️ Download). Required for AMD Quark or custom op compilation
Visual Studio installer — select Desktop development with C++

1.2 Remove Conflicting Software

  • Control Panel → Programs → Uninstall a program → Remove all HIP SDK entries (HIP SDK is retired in 10.0.0; Windows and Linux now share the ROCm Core SDK)

1.3 Disable Windows Security Features

The following features interfere with ROCm and must be disabled:

  • WDAG: Control Panel → Programs and Features → Turn Windows features on or off → Uncheck "Microsoft Defender Application Guard"
  • SAC: Settings → Privacy & Security → Windows Security → App & browser control → Smart App Control settings → Off

1.4 Install uv (Python Package Manager)

This project uses uv to manage Python environments and dependencies, replacing the traditional pip + venv workflow. uv is written in Rust and is 10-100x faster.

powershell
# Windows install (PowerShell)
irm https://astral.sh/uv/install.ps1 | iex

# Or via winget
# winget install astral-sh.uv

# Verify
uv --version

📖 More install methods: uv documentation

1.5 Install ROCm + PyTorch

powershell
# Install Python 3.12 (uv has built-in version management)
uv python install 3.12

# Create virtual environment
uv venv --python 3.12
.venv\Scripts\activate

# Install PyTorch (the wheel already includes the ROCm runtime; gfx1151 = Ryzen AI Max+ 395/390/385)
uv pip install --index-url https://stable.repo.amd.com/rocm/whl-next/ "torch[device-gfx1151]==2.13.0+rocm10.0.0" "torchvision[device-gfx1151]==0.28.0+rocm10.0.0" "torchaudio==2.11.0.2+rocm10.0.0"

# Install other project dependencies (if requirements.txt exists)
uv pip install -r requirements.txt

⚠️ Do NOT copy ROCm DLLs to System32 — this causes conflicts.

💡 10.0.0 index: wheels come from https://stable.repo.amd.com/rocm/whl-next/, and you still select the GPU via the [device-gfxXXXX] extra. The gfx1151 above is the Ryzen AI Max series (395/390/385). For other GPUs, swap the architecture tag:

Your GPUdevice extras tag
Ryzen AI 9 HX (PRO) 475 / 375 etc.device-gfx1150
Ryzen AI 7 (PRO) 450 / 350 etc.device-gfx1152
Ryzen AI 7 445 / AI 5 435device-gfx1153
Radeon RX 9070 XT / 9070 GRE / AI PRO R9700Sdevice-gfx1201
Radeon RX 9060 XT / 9060 XT LP / 9060 / RX 9050 (new in 10.0.0)device-gfx1200
Radeon RX 7900 XTX / PRO W7900device-gfx1100
Instinct MI300X / MI325Xdevice-gfx942
All architectures (larger, broadest compatibility)device-all

For example, gfx1150: "torch[device-gfx1150]==2.13.0+rocm10.0.0".

Full reference: GPU Architecture Table or Official Compatibility Matrix.


2. Ubuntu 24.04 Installation

Example: Ryzen AI Max+ PRO 395 (gfx1151)

📖 Official docs: Install ROCm on Ubuntu | Install PyTorch

2.1 Install uv and Dependencies

bash
sudo apt install -y libatomic1 libquadmath0

# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh

# Verify
uv --version
bash
# Install Python 3.12
uv python install 3.12

# Create virtual environment
uv venv --python 3.12
source .venv/bin/activate

# Install PyTorch (the wheel already includes the ROCm runtime; gfx1151 = Ryzen AI Max+ 395/390/385)
uv pip install --index-url https://stable.repo.amd.com/rocm/whl-next/ "torch[device-gfx1151]==2.13.0+rocm10.0.0" "torchvision[device-gfx1151]==0.28.0+rocm10.0.0" "torchaudio==2.11.0.2+rocm10.0.0"

# Install other project dependencies (if requirements.txt exists)
uv pip install -r requirements.txt

💡 For other GPUs, just swap the architecture tag in the extra (e.g. device-gfx1150, device-gfx942, device-all) — see Section 1.5 or the GPU Architecture Table.

2.3 Alternative: One-Click Install Script

For a fully automated installation (kernel, driver, ROCm), use the project's install script:

bash
git clone -b unified-installer https://github.com/amdjiahangpan/rocm-install-script.git
cd rocm-install-script
chmod +x install.sh
sudo ./install.sh

📖 Script details and options: rocm-install-script (unified-installer branch)

2.4 Configure GPU Access Permissions (Linux)

💡 This step can be done anytime after installation; takes effect after reboot.

bash
sudo usermod -a -G render,video "$LOGNAME"
# Log out and back in, or reboot

2.5 Alternative: apt Install (TheRock)

💡 If you don't use pip / uv and prefer a system-wide install via the system package manager (apt), TheRock packaging continues from 7.14.0 into 10.0.0: package names stay amdrocm-*, and the repo moves to stable.repo.amd.com.

ChangeROCm Core SDK 10.0.0ROCm Legacy (7.2 and earlier)
Install directory/opt/rocm/core/opt/rocm/
Package prefixamdrocm-* (e.g. amdrocm-blas)rocm-* / roc* / hip*
Repositoryhttps://stable.repo.amd.com/rocm/core/packages/Older repo.amd.com layout
Library lookupInstalled packages embed RPATH (before LD_LIBRARY_PATH)RUNPATH / manual LD_LIBRARY_PATH
bash
sudo apt update
sudo apt install sudo wget gpg
# Add the 10.0.0 stable repo (Ubuntu 24.04 example):
sudo mkdir --parents --mode=0755 /etc/apt/keyrings
wget https://stable.repo.amd.com/rocm/gpg/packages.gpg -O - | \
  gpg --dearmor | sudo tee /etc/apt/keyrings/amdrocm.gpg > /dev/null

sudo tee /etc/apt/sources.list.d/amdrocm-stable.sources <<'EOF'
X-Repo-Id: amdrocm-stable
Types: deb
URIs: https://stable.repo.amd.com/rocm/core/packages/ubuntu2404/
Suites: stable
Components: main
Architectures: amd64
Signed-By: /etc/apt/keyrings/amdrocm.gpg
Enabled: yes
EOF

sudo apt update
# Use the meta-package name shown on the official install page

Compatibility: the Core SDK keeps an ABI/API compatibility path with ROCm 7.2 legacy. With apt, the amdrocm meta package still configures update-alternatives for /opt/rocm/bin and /opt/rocm/lib. For tarball installs, point PATH / LD_LIBRARY_PATH / ROCM_PATH at /opt/rocm/core.

⚠️ Note: keep using amd-smi (rocm-smi was removed in 7.14.0). ASAN packages ship with 10.0.0. Installed DEB / RPM / runfile packages now use RPATH, so a multi-version machine is less likely to pick up the wrong libraries from LD_LIBRARY_PATH.

📖 Official selector: Install ROCm.

2.6 Alternative: ROCm CLI

If you do not want to copy pip extras by hand, use the ROCm.AI ROCm CLI (Technology Preview):

bash
curl -fsSL https://raw.githubusercontent.com/ROCm/rocm-cli/main/install.sh | sh
rocm examine          # GPU / driver / runtime
rocm install sdk      # TheRock wheels into a CLI-managed environment
rocm serve qwen       # local OpenAI-compatible server

Windows:

powershell
irm https://raw.githubusercontent.com/ROCm/rocm-cli/main/install.ps1 | iex

Minimum Linux is Ubuntu 24.04. If a 7.14.0 hand-built .venv is already present, rocm examine reports it as unmanaged and rocm install sdk creates a managed runtime beside it. Details: ROCm 10.0.0 release notes.


3. Verify Installation

3.1 PyTorch Check (Windows / Linux)

bash
python -c "import torch; print('PyTorch:', torch.__version__); print('ROCm available:', torch.cuda.is_available()); print('Device:', torch.cuda.get_device_name(0) if torch.cuda.is_available() else 'N/A')"

Expected output:

PyTorch: 2.13.0+rocm10.0.0
ROCm available: True
Device: AMD Radeon Graphics

💡 ROCm uses HIP to provide CUDA API compatibility, so torch.cuda.is_available() returning True is expected behavior.

3.2 Simple Computation Test

python
import torch
x = torch.randn(3, 3, device='cuda')
y = torch.randn(3, 3, device='cuda')
print(x @ y)

3.3 Linux-only Tools

bash
rocminfo | grep -E "Name:|Marketing Name:"
amd-smi monitor   # ROCm SMI was removed in 7.14.0 — use amd-smi
hipinfo           # available with pip installation

3.4 Troubleshooting

SymptomCauseSolution
torch.cuda.is_available() = FalseDriver version mismatchWindows: confirm Adrenalin 26.8.1; Linux: confirm inbox / OEM kernel (Ryzen APUs need linux-oem-24.04c)
No GPU detected (Linux)Not in render/video groupsudo usermod -a -G render,video $LOGNAME + reboot
DLL load error (Windows)SAC/WDAG not disabledSee Section 1.3

4. Uninstall ROCm

Windows

Simply delete the .venv folder (via File Explorer, or in CMD):

cmd
rmdir /s /q .venv

To uninstall Adrenalin driver: Control Panel → Programs → Uninstall a program → AMD Software

Ubuntu

bash
rm -rf .venv

5. Switching GPU Architectures

Since 10.0.0, wheels are served from https://stable.repo.amd.com/rocm/whl-next/, and you still select the architecture via the [device-gfxXXXX] extra. Replace the architecture tag in the install command:

GPU ExampleLLVM Targetdevice extras tag
MI355X / MI350X / MI350Pgfx950device-gfx950
MI300X / MI325Xgfx942device-gfx942
RX 9070 XT / 9070 GRE / AI PRO R9700Sgfx1201device-gfx1201
RX 9060 XT / 9060 XT LP / 9060 / RX 9050 (new in 10.0.0)gfx1200device-gfx1200
RX 7900 XTX / PRO W7900gfx1100device-gfx1100
Radeon PRO W6800 / V620gfx1030device-gfx1030
Ryzen AI Max 395gfx1151device-gfx1151
Ryzen AI PRO 400 / AI 9 HX 475gfx1150device-gfx1150
Ryzen AI 200 PRO / AI 7 350gfx1152device-gfx1152
Ryzen AI 7 445 / AI 5 435gfx1153device-gfx1153
All architecturesdevice-all

For example, to switch to gfx942 (MI300X):

bash
uv pip install --index-url https://stable.repo.amd.com/rocm/whl-next/ "torch[device-gfx942]==2.13.0+rocm10.0.0" "torchvision[device-gfx942]==0.28.0+rocm10.0.0" "torchaudio==2.11.0.2+rocm10.0.0"

💡 For the apt path, add the stable.repo.amd.com repo from Section 2.5, then use the meta-package name shown on the official install page.

Full reference: GPU Architecture Table


📖 Official documentation: