Well, you're probably still best off using latest nightly rocm torch build, but I seldom encounter issues with torch anymore. Not sure about torch geometric. In terms of just running torch-using things, main "problem" is indeed by now just stuff on top of torch that would work fine if only it didn't unnecessarily check for nvidia cuda a bit too specifically. Like they'll do some paranoid check against torch.version.cuda (that is empty on rocm torch, understandably, and it's torch.version.hip for rocm/hip version) at the top and error out, but turns all the torch-level code in the package actually works fine on rocm variant torch anyway (where .to("cuda") is actually your rocm device) if you do the obvious trivial local modification to skip the paranoid check. Main problem, now, is things using ROCm CK as a dep I find - despite ROCm's rather short list of officially supported hardware (works on far more than is officially supported once you know about a particular env var HSA_OVERRIDE_GFX_VERSION), anything using CK (including high-performance ROCm variants of higher level libs on top that have it as a dependency) quietly currently only officially works fully on an even shorter list (and the env var won't help, CK builds with partial support for some gpus where it works in a sense but then key ops don't work). This can directly affect stuff like the very well-known xFormers because guess what it tries to use.... https://github.com/facebookresearch/xformers/tree/main/third_party https://rocm.docs.amd.com/projects/composable_kernel/en/docs-6.3.3/tutorial/tutorial_hello_world.html#hardware-targets CK library fully supports gfx908 and gfx90a GPU architectures, while only some operators are supported for gfx1030 devices. Check your hardware to determine the target GPU architecture https://github.com/ROCm/composable_kernel/issues/1958 - "Support composable kernel on RDNA3 (7900 xtx)" https://github.com/ROCm/composable_kernel/issues/1171 While you may be able to use CPU / non-ROCm-CK builds of a lot of stuff, so you can run the same stuff but slower, that kind of defeats the purpose in a lot of cases. Now maybe there's some move away away from CK entirely (I mean, how the hell can they not support RDNA3? Well sure, maybe awaiting open source community contributions that could, but this is also flagship amd stuff...), but definitely one that I for one keep hitting at time of writing. Answer from lood9phee2Ri on reddit.com
🌐
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)
Check System requirements (Linux) and install ROCm using the instructions in the ROCm installation overview section. Install the required dependencies for the wheels package. sudo apt update sudo apt install libjpeg-dev python3-dev python3-pip pip3 install wheel setuptools · Install torch, torchvision, and torchaudio, as specified in the installation matrix. pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/rocm7.2
🌐
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 - An installable Python package is now hosted on pytorch.org, along with instructions for local installation in the same simple, selectable format as PyTorch packages for CPU-only configurations and other GPU platforms. PyTorch on ROCm includes full capability for mixed-precision and large-scale training using AMD’s MIOpen & RCCL libraries.
Discussions

