Skip to content

How-ToGPU

How to Install PyTorch With ROCm on Windows for AMD Radeon GPUs

How to install PyTorch with AMD ROCm 10.2.0 on Windows 11 for Radeon RX 9000, RX 7000, Radeon AI Pro and Ryzen AI chips: driver, Python environment, AMD's pip command and checking it sees your GPU.

By , Systems & Technical Editor

5 min read

How to Install PyTorch With ROCm on Windows for AMD Radeon GPUs

PyTorch is the framework behind a huge number of local AI tools, from image generators to speech recognition and fine-tuning scripts. On NVIDIA cards it runs through CUDA. On AMD Radeon graphics cards and Ryzen AI processors, it can now run natively on Windows through AMD's ROCm software, with no Linux or WSL2 needed.

This guide walks through AMD's official pip installation method for PyTorch with ROCm 10.2.0 on Windows 11. AMD updates these pages often, so check the version numbers on AMD's install page before you start.

What you need

According to AMD's ROCm 10.2.0 documentation, you need:

  • Windows 11 25H2. This is the Windows version AMD's compatibility matrix lists for ROCm 10.2.0.

  • A supported AMD GPU or processor. See the table below.

  • AMD Software: Adrenalin Edition. AMD's compatibility matrix lists driver version 26.11.2 for ROCm 10.2.0. We covered that driver in AMD Adrenalin 26.11.2 adds ROCm 10.2 support.

  • Python 3.11, 3.12, 3.13 or 3.14, installed and accessible from the command line.

Check your GPU is supported

AMD's PyTorch install page sorts supported hardware by LLVM target, a code such as gfx1201 that you'll need when installing. These are the main Radeon and Ryzen chips it lists:

LLVM target

Examples AMD lists

gfx1201

Radeon RX 9070 XT, RX 9070 GRE, RX 9070, Radeon AI Pro R9700

gfx1200

Radeon RX 9060 XT, RX 9060, RX 9050

gfx1100

Radeon RX 7900 XTX, RX 7900 XT, RX 7900 GRE, Radeon Pro W7900, W7800

gfx1101

Radeon RX 7800 XT, RX 7700 XT, RX 7700, Radeon Pro W7700

gfx1102

Radeon RX 7600

gfx1151

Ryzen AI Max+ 395 and other Ryzen AI Max chips (Radeon 8060S, 8050S, 8040S)

gfx1150

Ryzen AI 9 HX 370, HX 470 and other chips with Radeon 890M or 880M graphics

gfx1152 / gfx1153

Ryzen AI 7 and Ryzen AI 5 chips with Radeon 860M, 840M or 820M graphics

gfx1103

Ryzen chips with Radeon 780M or 740M graphics, such as the Ryzen 7 260

AMD's page lists more models than this, so check it for your exact chip. If your card isn't listed, such as an older Radeon RX 6000-series gaming card, this method isn't officially supported. Our guide to running local AI on an AMD Radeon GPU covers other options, and CUDA vs ROCm vs Vulkan explains the differences.

Step 1: Update your graphics driver

Install the AMD Software: Adrenalin Edition version listed in AMD's ROCm compatibility matrix for the ROCm release you're installing (26.11.2 for ROCm 10.2.0). Restart the PC after installing.

Step 2: Create a Python virtual environment

A virtual environment keeps PyTorch and its dependencies separate from anything else on your PC. Open Command Prompt or PowerShell in the folder you want to work in, then run the commands for your Python version. AMD's example for Python 3.12 is:

py -3.12 -m venv .venv
.venv\Scripts\activate

Swap 3.12 for 3.11, 3.13 or 3.14 if that's the version you have installed. Your prompt should now start with (.venv).

Step 3: Install PyTorch for ROCm

AMD's Windows command installs PyTorch, torchvision and torchaudio from AMD's own package index. For PyTorch 2.15.0, the command that supports every listed GPU is:

python -m pip install --index-url https://stable.repo.amd.com/rocm/whl-next/ "torch[device-all]==2.15.0+rocm10.2.0" "torchvision[device-all]==0.29.2+rocm10.2.0" "torchaudio==2.11.1+rocm10.2.0"

AMD also lists a version for each GPU target. You replace device-all with device- followed by your LLVM target from the table above. For a Radeon RX 9070 XT or Radeon AI Pro R9700 (gfx1201), that's:

python -m pip install --index-url https://stable.repo.amd.com/rocm/whl-next/ "torch[device-gfx1201]==2.15.0+rocm10.2.0" "torchvision[device-gfx1201]==0.29.2+rocm10.2.0" "torchaudio==2.11.1+rocm10.2.0"

AMD's documentation also lists PyTorch 2.14.0 and 2.13.0 builds for ROCm 10.2.0 if a tool you use needs an older version. Check the tool's own requirements first.

Step 4: Check PyTorch can see your GPU

With the virtual environment still active, run AMD's verification command:

