🌐
AMD ROCm
rocm.docs.amd.com β€Ί projects β€Ί install-on-linux β€Ί en β€Ί latest β€Ί install β€Ί 3rd-party β€Ί pytorch-install.html
PyTorch on ROCm installation β€” ROCm installation (Linux)
This topic covers setup instructions and the necessary files to build, test, and run PyTorch with ROCm support in a Docker environment. To learn more about PyTorch on ROCm, including its use cases, recommendations, as well as hardware and software compatibility, see PyTorch compatibility. To install PyTorch for ROCm, you have the following options:
🌐
PyTorch
pytorch.org β€Ί blog β€Ί pytorch-for-amd-rocm-platform-now-available-as-python-package
PyTorch for AMD ROCmβ„’ Platform now available as Python package – PyTorch
March 24, 2021 - The ROCm ecosystem has an established history of support for PyTorch, which was initially implemented as a fork of the PyTorch project, and more recently through ROCm support in the upstream PyTorch code. PyTorch users can install PyTorch for ROCm using AMD’s public PyTorch docker image, and can of course build PyTorch for ROCm from source.
Discussions

ROCm 6.1.3 complete install instructions from WSL to pytorch
Thank you so much for this, I was trying to get pytorch installed in WSL the other day and was pulling my hair out! More on reddit.com
🌐 r/ROCm
51
45
August 10, 2024
Complete ROCm 7.0 + PyTorch 2.8.0 Installation Guide for RX 6900 XT (gfx1030) on Ubuntu 24.04.2
Updated Links for y'all: pip install https://repo.radeon.com/rocm/manylinux/rocm-rel-7.0/pytorch_triton_rocm-3.4.0%2Brocm7.0.0.gitf9e5bf54-cp312-cp312-linux_x86_64.whl pip install https://repo.radeon.com/rocm/manylinux/rocm-rel-7.0/torch-2.8.0%2Brocm7.0.0.lw.git64359f59-cp312-cp312-linux_x86_64.whl pip install https://repo.radeon.com/rocm/manylinux/rocm-rel-7.0/torchvision-0.24.0%2Brocm7.0.0.gitf52c4f1a-cp312-cp312-linux_x86_64.whl pip install https://repo.radeon.com/rocm/manylinux/rocm-rel-7.0/torchaudio-2.8.0%2Brocm7.0.0.git6e1c7fe9-cp312-cp312-linux_x86_64.whl More on reddit.com
🌐 r/comfyui
16
10
September 17, 2025
ROCm and PyTorch on AMD APU or GPU (AI) - Tutorials - Linux Containers Forum
AMD ROCm is officially supported only on a few consumer-grade GPUs, mainly Radeon RX 7900 GRE and above. But ROCm consists of many things: compilers, runtime libraries, Ai-related libraries, etc. Often we just need a subset of this for our purposes. Fortunately, we don’t even need the DKMS ... More on discuss.linuxcontainers.org
🌐 discuss.linuxcontainers.org
7
April 19, 2024
machine learning - Installing Pytorch for Windows 11 and AMD GPU - Stack Overflow
could someone help me out with my Pytorch installation? My device currently uses Windows OS and an AMD GPU. However, the Pytorch installation does not support Windows OS with ROCm combination. Only... More on stackoverflow.com
🌐 stackoverflow.com
🌐
Reddit
reddit.com β€Ί r/rocm β€Ί rocm 6.1.3 complete install instructions from wsl to pytorch
r/ROCm on Reddit: ROCm 6.1.3 complete install instructions from WSL to pytorch
August 10, 2024 -

Its a bit tricky, but I got it working for me with my RX 7900XTX on Windows 11. They said native Windows support for ROCm is coming, but my guess is that it will be another year or two until it will be released, so currently only WSL with ubuntu on windows.

The problem is the documentation has gotten better but for someone who doesnΒ΄t want to spend hours on it, here is my stuff which works.

So the documentation sites I got all of it from are those:

rocm.docs.amd.com/en/latest/

rocm.docs.amd.com/projects/radeon/en/latest/index.html

rocm.docs.amd.com/projects/radeon/en/latest/docs/install/wsl/howto_wsl.html

rocm.docs.amd.com/projects/radeon/en/latest/docs/install/wsl/install-radeon.html

rocm.docs.amd.com/projects/radeon/en/latest/docs/install/wsl/install-pytorch.html

But as a short instruction here is the installation instructions from start to finish.