How is ROCm support for pytorch and pytorch geometric?
Well, you're probably still best off using latest nightly rocm torch build, but I seldom encounter issues with torch anymore. Not sure about torch geometric. In terms of just running torch-using things, main "problem" is indeed by now just stuff on top of torch that would work fine if only it didn't unnecessarily check for nvidia cuda a bit too specifically. Like they'll do some paranoid check against torch.version.cuda (that is empty on rocm torch, understandably, and it's torch.version.hip for rocm/hip version) at the top and error out, but turns all the torch-level code in the package actually works fine on rocm variant torch anyway (where .to("cuda") is actually your rocm device) if you do the obvious trivial local modification to skip the paranoid check. Main problem, now, is things using ROCm CK as a dep I find - despite ROCm's rather short list of officially supported hardware (works on far more than is officially supported once you know about a particular env var HSA_OVERRIDE_GFX_VERSION), anything using CK (including high-performance ROCm variants of higher level libs on top that have it as a dependency) quietly currently only officially works fully on an even shorter list (and the env var won't help, CK builds with partial support for some gpus where it works in a sense but then key ops don't work). This can directly affect stuff like the very well-known xFormers because guess what it tries to use.... https://github.com/facebookresearch/xformers/tree/main/third_party https://rocm.docs.amd.com/projects/composable_kernel/en/docs-6.3.3/tutorial/tutorial_hello_world.html#hardware-targets CK library fully supports gfx908 and gfx90a GPU architectures, while only some operators are supported for gfx1030 devices. Check your hardware to determine the target GPU architecture https://github.com/ROCm/composable_kernel/issues/1958 - "Support composable kernel on RDNA3 (7900 xtx)" https://github.com/ROCm/composable_kernel/issues/1171 While you may be able to use CPU / non-ROCm-CK builds of a lot of stuff, so you can run the same stuff but slower, that kind of defeats the purpose in a lot of cases. Now maybe there's some move away away from CK entirely (I mean, how the hell can they not support RDNA3? Well sure, maybe awaiting open source community contributions that could, but this is also flagship amd stuff...), but definitely one that I for one keep hitting at time of writing. More on reddit.com
🌐 r/ROCm
19
6
March 8, 2025
How can i set up linux, rocm, pytorch for 7900xtx?
I wouldn’t touch windows with a 10ft pole for ROCm. Start with ubuntu 22.04.3, it has support for ROCm 5.7.0 and “should” (see note at the end) work best with the 7900xtx. AMD’s documentation on getting things running has worked for me, here are the prerequisites. Do these before you attempt installing ROCm. To actually install ROCm itself use this portion of the documentation. Lastly you wanted to use PyTorch. AMD gives a few options but they recommend using a docker image with PyTorch pre-installed. Assuming you know how to get docker all set up, this is listed as option 1 you can skip the other options and head to the bottom of the page if you need instructions on how to test your installation. My only recommendation outside of AMD’s documentation is to try an updated kernel version from what Ubuntu 22.04.3 ships with. Newer kernels have better support for the 7900xtx so this may solve some weird issues you may or may not run into. Ubuntu 23.04.X will ship with a more updated kernel, so you can start with that version instead if you prefer (although not officially supported but neither is the 7900xtx so make of that as you will). Or you can just swap kernel versions on 22.04.3 if you’d rather do that (also not officially supported). If you do want to go the nvidia route I’d pass on the 4090 and look for the 3090 on the used market to save some money, and I’m assuming the more important factor of your card is having 24gb of vram, not so much the higher speed. More on reddit.com
🌐 r/ROCm
20
6
October 14, 2023
Current state of PyTorch + ROCm
With ROCm 7.0 just released (and probably soon supported by PyTorch), and new interesting AMD Radeon AI PRO R9700 AI TOP 32 GB VRAM on the market – which seems like a very tempting proposition – I’m curious how far ROCm has and PyTorch has come for a smooth inference and training. More on discuss.pytorch.org
🌐 discuss.pytorch.org
3
0
November 11, 2025
Is ROCm viable for ml development with PyTorch
Pytorch uses the same name “cuda” for rocm and cuda for device. So your pytorch code on nvidia cuda should just work on rocm device without any changes. More on reddit.com
🌐 r/ROCm
17
24
February 3, 2025
🌐
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.
🌐
Reddit
reddit.com › r/rocm › how is rocm support for pytorch and pytorch geometric?
r/ROCm on Reddit: How is ROCm support for pytorch and pytorch geometric?
March 8, 2025 -

Thinking of switching to AMD for my personal rig and I have been wondering what is the ROCm support like these days.

I know that at least in pytorch it's just a drop in replacement. Has anyone coming from CUDA encountered any problems with using ROCm in their projects? Also how is the support for pytorch geometric like?

Thank you for the help!

