Running PyTorch on an AMD GPU means calling torch.cuda. The project’s HIP semantics page states that PyTorch for HIP intentionally reuses the existing torch.cuda interfaces, and the code comment in its own example is blunt about it: 'rocm' or 'hip' are not valid device strings, use 'cuda'. Telling the two apart at runtime means checking torch.version.hip against torch.version.cuda.

What ROCm and HIP are

PyTorch’s documentation describes ROCm as AMD’s open source software platform for GPU-accelerated high performance computing and machine learning, and HIP as ROCm’s C++ dialect designed to ease conversion of CUDA applications to portable C++. The same page notes HIP is used both for porting existing applications and for new projects that need to run on AMD and NVIDIA.

Which GPUs are officially supported

AMD publishes a compatibility matrix and system-requirements tables. Its documentation states that GPUs absent from the supported-hardware tables are not officially supported. The matrix must be read for the ROCm release and operating system you intend to use.

On the datacentre side the supported entries run from MI355X and MI350X on CDNA4 (gfx950), through MI325X, MI300X and MI300A on CDNA3 (gfx942), MI250X, MI250 and MI210 on CDNA2 (gfx90a), to MI100 on gfx908. MI50 and MI25 are listed as unsupported.

For workstation and consumer cards, the supported Radeon PRO list includes the AI PRO R9700 and R9600D on RDNA4 (gfx1201), the PRO V710, W7900, W7900 Dual Slot, W7800, W7800 48GB and W7700 on RDNA3, and the W6800 and V620 on RDNA2. Consumer Radeon support covers the RX 9070 XT, 9070 GRE and 9070 (gfx1201), the RX 9060 XT, 9060 XT LP and 9060 (gfx1200), the RX 7900 XTX, 7900 XT and 7900 GRE (gfx1100), and the RX 7800 XT, 7700 XT and 7700 (gfx1101). Radeon VII and Radeon PRO VII are marked unsupported.

The operating-system footnotes narrow that support. Those Radeon and Radeon PRO cards are supported only on Ubuntu 24.04.4, Ubuntu 22.04.5, RHEL 10.1 and RHEL 9.7, a narrower set than the Instinct parts get. Footnote 8 limits the PRO V620 to two of those, Ubuntu 24.04.4 and Ubuntu 22.04.5. AMD also notes that GPUs absent from the table may be community-enabled through TheRock nightly builds, which it says are not part of the official ROCm release.

Framework support, as AMD validates it

The matrix includes a table titled “AI ecosystem compatibility” that gives validated versions. For ROCm 10.0.0 that is PyTorch 2.13.0, 2.12.0 and 2.11.0, JAX 0.11.0 and 0.10.x, vLLM 0.27.0, SGLang 0.5.15, TensorFlow 2.21, 2.20 and 2.19.1, MIGraphX 2.17 and ONNX Runtime 1.29.0. The runtime and compiler row covers HIP 10.0.0, HIPIFY 10.0.0 and LLVM 24.0.0.

vLLM states its own floor independently: ROCm 6.3 or above, with prebuilt wheels for ROCm 7.0 and 7.2.1. Its hardware line covers MI200s, MI300, MI350, the Radeon RX 7900 series, the RX 9000 series and Ryzen AI MAX and AI 300 parts, with MI350 requiring ROCm 7.0 or above. Its ROCm wheels are built for Python 3.12 only, and the doc warns that another Python version makes the installer fall back silently to the CUDA wheel, which then fails looking for libcudart.so.

llama.cpp takes a different route. Its build guide has a HIP backend built with -DGGML_HIP=ON and an optional GPU_TARGETS, and documents HSA_OVERRIDE_GFX_VERSION as a way to run on a GPU that is not officially supported by presenting it as a similar one. That variable is noted as not supported on Windows.

HIPIFY

HIPIFY is described by its repository as a set of tools to automatically translate CUDA source code into portable HIP C++. It covers the source level, not binaries, so it is a porting aid rather than a compatibility layer. The project can emit its own CUDA-to-HIP API support tables with hipify-clang --md --doc-format=full, which lets you check whether the calls your code makes are covered.

FAQ

Can I use ROCm on Windows?

Partly. The compatibility matrix says it applies to Linux and Windows, and lists Windows 11 25H2 with Adrenalin driver 26.8.1 for Radeon parts. The llama.cpp release assets include a Windows ROCm build. vLLM’s GPU installation doc says it does not support Windows natively and points to WSL.

Does my RX 6000 or older card work?

Not under official support. The current tables stop at RDNA2 for the PRO W6800 and V620 and do not list older consumer RDNA2 or GCN cards. llama.cpp’s HSA_OVERRIDE_GFX_VERSION note describes the unofficial workaround people use.

Do I have to rewrite PyTorch code for AMD?

Usually not. PyTorch reuses the torch.cuda namespace on HIP, so very few code changes are needed, if any, according to its HIP semantics page.

Is ROCm support the same on Instinct and Radeon?

No. Radeon and Radeon PRO cards carry a footnote restricting them to specific Linux releases, and the PRO V620 is limited to two of them, while Instinct parts have broader distribution coverage in the same matrix.