MIGraphX on ROCm installation#

2025-10-28

2 min read time

Applies to Linux

ROCm must be installed before installing MIGraphX. See ROCm installation for Linux for instructions.

Installing MIGraphX using a package installer is sufficient for most users who want to use the MIGraphX API. If you plan to develop for MIGraphX or contribute to the source code, see Developing for MIGraphX

Install MIGraphX with a package installer#

The package installer will install all the prerequisites you need for MIGraphX.

Use the following command to install MIGraphX:

sudo apt update && sudo apt install -y migraphx

Build MIGraphX from source#

Note

This method for building MIGraphX requires using sudo.

  1. Install rocm-cmake, pip3, rocblas, and miopen-hip:

    sudo apt install -y rocm-cmake python3-pip rocblas miopen-hip
    
  2. Install rbuild:

    pip3 install --prefix /usr/local https://github.com/RadeonOpenCompute/rbuild/archive/master.tar.gz
    
  3. Build MIGraphX source code:

    sudo rbuild build -d depend -B build -DGPU_TARGETS=$(/opt/rocm/bin/rocminfo | grep -o -m1 'gfx.*')