Setting PyTorch Environment for GPU#
This page describes the procedure to setup a DirectML-enabled PyTorch environment on Windows for a supported AMD GPU.
Pre-requisites#
GPUs: AMD Radeon™ RX Graphics Cards or AMD Radeon™ PRO Graphics Cards
Install Python Virtual Environment#
Follow the steps to install Python on Windows
Then continue by creating a Python virtual environment
Once these steps are completed, install Pytorch with DirectML.
Install Pytorch with DirectML#
Inside of the venv run:
python -m pip install torch-directml
Copyright (C) 2025 Advanced Micro Devices, Inc. All rights reserved.
SPDX-License-Identifier: MIT