Torch-MIGraphX installation

Torch-MIGraphX installation#

2025-11-20

1 min read time

Applies to Linux

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:

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.