First install WSL and the currently only supported distribution of linux for WSL with ROCm which is 22.04 using cmd in admin mode, you will need to setup a username and password for the distribution once its installed.

wsl --install -d Ubuntu-22.04

then after install do this inside the distribution in which you can get to in cmd using command:

wsl

then to just update the install of ubuntu to the newest version for its components do those two commands:

sudo apt-get update

sudo apt-get upgrade

then to install the drivers and install rocm do this:

sudo apt update

wget https://repo.radeon.com/amdgpu-install/6.1.3/ubuntu/jammy/amdgpu-install_6.1.60103-1_all.deb

sudo apt install ./amdgpu-install_6.1.60103-1_all.deb

amdgpu-install -y --usecase=wsl,rocm --no-dkms

And then you have the base of rocm and the driver installed, then you need to install python and pytorch. Notice the only supported version is Python 3.10 with pytorch 2.1.2 as of my knowledge.

To install python with pytorch follow those instructions, as of my last use it will automatically install python 3.10:

sudo apt install python3-pip -y

pip3 install --upgrade pip wheel

wget https://repo.radeon.com/rocm/manylinux/rocm-rel-6.1.3/torch-2.1.2%2Brocm6.1.3-cp310-cp310-linux_x86_64.whl

wget https://repo.radeon.com/rocm/manylinux/rocm-rel-6.1.3/torchvision-0.16.1%2Brocm6.1.3-cp310-cp310-linux_x86_64.whl

wget https://repo.radeon.com/rocm/manylinux/rocm-rel-6.1.3/pytorch_triton_rocm-2.1.0%2Brocm6.1.3.4d510c3a44-cp310-cp310-linux_x86_64.whl

pip3 uninstall torch torchvision pytorch-triton-rocm numpy

pip3 install torch-2.1.2+rocm6.1.3-cp310-cp310-linux_x86_64.whl torchvision-0.16.1+rocm6.1.3-cp310-cp310-linux_x86_64.whl pytorch_triton_rocm-2.1.0+rocm6.1.3.4d510c3a44-cp310-cp310-linux_x86_64.whl numpy==1.26.4

The next is just updating to the WSL compatible runtime lib:

location=`pip show torch | grep Location | awk -F ": " '{print $2}'`

cd ${location}/torch/lib/

rm libhsa-runtime64.so*

cp /opt/rocm/lib/libhsa-runtime64.so.1.2 libhsa-runtime64.so

Then everything should be setup and running. To check if it worked use those commands in WSL:

python3 -c 'import torch; print(torch.cuda.is_available())'

python3 -c "import torch; print(f'device name [0]:', torch.cuda.get_device_name(0))"

python3 -m torch.utils.collect_env

Hope those instructions help other lost souls who are trying to get ROCm working and escape the Nvidia monopoly but unfortunately I have also an Nvidia RTX 2080ti and my RX 7900XTX can do larger batches in training, but is like a third slower than the older Nvidia card, but in Inference I see similar speeds.
Maybe someone has some optimization ideas to get it up to speed?

The support matrix for the supported GPUs and Ubuntu versions are here:

https://rocm.docs.amd.com/projects/radeon/en/latest/docs/compatibility/wsl/wsl_compatibility.html

If anything went wrong I can test it again. Hope also the links to the specific documentation sites are helpful if anything slightly changes from my installation instructions.

Small endnote, it took me months and hours of frustration to get this instructions working for myself, hope I spared you from that with this. And I noticed that if I only used another version of pytorch than the one above it will not work, even if they say pytorch in the nightly build with version 2.5.0 is supported, believe me I tried and it did not work.