Top answer
1 of 4
5
Well, you're probably still best off using latest nightly rocm torch build, but I seldom encounter issues with torch anymore. Not sure about torch geometric. In terms of just running torch-using things, main "problem" is indeed by now just stuff on top of torch that would work fine if only it didn't unnecessarily check for nvidia cuda a bit too specifically. Like they'll do some paranoid check against torch.version.cuda (that is empty on rocm torch, understandably, and it's torch.version.hip for rocm/hip version) at the top and error out, but turns all the torch-level code in the package actually works fine on rocm variant torch anyway (where .to("cuda") is actually your rocm device) if you do the obvious trivial local modification to skip the paranoid check. Main problem, now, is things using ROCm CK as a dep I find - despite ROCm's rather short list of officially supported hardware (works on far more than is officially supported once you know about a particular env var HSA_OVERRIDE_GFX_VERSION), anything using CK (including high-performance ROCm variants of higher level libs on top that have it as a dependency) quietly currently only officially works fully on an even shorter list (and the env var won't help, CK builds with partial support for some gpus where it works in a sense but then key ops don't work). This can directly affect stuff like the very well-known xFormers because guess what it tries to use.... https://github.com/facebookresearch/xformers/tree/main/third_party https://rocm.docs.amd.com/projects/composable_kernel/en/docs-6.3.3/tutorial/tutorial_hello_world.html#hardware-targets CK library fully supports gfx908 and gfx90a GPU architectures, while only some operators are supported for gfx1030 devices. Check your hardware to determine the target GPU architecture https://github.com/ROCm/composable_kernel/issues/1958 - "Support composable kernel on RDNA3 (7900 xtx)" https://github.com/ROCm/composable_kernel/issues/1171 While you may be able to use CPU / non-ROCm-CK builds of a lot of stuff, so you can run the same stuff but slower, that kind of defeats the purpose in a lot of cases. Now maybe there's some move away away from CK entirely (I mean, how the hell can they not support RDNA3? Well sure, maybe awaiting open source community contributions that could, but this is also flagship amd stuff...), but definitely one that I for one keep hitting at time of writing.
2 of 4
2
File a bug and let us know if you run into issues we will resolve it quickly.
🌐
AMD ROCm
rocm.docs.amd.com › en › latest › compatibility › ml-compatibility › pytorch-compatibility.html
PyTorch compatibility - ROCm Documentation - AMD
The Instinct MI300X workload optimization guide provides detailed guidance on optimizing workloads for the AMD Instinct MI300X GPU using ROCm. This guide helps users achieve optimal performance for deep learning and other high-performance computing tasks on the MI300X GPU. The Inception with PyTorch documentation describes how PyTorch integrates with ROCm for AI workloads.
🌐
Medium
medium.com › @guinmoon › building-rocm-7-1-and-pytorch-on-windows-for-unsupported-gpus-my-hands-on-guide-0758d2d2b334
Building ROCm 7.1 and PyTorch on Windows for Unsupported GPUs: My Hands-On Guide | by Artem Savkin | Medium
November 21, 2025 - In this article, I’ll share my experience building the yet-to-be-released (at the time of writing) ROCm 7 for my own GPUs, even if they’re not in the list of officially supported architectures. Then, I’ll show how to build PyTorch with the assembled ROCm 7 and run ComfyUI.
Find elsewhere
🌐
AMD ROCm
rocm.docs.amd.com › projects › install-on-linux › en › docs-6.1.0 › how-to › 3rd-party › pytorch-install.html
Installing PyTorch for ROCm — ROCm installation (Linux)
If you want a different version of ROCm, modify the command accordingly. pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/rocm5.6/
🌐
ROCm Blogs
rocm.blogs.amd.com › artificial-intelligence › pytorch-amd-gpus › README.html
Empowering Developers to Build a Robust PyTorch Ecosystem on AMD ROCm™ with Better Insights and Monitoring
October 21, 2025 - Production ROCm support for N-1 to N+1 PyTorch releases is in progress. The AI Software Head-Up Dashboard shows status of PyTorch on ROCm.
🌐
AMD ROCm
rocm.docs.amd.com › projects › radeon › en › latest › docs › install › native_linux › install-pytorch.html
Install PyTorch for ROCm — Use ROCm on Radeon GPUs
For more details, see How ROCm uses PCIe atomics. AMD recommends the PIP install method to create a PyTorch environment when working with ROCm™ for machine learning development.
🌐
GitHub
github.com › ROCm › rocm
GitHub - ROCm/ROCm: AMD ROCm™ Software - GitHub Home
ROCm supports programming models, such as OpenMP and OpenCL, and includes all necessary open-source software compilers, debuggers, and libraries. ROCm is fully integrated into machine learning (ML) frameworks, such as PyTorch and TensorFlow.
Starred by 6.7K users
Forked by 577 users
Languages   Shell 84.7% | Python 11.4% | Makefile 2.4%
🌐
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.
🌐
Reddit
reddit.com › r/rocm › how can i set up linux, rocm, pytorch for 7900xtx?
r/ROCm on Reddit: How can i set up linux, rocm, pytorch for 7900xtx?
October 14, 2023 -

