Install PyTorch on ROCm 7.13.0#
This topic guides you through installing PyTorch with ROCm support on AMD hardware. It applies to supported AMD GPUs and platforms.
Device family
AMD Instinct™
AMD Radeon™
AMD Ryzen™
Operating system
Linux
Operating system
Linux
Windows
PyTorch version
2.11.0
2.10.0
2.9.1
PyTorch version
2.11.0
Prerequisites#
Ensure your system has a supported Python version installed and accessible: 3.11, 3.12, 3.13, or 3.14.
Complete the ROCm Core SDK installation prerequisites. See Prerequisites for instructions.
Install PyTorch using pip#
Set up your Python virtual environment. For example, run the following command to create one with Python 3.13:
Activate your Python virtual environment. For example:
Install the appropriate ROCm-enabled PyTorch libraries for your operating system and AMD hardware architecture.
Verify your PyTorch installation.
python -c "import torch; print(torch.cuda.is_available())"
This prints
Trueif PyTorch and ROCm are installed properly.