Torch-MIGraphX installation#
2025-11-20
1 min read time
MIGraphX can be integrated with PyTorch workflows by using the Torch-MIGraphX library.
It includes the torch.compile API, so you can compile PyTorch models using MIGraphX.
Prerequisites:
ROCm must be installed before installing MIGraphX. See ROCm installation for Linux for instructions.
Installing MIGraphX using a package installer is sufficient if you want to use the MIGraphX API. See MIGraphX installation for instructions.
Pytorch must be installed. See PyTorch installation for instructions.
Install Torch-MIGraphX#
Use the following command to install torch_migraphx using pip:
pip install torch_migraphx
Build Torch-MIGraphX from source#
Use the following command to build torch_migraphx from source:
git clone https://github.com/ROCm/torch_migraphx.git
cd torch_migraphx
pip install . --no-build-isolation
Refer to the ROCm/torch_migraphx repository for more information on local builds and Docker environments.