🌐
Docker Hub
hub.docker.com β€Ί r β€Ί rocm β€Ί pytorch
rocm/pytorch - Docker Image
This repo hosts the docker images for PyTorch releases with ROCm backend support. ... To configure docker environment for ROCm, please refer to the following installation guide: https://github.com/RadeonOpenCompute/ROCm-docker/blob/master/quick-start.md⁠
🌐
GitHub
gist.github.com β€Ί jurgonaut β€Ί 462a6bd9b87ed085fa0fe6c893536993
Install AMD GPU ROCm and PyTorch on Ubuntu Β· GitHub
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/rocm<version>
🌐
AMD ROCm
rocm.docs.amd.com β€Ί projects β€Ί radeon-ryzen β€Ί en β€Ί latest β€Ί docs β€Ί install β€Ί installrad β€Ί native_linux β€Ί install-pytorch.html
Install PyTorch for ROCm β€” Use ROCm on Radeon and Ryzen
Check Pytorch.org for latest PIP install instructions and availability. See Compatibility matrices for support information. Note To install the following wheels, Python 3.12 must be set up. Enter the following command to unpack and begin set up. ... Enter this command to update the pip wheel. ... Select the applicable Ubuntu version and enter the commands to install Torch and Torchvision for ROCm AMD GPU support.
🌐
AMD ROCm
rocm.docs.amd.com β€Ί projects β€Ί install-on-linux β€Ί en β€Ί docs-6.0.0 β€Ί how-to β€Ί 3rd-party β€Ί pytorch-install.html
Installing PyTorch for ROCm β€” ROCm installation (Linux)
... Download a base Docker image ... --device=/dev/kfd --device=/dev/dri --group-add video rocm/dev-ubuntu-20.04:latest ... Install ROCm using the directions in the ROCm installation options section....
Find elsewhere
🌐
Reddit
reddit.com β€Ί r/comfyui β€Ί complete rocm 7.0 + pytorch 2.8.0 installation guide for rx 6900 xt (gfx1030) on ubuntu 24.04.2
r/comfyui on Reddit: Complete ROCm 7.0 + PyTorch 2.8.0 Installation Guide for RX 6900 XT (gfx1030) on Ubuntu 24.04.2
September 17, 2025 -

After extensive testing, I've successfully installed ROCm 7.0 with PyTorch 2.8.0 for AMD RX 6900 XT (gfx1030 architecture) on Ubuntu 24.04.2. The setup runs ComfyUI's Wan2.2 image-to-video workflow flawlessly at 640Γ—640 resolution with 81 frames. Here's my verified installation procedure:

πŸš€ Prerequisites

  • Fresh Ubuntu 24.04.2 LTS installation

  • AMD RX 6000 series GPU (gfx1030 architecture)

  • Internet connection for package downloads

πŸ“‹ Installation Steps

1. System Preparation

sudo apt install environment-modules

2. User Group Configuration

Why: Required for GPU access permissions

# Check current groups
groups

# Add current user to required groups
sudo usermod -a -G video,render $LOGNAME

# Optional: Add future users automatically
echo 'ADD_EXTRA_GROUPS=1' | sudo tee -a /etc/adduser.conf
echo 'EXTRA_GROUPS=video' | sudo tee -a /etc/adduser.conf
echo 'EXTRA_GROUPS=render' | sudo tee -a /etc/adduser.conf

3. Install ROCm 7.0 Packages

sudo apt update
wget https://repo.radeon.com/amdgpu/7.0/ubuntu/pool/main/a/amdgpu-insecure-instinct-udev-rules/amdgpu-insecure-instinct-udev-rules_30.10.0.0-2204008.24.04_all.deb
sudo apt install ./amdgpu-insecure-instinct-udev-rules_30.10.0.0-2204008.24.04_all.deb

wget https://repo.radeon.com/amdgpu-install/7.0/ubuntu/noble/amdgpu-install_7.0.70000-1_all.deb
sudo apt install ./amdgpu-install_7.0.70000-1_all.deb
sudo apt update
sudo apt install python3-setuptools python3-wheel
sudo apt install rocm

4. Kernel Modules and Drivers

sudo apt install "linux-headers-$(uname -r)" "linux-modules-extra-$(uname -r)"
sudo apt install amdgpu-dkms

5. Environment Configuration

# Configure ROCm shared objects
sudo tee --append /etc/ld.so.conf.d/rocm.conf <<EOF
/opt/rocm/lib
/opt/rocm/lib64
EOF
sudo ldconfig

# Set library path (crucial for multi-version installs)
export LD_LIBRARY_PATH=/opt/rocm-7.0.0/lib

# Install OpenCL runtime
sudo apt install rocm-opencl-runtime

6. Verification

# Check ROCm installation
rocminfo
clinfo

7. Python Environment Setup

sudo apt install python3.12-venv
python3 -m venv comfyui-pytorch
source ./comfyui-pytorch/bin/activate

8. PyTorch Installation with ROCm 7.0 Support

