Installation
Install MIGraphX on bare metal, inside ROCm containers, and in source-build environments.
MIGraphX is part of the ROCm ecosystem. Treat ROCm as the base requirement and MIGraphX as the inference compiler/runtime layered on top.
Linux Packages
After configuring the ROCm package repository for your distribution:
sudo apt update
sudo apt install migraphxFor native development, install headers and CMake package files when available:
sudo apt install migraphx-devValidate:
migraphx-driver --helpROCm Health Check
Before debugging a model, check the GPU runtime:
rocminfo
rocm-smi
hipcc --versionCommon failures at this layer:
- ROCm package version does not support the GPU
- user is not in the correct render/video group
- kernel driver is not loaded
- container is missing device access
Docker
Use a ROCm development image when you want reproducible builds:
docker run --rm -it \
--device=/dev/kfd \
--device=/dev/dri \
--group-add video \
--ipc=host \
--security-opt seccomp=unconfined \
rocm/dev-ubuntu-22.04:latestInside the container:
apt update
apt install -y migraphx migraphx-dev
migraphx-driver --helpFor more detail, see Docker deployment.
Build From Source
Build from source when you need:
- a patch not present in your ROCm package
- development against MIGraphX internals
- a specific commit for debugging
git clone https://github.com/ROCm/AMDMIGraphX.git
cd AMDMIGraphXFollow the upstream repository instructions for dependencies and build commands. Source builds are slower to reproduce than package installs, so prefer packages for application integration unless you need a specific change.
Version Pinning
Pin ROCm and MIGraphX together. Avoid mixing a MIGraphX package from one ROCm release with HIP, rocBLAS, MIOpen, or rocBLASLt packages from another release.
Recommended lock file for production:
rocm_version: 6.x
migraphx_package_version: exact package version
gpu: exact card or accelerator
driver: kernel and amdgpu version
model: ONNX SHA256
compile_options: target, precision, input shapes