python -c "import torch; print('PyTorch:', torch.__version__); print('HIP available:', torch.cuda.is_available()); print('HIP version:', torch.version.hip); print('Devices:', [torch.cuda.get_device_name(i) for i in range(torch.cuda.device_count())])"

AMD says you should see output similar to this, with at least one GPU listed:

PyTorch: 2.15.0+rocm10.2.0
HIP available: True
Devices: ['<AMD GPU name>']

The torch.cuda name is not a mistake: AMD's own check uses PyTorch's torch.cuda functions, which ROCm builds of PyTorch use for AMD GPUs too. If HIP available says False, check your driver version and that you installed the right device- package for your GPU.

To see how much video memory your models use once they're running, see how to check VRAM usage on Windows.

Known issues AMD lists

AMD's PyTorch documentation lists two known issues relevant to Radeon owners:

  • Training crashes on RX 9070 series and Radeon AI Pro R9700 cards. AMD says training and fine-tuning with Llama-Factory or Unsloth "might experience GPU resets or application crashes" on some Radeon cards, such as the RX 9070 series and Radeon AI Pro R9700. Its workaround is to set the TORCH_BLAS_PREFER_HIPBLASLT environment variable to 0, which it warns "might result in performance degradation".

  • Slower LLM inference on older PyTorch versions. AMD says some large language model inference workloads may be slower than expected on Radeon RX 7900 series cards, the RX 7800 XT and Ryzen AI Max processors with PyTorch versions earlier than 2.14. Setting TORCH_BLAS_PREFER_HIPBLASLT to 1 is the workaround, and AMD says this becomes the default in PyTorch 2.14.

In a Command Prompt session, you can set the variable for the current window with set TORCH_BLAS_PREFER_HIPBLASLT=0. Our guide to setting environment variables on Windows shows how to make a variable permanent.

Do you need this?

Not always. Apps such as Ollama, LM Studio and llama.cpp don't run on PyTorch, so you don't need to install it just to chat with a local model. You need PyTorch with ROCm when a tool or script you want to use is built on PyTorch, such as many image generation, speech and fine-tuning projects. If you have an NVIDIA card instead, follow our guide to installing PyTorch with CUDA on Windows. If you'd rather use Linux, see how to install ROCm on Ubuntu.

Our verdict

Installing PyTorch with ROCm on Windows is now a four-step job on a supported AMD GPU: update to the Adrenalin driver AMD lists (26.11.2 for ROCm 10.2.0), create a Python 3.11 to 3.14 virtual environment, install AMD's torch, torchvision and torchaudio packages for your GPU's gfx target from AMD's package index, then check torch.cuda.is_available() returns True. It works on Radeon RX 9000 and RX 7000 cards, the Radeon AI Pro R9700 and many Ryzen AI processors, but not older RX 6000 gaming cards. Watch AMD's known issues if you fine-tune models on an RX 9070 or R9700. We haven't tested these steps ourselves.

The bottom line

Installing PyTorch with ROCm on Windows is now a four-step job on a supported AMD GPU: update to the Adrenalin driver AMD lists (26.11.2 for ROCm 10.2.0), create a Python 3.11 to 3.14 virtual environment, install AMD's torch, torchvision and torchaudio packages for your GPU's gfx target from AMD's package index, then check torch.cuda.is_available() returns True. It works on Radeon RX 9000 and RX 7000 cards, the Radeon AI Pro R9700 and many Ryzen AI processors, but not older RX 6000 gaming cards. Watch AMD's known issues if you fine-tune models on an RX 9070 or R9700. We haven't tested these steps ourselves.

Sources

  1. 01AMD ROCm documentation, Install PyTorch for ROCm
  2. 02AMD ROCm documentation, ROCm 10.2.0 compatibility matrix

About the author

Marcus Thorne

Systems & Technical Editor

Marcus writes Forge PC's step-by-step build, troubleshooting and system optimisation guides. His background spans Windows kernel and power-state diagnostics, UEFI/BIOS configuration, NVMe storage arrays, ATX 3.1 power delivery and running local AI and LLM workloads on consumer graphics cards.

More from Marcus Thorne

Read next

How to Fix the PAGE_FAULT_IN_NONPAGED_AREA Blue Screen in Windows 11

How-To

How to Fix the PAGE_FAULT_IN_NONPAGED_AREA Blue Screen in Windows 11

PAGE_FAULT_IN_NONPAGED_AREA (bug check 0x50) means Windows referenced invalid memory. Microsoft says a faulty driver or service, antivirus software, a corrupted drive or bad RAM is usually to blame. Work through Event Viewer, drivers, antivirus, chkdsk, a RAM test and crash dumps to fix it.

Marcus Thorne5 min

The Best Free Live Streaming Software for PC in 2026

Best Picks

The Best Free Live Streaming Software for PC in 2026

The best free live-streaming software for PC in 2026. OBS Studio is our top pick, Meld Studio is the best for built-in multistreaming, Streamlabs Desktop is easiest for beginners and XSplit Broadcaster's free tier suits simple 720p streams. We compare limits, platforms and GPU encoders.

Hannah Vance5 min