pip install https://repo.radeon.com/rocm/manylinux/rocm-rel-7.0/pytorch_triton_rocm-3.4.0%2Brocm7.0.0.gitf9e5bf54-cp312-cp312
pip install https://repo.radeon.com/rocm/manylinux/rocm-rel-7.0/torch-2.8.0%2Brocm7.0.0.lw.git64359f59-cp312-cp312-linux_x86_64.whl
pip install https://repo.radeon.com/rocm/manylinux/rocm-rel-7.0/torchvision-0.24.0%2Brocm7.0.0.gitf52c4f1a-cp312-cp312-linux_x86_64.whl
pip install https://repo.radeon.com/rocm/manylinux/rocm-rel-7.0/torchaudio-2.8.0%2Brocm7.0.0.git6e1c7fe9-cp312-cp312-linux_x86_64.whl

9. ComfyUI Installation

git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI
pip install -r requirements.txt

βœ… Verified Package Versions

ROCm Components:

  • ROCm 7.0.0

  • amdgpu-dkms: latest

  • rocm-opencl-runtime: 7.0.0

PyTorch Stack:

  • pytorch-triton-rocm: 3.4.0+rocm7.0.0.gitf9e5bf54

  • torch: 2.8.0+rocm7.0.0.lw.git64359f59

  • torchvision: 0.24.0+rocm7.0.0.gitf52c4f1a

  • torchaudio: 2.8.0+rocm7.0.0.git6e1c7fe9

Python Environment:

  • Python 3.12.3

  • All ComfyUI dependencies successfully installed

🎯 Performance Notes

  • Tested Workflow: Wan2.2 image-to-video

  • Resolution: 640Γ—640 pixels

  • Frames: 81

  • GPU: RX 6900 XT (gfx1030)

  • Status: Stable and fully functional

πŸ’‘ Pro Tips

  1. Reboot after group changes to ensure permissions take effect

  2. Always source your virtual environment before running ComfyUI

  3. Check rocminfo output to confirm GPU detection

  4. The LD_LIBRARY_PATH export is essential - add it to your .bashrc for persistence

This setup has been thoroughly tested and provides a solid foundation for AMD GPU AI workflows on Ubuntu 24.04. Happy generating!Complete ROCm 7.0 + PyTorch 2.8.0 Installation Guide for RX 6900 XT (gfx1030) on Ubuntu 24.04.2After
extensive testing, I've successfully installed ROCm 7.0 with PyTorch
2.8.0 for AMD RX 6900 XT (gfx1030 architecture) on Ubuntu 24.04.2. The
setup runs ComfyUI's Wan2.2 image-to-video workflow flawlessly at
640Γ—640 resolution with 81 frames. Here's my verified installation
procedure:πŸš€ PrerequisitesFresh Ubuntu 24.04.2 LTS installation

AMD RX 6000 series GPU (gfx1030 architecture)

This setup has been thoroughly tested and provides a solid foundation for AMD GPU AI workflows on Ubuntu 24.04. Happy generating!

During the generation my system stays fully operational, very responsive and i can continue

-----------------------------

I have a very small PSU, so i set the PwrCap to use max 231 Watt:
rocm-smi

=========================================== ROCm System Management Interface ===========================================

===================================================== Concise Info =====================================================

Device Node IDs Temp Power Partitions SCLK MCLK Fan Perf PwrCap VRAM% GPU%

(DID, GUID) (Edge) (Avg) (Mem, Compute, ID)

========================================================================================================================

0 1 0x73bf, 29880 56.0Β°C 158.0W N/A, N/A, 0 2545Mhz 456Mhz 36.47% auto 231.0W 71% 99%

========================================================================================================================

================================================= End of ROCm SMI Log ==================================================

-----------------------------

got prompt

Using split attention in VAE

Using split attention in VAE

VAE load device: cuda:0, offload device: cpu, dtype: torch.float16

Using scaled fp8: fp8 matrix mult: False, scale input: False

Requested to load WanTEModel

loaded completely 9.5367431640625e+25 6419.477203369141 True

CLIP/text encoder model load device: cuda:0, offload device: cpu, current: cuda:0, dtype: torch.float16

Requested to load WanVAE

loaded completely 10762.5 242.02829551696777 True

Using scaled fp8: fp8 matrix mult: False, scale input: True

model weight dtype torch.float16, manual cast: None

model_type FLOW

Requested to load WAN21

0 models unloaded.

loaded partially 6339.999804687501 6332.647415161133 291

100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 2/2 [07:01<00:00, 210.77s/it]

Using scaled fp8: fp8 matrix mult: False, scale input: True

model weight dtype torch.float16, manual cast: None

model_type FLOW

Requested to load WAN21

0 models unloaded.

