Unified environment baseline · ROCm 7.12.0 · Prerequisite for all subsequent chapters
Introduction
This chapter serves as the environment baseline for the entire hello-rocm project. It targets ROCm 7.12.0 (Technology Preview, released 2026-03-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.
💡 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.
⚠️ ROCm 7.12.0 is a Technology Preview release — not suitable for production. For production use, see ROCm 7.2 production stream.
⚠️ 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
| Item | Requirement | Download |
|---|---|---|
| ROCm | 7.12.0 (Technology Preview) | Official install page |
| PyTorch | 2.10.0 / 2.9.1 | Via uv (see below) |
| Python | 3.11 / 3.12 / 3.13 | Managed by uv |
| Windows Version | 11 25H2 | — |
| Adrenalin Driver (Windows) | 26.3.1 | ⬇️ Download Adrenalin 26.3.1 |
| Visual Studio 2022 (Windows) | Community, select "Desktop development with C++" | ⬇️ Download VS 2022 |
| Ubuntu | 24.04.3 (HWE kernel 6.14 for Ryzen APU) | Ubuntu Downloads |
Table of Contents
- GPU Architecture Reference Table (separate file)
- 1. Windows Installation
- 2. Ubuntu Installation
- 3. Verify Installation
- 4. Uninstall ROCm
- 5. Switching GPU Architectures
1. Windows 11 Installation
Example: Ryzen AI Max+ 395 (gfx1151)
📖 Official docs: Install ROCm on Windows | Install PyTorch
1.1 Prerequisites Check
| ✅ Check | Requirement |
|---|---|
| Windows Version | Must be Windows 11 25H2 (Settings → System → About) |
| Adrenalin Driver | Must be 26.3.1 (⬇️ Download) |
| Visual Studio 2022 (Optional) | Community edition, select "Desktop development with C++" (⬇️ Download). Required for AMD Quark or custom op compilation |

1.2 Remove Conflicting Software
- Control Panel → Programs → Uninstall a program → Remove all HIP SDK entries
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.
# 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
# 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 ROCm runtime + libraries (gfx1151 = Ryzen AI Max+ 395/390/385)
uv pip install --index-url https://repo.amd.com/rocm/whl/gfx1151/ "rocm[libraries,devel]"
# Install PyTorch
uv pip install --index-url https://repo.amd.com/rocm/whl/gfx1151/ torch torchvision torchaudio
# Install other project dependencies (if requirements.txt exists)
uv pip install -r requirements.txt⚠️ Do NOT copy ROCm DLLs to System32 — this causes conflicts.
💡 The
gfx1151above corresponds to Ryzen AI Max series (395/390/385). For other GPUs, replace--index-url:
Your GPU Replace with Ryzen AI PRO 400 series (AI 9 HX PRO 475 etc.) https://repo.amd.com/rocm/whl/gfx1150/Radeon RX 9070 XT / 9060 XT https://repo.amd.com/rocm/whl/gfx120X-all/Radeon RX 7900 XTX / 7800 XT https://repo.amd.com/rocm/whl/gfx110X-all/Instinct MI300X / MI325X https://repo.amd.com/rocm/whl/gfx94X-dcgpu/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
sudo apt install -y libatomic1 libquadmath0
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# Verify
uv --version2.2 Install ROCm + PyTorch (uv, recommended)
# Install Python 3.12
uv python install 3.12
# Create virtual environment
uv venv --python 3.12
source .venv/bin/activate
# Install ROCm (gfx1151 = Ryzen AI Max+ 395/390/385)
uv pip install --index-url https://repo.amd.com/rocm/whl/gfx1151/ "rocm[libraries,devel]"
# Install PyTorch
uv pip install --index-url https://repo.amd.com/rocm/whl/gfx1151/ torch torchvision torchaudio
# Install other project dependencies (if requirements.txt exists)
uv pip install -r requirements.txt💡 For other GPUs, replace
--index-url— see Section 1.5 or GPU Architecture Table.
2.3 Alternative: One-Click Install Script
For a fully automated installation (kernel, driver, ROCm), use the project's install script:
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.
sudo usermod -a -G render,video "$LOGNAME"
# Log out and back in, or reboot3. Verify Installation
3.1 PyTorch Check (Windows / Linux)
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.10.0+rocm7.12.0
ROCm available: True
Device: AMD Radeon Graphics💡 ROCm uses HIP to provide CUDA API compatibility, so
torch.cuda.is_available()returningTrueis expected behavior.
3.2 Simple Computation Test
import torch
x = torch.randn(3, 3, device='cuda')
y = torch.randn(3, 3, device='cuda')
print(x @ y)3.3 Linux-only Tools
rocminfo | grep -E "Name:|Marketing Name:"
rocm-smi # or: amd-smi monitor
hipinfo # available with pip installation3.4 Troubleshooting
| Symptom | Cause | Solution |
|---|---|---|
torch.cuda.is_available() = False | Driver version mismatch | Windows: confirm Adrenalin 26.3.1; Linux: confirm inbox kernel |
No GPU detected (Linux) | Not in render/video group | sudo usermod -a -G render,video $LOGNAME + reboot |
| DLL load error (Windows) | SAC/WDAG not disabled | See Section 1.3 |
4. Uninstall ROCm
Windows
Simply delete the .venv folder (via File Explorer, or in CMD):
rmdir /s /q .venvTo uninstall Adrenalin driver: Control Panel → Programs → Uninstall a program → AMD Software
Ubuntu
rm -rf .venv5. Switching GPU Architectures
Simply replace the --index-url or apt package name with the corresponding value:
| GPU Example | LLVM Target | pip index URL |
|---|---|---|
| MI355X / MI350X | gfx950 | https://repo.amd.com/rocm/whl/gfx950-dcgpu/ |
| MI300X / MI325X | gfx942 | https://repo.amd.com/rocm/whl/gfx94X-dcgpu/ |
| RX 9070 XT | gfx1201 | https://repo.amd.com/rocm/whl/gfx120X-all/ |
| RX 7900 XTX | gfx1100 | https://repo.amd.com/rocm/whl/gfx110X-all/ |
| Ryzen AI Max 395 | gfx1151 | https://repo.amd.com/rocm/whl/gfx1151/ |
| Ryzen AI PRO 400 | gfx1150 | https://repo.amd.com/rocm/whl/gfx1150/ |
Full reference: GPU Architecture Table
📖 Official documentation: