Get started with MIGraphX#
2026-10-12
3 min read time
After you install MIGraphX, use this guide to choose a starting path based on how you plan to use the library. Each section links to validated examples and reference material in this repository.
Choose your path#
MIGraphX supports several integration patterns. Pick the section that matches your role and goal.
Application developer using the C++ API#
Use this path when you embed MIGraphX directly in a C++ application.
Confirm MIGraphX is installed. See MIGraphX on ROCm installation.
In your existing CMake project, set
CMAKE_PREFIX_PATHto your MIGraphX installation location and link against the C++ API:find_package(migraphx) target_link_libraries(my_app migraphx::c)
Replace
my_appwith your CMake target name. The repository examples already includeCMakeLists.txtfiles, so you do not need to create one when building those examples.Work through Parse, load, and save a model to learn how to load ONNX models and serialize programs.
Continue with the C++ MNIST inference example at
examples/vision/cpp_mnist/in the MIGraphX GitHub repository for a complete parse, compile, and evaluate workflow.Consult the MIGraphX C++ API reference for API details.
Application developer using the Python API#
Use this path when you call MIGraphX from Python.
Confirm MIGraphX is installed. See MIGraphX on ROCm installation.
Use a Python virtual environment. Activate it before running examples so the MIGraphX Python module resolves correctly for your install method. If you install MIGraphX from a Python wheel into that environment, the module is available after activation. If you install from a package manager, confirm that
import migraphxsucceeds in the activated environment before continuing.Browse the Python examples under
examples/in the MIGraphX GitHub repository. Start with a domain that matches your model, such as vision or natural language processing.Consult the MIGraphX Python API reference for API details.
Model integrator or inference engineer#
Use this path when you want to inspect, compile, verify, or benchmark models without writing application code.
Confirm
migraphx-driveris available on yourPATH.Read MIGraphX driver for commands such as
read,compile,run,verify, andperf.Validate a model against the reference implementation:
migraphx-driver verify model.onnx --onnx
Measure performance:
migraphx-driver perf model.onnx --onnx --gpu -n 50
See Validate model outputs and Tune model performance for environment variables and tolerance settings.
PyTorch user#
Use this path when you integrate MIGraphX with PyTorch workflows through Torch-MIGraphX.
Install Torch-MIGraphX. See Torch-MIGraphX installation.
Refer to the Torch-MIGraphX repository at ROCm/torch_migraphx for model conversion and inference examples.
ONNX Runtime user#
Use this path when you run inference through the ONNX Runtime MIGraphX execution provider.
Install MIGraphX. See MIGraphX on ROCm installation.
Follow the ResNet50 example at
examples/onnxruntime/resnet50/in the MIGraphX GitHub repository for setup and inference steps with ONNX Runtime.
MIGraphX contributor#
Use this path when you modify the MIGraphX source code or add operators and passes.
Set up a build environment. See Build MIGraphX in a Docker container or MIGraphX on ROCm installation.
Consult MIGraphX environment variables for tuning, tracing, and testing options used during development.
Next steps#
Parse, load, and save a model walks through your first C++ workflow with an ONNX model.
MIGraphX examples lists documented examples by domain and target user.
Deep learning compilation with MIGraphX explains how MIGraphX optimizes inference graphs.