loaded partially 6339.999804687501 6332.647415161133 291

100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 2/2 [06:58<00:00, 209.20s/it]

Requested to load WanVAE

loaded completely 9949.25 242.02829551696777 True

Prompt executed in 00:36:38 on only 231 Watt!

I am happy after trying every possible solution i could find last year and reinstalling my system countless times! Roc7.0 and Pytorch 2.8.0 is working great for gfx1030

executed in 00:36:38 on only 231 Watt!

I am happy after trying every possible solution i could find last year and reinstalling my system countless times! Roc7.0 and Pytorch 2.8.0 is working great for gfx1030

🌐
AMD ROCm
rocm.docs.amd.com β€Ί projects β€Ί radeon-ryzen β€Ί en β€Ί latest β€Ί index.html
Use ROCm on Radeon and Ryzen β€” Use ROCm on Radeon and Ryzen
Quickly see what’s supported on your system. ROCmβ„’ 7.2.1 focuses on bringing PyTorch support to new platforms while maintaining robust support on our established Linux platform for Radeon GPUs.
🌐
wasdtech
wasdtech.altervista.org β€Ί home β€Ί install pytorch for amd hip rocm on linux
Install PyTorch for AMD HIP ROCm on Linux - Guide
November 5, 2025 - Install PyTorch for AMD HIP ROCm on Linux - Guide - Learn how to install pytorch for an AMD GPU on Linux powered by HIP/ROCm software.
🌐
Linux Containers Forum
discuss.linuxcontainers.org β€Ί tutorials
ROCm and PyTorch on AMD APU or GPU (AI) - Tutorials - Linux Containers Forum
April 19, 2024 - AMD ROCm is officially supported only on a few consumer-grade GPUs, mainly Radeon RX 7900 GRE and above. But ROCm consists of many things: compilers, runtime libraries, Ai-related libraries, etc. Often we just need a subset of this for our purposes. Fortunately, we don’t even need the DKMS module to use LLMs, which means we can install ROCm in a container and run any model using llama.cpp or Ollama on almost any AMD GPU, including APUs.
🌐
Phazertech
phazertech.com β€Ί tutorials β€Ί rocm.html
AMD ROCm, PyTorch, Stable Diffusion & YOLO Installation ...
March 13, 2024 - This guide covers how to install ROCm which is AMD’s answer to Nvidia’s CUDA, giving AMD GPUs the ability to run AI and machine learning models. I'll be doing this on an RX 6700 XT GPU, but these steps should work for all RDNA GPUs. GPUs from other generations will likely need to follow different steps, see this Reddit thread for more info on older cards: Reddit: HOW-TO: Stable Diffusion on an AMD GPU. This guide also shows how to install PyTorch which is a framework for machine learning tools in Python, and then I'll show how to install and run Stable Diffusion and YOLO object detection.
🌐
Framework Community
community.frame.work β€Ί framework laptop 16
AMD ROCm for local training and inferencing - Framework Laptop 16 - Framework Community
September 29, 2024 - Hello everyone! Did anybody try to install AMD ROCm on the FW16 and train/run local small models? I’m planning to use Ubuntu and run ROCm+PyTorch to get started with my Uni projects. Any advice?
🌐
Medium
medium.vaningelgem.be β€Ί installing-pytorch-rocm-on-ubuntu-mantic-23-10-3da0f84c65d9
Installing pytorch-rocm on Ubuntu mantic (23.10) | by Steven Van Ingelgem | Medium
March 11, 2024 - mamba create -n rocm python=3.9 mamba activate rocm pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm5.7
🌐
Hacker News
news.ycombinator.com β€Ί item
I was able to use ROCm recently with Pytorch and after pulling some hair it work... | Hacker News
October 12, 2023 - Best of all is that I simply set the device to `torch.device('cuda')` rather than openCL, which does wonders for compatibility and to keep code simple Β· Protip: Use the official ROCM Pytorch base docker image [0]. The AMD setup is so finicky and dependent on specific versions of ...
🌐
PyTorch Forums
discuss.pytorch.org β€Ί t β€Ί how-to-build-pytorch-from-source-for-rocm β€Ί 184317
How to Build Pytorch from source for ROCm? - PyTorch Forums
July 16, 2023 - 'm asking question after trying to build pytorch for months with no results. Hope some devs would help. I built pytorch from source in a local python environment for specific text-generation-ui app in linux. The compile ends with no libhipblas.so, and the other .so files, and rocblas folder ...