I've been researching hundreds of posts over the past weeks with no luck.I tried doing it docker desktop for windows, but i wouldn't mind just having a linux on another disk to boot from, and have it all there.Linux isn't my first choice, but is the only one with pytorch rocm support afaik.

I'm studying applied statistics masters program, where I will meet with ML, which is what interest me the most, by the end of the year. I want to get ready beforehand, and try out a few available options such as deepfilternet, whisper, llama2, stable difusion... i hope you can recommend me some more, but for that i first need to get anything working at all.

Here's a complete list of commands out of my notepad++ i've encountered so far, but i think i need a differently guided way to do this as i cannot get the gpu detected.

Pretty sure I read the latest versions of rocm should support gfx1100, but the in combination with which os/image, kernel, headers&modules, rocm,...

If anyone can help me set this up I'd be supper grateful.

docker run -it --privileged --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --device=/dev/kfd --device=/dev/dri --group-add video --ipc=host --shm-size 24G rocm/pytorch:latest
sudo apt list --installed
sudo apt update
sudo apt-get update
sudo apt upgrade -y

https://askubuntu.com/questions/1429376/how-can-i-install-amd-rocm-5-on-ubuntu-22-04

wget https://repo.radeon.com/amdgpu-install/5.3/ubuntu/focal/amdgpu-install_5.3.50300-1_all.deb
sudo apt-get install ./amdgpu-install_5.3.50300-1_all.deb -y --allow-downgrades

pip install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/rocm5.5
pip install --pre torch torchvision --index-url

https://download.pytorch.org/whl/nightly/rocm5.5--allow-downgrades
wget https://repo.radeon.com/amdgpu-install/latest/ubuntu/focal/amdgpu-install_5.7.50700-1_all.deb  -y
sudo apt-get install ./amdgpu-install_5.7.50700-1_all.deb -y

sudo apt install amdgpu
sudo amdgpu-install --usecase=rocm -y
sudo apt install amdgpu-dkms -y
sudo apt install rocm-hip-sdk -y
sudo dpkg --purge amdgpu-dkms -y
sudo dpkg --purge amdgpu -y
sudo apt-get remove amdgpu-dkms -y
sudo apt-get install amdgpu-dkms -y
sudo apt autoremove
wget -q -O - https://repo.radeon.com/rocm/rocm.gpg.key | sudo apt-key add -
echo 'deb [arch=amd64] https://repo.radeon.com/amdgpu/latest/ubuntu jammy main' | sudo tee /etc/apt/sources.list.d/amdgpu.list



sudo apt install linux-modules-extra-5.4.0-64-generic linux-headers-5.4.0-64-generic
sudo apt remove linux-modules-extra-5.8.0-44-generic linux-headers-5.8.0-44-generic
sudo apt remove linux-modules-extra-5.4.0-164-generic linux-headers-5.4.0-164-generic

sudo apt --fix-broken install -y
sudo dpkg --purge amdgpu-dkms
sudo dpkg --purge amdgpu -y
sudo apt-get install amdgpu -y
sudo apt update -y
sudo apt upgrade -y


rocminfo | grep gfx
rocminfo 

Hope it's not too disorganized, commands were used in different combos on different containers from "rocm/pytorch:latest" image. As i started from there, i hoped it would have these things ready with the gpu supported out of the box. I'm probably missing something obvious to you guys.

edit:

should i just give up and get nvidia? :( I really want to support amd, 1200 vs 2000eur isn't that little to a student.

Top answer
1 of 7
8
I wouldn’t touch windows with a 10ft pole for ROCm. Start with ubuntu 22.04.3, it has support for ROCm 5.7.0 and “should” (see note at the end) work best with the 7900xtx. AMD’s documentation on getting things running has worked for me, here are the prerequisites. Do these before you attempt installing ROCm. To actually install ROCm itself use this portion of the documentation. Lastly you wanted to use PyTorch. AMD gives a few options but they recommend using a docker image with PyTorch pre-installed. Assuming you know how to get docker all set up, this is listed as option 1 you can skip the other options and head to the bottom of the page if you need instructions on how to test your installation. My only recommendation outside of AMD’s documentation is to try an updated kernel version from what Ubuntu 22.04.3 ships with. Newer kernels have better support for the 7900xtx so this may solve some weird issues you may or may not run into. Ubuntu 23.04.X will ship with a more updated kernel, so you can start with that version instead if you prefer (although not officially supported but neither is the 7900xtx so make of that as you will). Or you can just swap kernel versions on 22.04.3 if you’d rather do that (also not officially supported). If you do want to go the nvidia route I’d pass on the 4090 and look for the 3090 on the used market to save some money, and I’m assuming the more important factor of your card is having 24gb of vram, not so much the higher speed.
2 of 7
4
I have no experience with Docker, but the 7900XTX works fine with Ubuntu 22.0.4.3 LTS aka Jammy, which I have installed as dual boot beside Win 11. So far I only played around a bit with Stable Diffusion to check the performance and help others with AMD out, because I have another rig with a 4090. Anyway this is how I did if for my Ubuntu dual boot Prerequisites: sudo apt update && sudo apt install -y git python3-pip python3-venv python3-dev libstdc++-12-dev install the amdgpu driver with rocm support curl -O https://repo.radeon.com/amdgpu-install/5.7.1/ubuntu/jammy/amdgpu-install_5.7.50701-1_all.deb (*) Initially I used an older driver (5.6 which I later upgraded). sudo dpkg -i amdgpu-install_5.7.50701-1_all.deb sudo amdgpu-install --usecase=graphics,rocm grant current user the access to gpu devices sudo usermod -aG video $USER sudo usermod -aG render $USER reboot is needed to make both driver and user group take effect sudo reboot If you have secure boot you need to enroll the MOK key on reboot, an old school looking menu will pop up on reboot where you have to enter the password you chose in Linux. Now for Stable Diffusion: git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui cd stable-diffusion-webui/ python3 -m venv venv source venv/bin/activate pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/rocm5.7 Optional: edit webui-user.sh to uncomment and add arguments e.g. export COMMANDLINE_ARGS="--ckpt-dir /home/username/SD/MODELS" ./webui.sh → will install all additional requirements After start of web ui the bottom line should show something like this: torch: 2.2.0.dev20231013+rocm5.7 If you encounter problems, here is a nice script to check a Python venv if the PyTorch+ROCm installation really works: https://gist.github.com/damico/484f7b0a148a0c5f707054cf9c0a0533
🌐
PyTorch Forums
discuss.pytorch.org › t › current-state-of-pytorch-rocm › 223926
Current state of PyTorch + ROCm - PyTorch Forums
November 11, 2025 - With ROCm 7.0 just released (and probably soon supported by PyTorch), and new interesting AMD Radeon AI PRO R9700 AI TOP 32 GB VRAM on the market – which seems like a very tempting proposition – I’m curious how far ROCm …
🌐
AMD ROCm
rocm.docs.amd.com › en › latest › how-to › rocm-for-ai › training › benchmark-docker › pytorch-training.html
Training a model with PyTorch on ROCm — ROCm Documentation
PyTorch is an open-source machine learning framework that is widely used for model training with GPU-optimized components for transformer-based models. The PyTorch for ROCm training Docker image provides a prebuilt optimized environment for fine-tuning and pretraining a model on AMD Instinct ...
🌐
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.
🌐
GitHub
gist.github.com › jurgonaut › 462a6bd9b87ed085fa0fe6c893536993
Install AMD GPU ROCm and PyTorch on Ubuntu - Gist - GitHub
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/rocm<version>
🌐
Reddit
reddit.com › r/rocm › is rocm viable for ml development with pytorch
r/ROCm on Reddit: Is ROCm viable for ml development with PyTorch
February 3, 2025 -

I've seen a lot of information about improving compatibility of ROCm with PyTorch which is great. At the same time I couldn't find much confirmation about it being a drop-in replacement for cuda.

I develop ml models in PyTorch locally on Linux and MacOS and train them later in the cloud. In my experience MPS proved to be a drop in replacement for CUDA allowing me to simply change device="cuda" to device="mps" and test my code. What about ROCm?