MIGraphX examples#
2026-10-12
3 min read time
The MIGraphX repository includes examples for common inference workflows. Each example below is documented in its README file. Follow the linked path in the MIGraphX GitHub repository to build and run the example.
Getting started examples#
These examples teach core MIGraphX workflows. Start here if you are new to the library.
Example |
Target user |
What it demonstrates |
|---|---|---|
C++ application developers |
Parse ONNX models, inspect graphs, and save or load programs in MessagePack or JSON format. |
|
C++ application developers |
End-to-end inference: parse ONNX, compile for GPU or CPU, quantize, prepare inputs, and evaluate. |
|
Model integrators |
Command-line usage of |
MIGraphX API examples#
Examples under examples/migraphx/ cover MIGraphX-specific utilities and
advanced C++ API usage.
Example |
Target user |
What it demonstrates |
|---|---|---|
C++ application developers |
Parse, load, and save graph programs. |
|
C++ application developers |
Run programs with dynamic batch sizes using |
|
MIGraphX contributors and debuggers |
Inspect operator output buffers during evaluation with |
|
Model integrators |
Export frozen TensorFlow 1 graphs for MIGraphX ingestion. |
|
Model integrators |
Export frozen TensorFlow 2 graphs for MIGraphX ingestion. |
Vision examples#
Examples under examples/vision/ cover image classification, detection,
segmentation, and super resolution.
Example |
Target user |
What it demonstrates |
|---|---|---|
C++ application developers |
MNIST digit classification with the C++ API. |
|
Python application developers |
ResNet50 V2 inference in Python via a Jupyter notebook. |
|
Python application developers |
NFNet inference and ONNX Runtime comparison. |
|
Python application developers |
Super resolution inference. |
|
Python application developers |
U-Net segmentation inference. |
|
Python application developers |
3D U-Net inference. |
|
Python application developers |
YOLOv4 object detection inference. |
|
Python application developers |
YOLO26 object detection inference. |
Natural language processing examples#
Examples under examples/nlp/ cover question answering and speech
recognition.
Example |
Target user |
What it demonstrates |
|---|---|---|
Python application developers |
BERT question answering on SQuAD. |
|
Python application developers |
RNN-T speech recognition inference. |
Diffusion examples#
Examples under examples/diffusion/ cover text-to-image diffusion models.
Example |
Target user |
What it demonstrates |
|---|---|---|
Python application developers |
Stable Diffusion 2.1 text-to-image inference. |
|
Python application developers |
Stable Diffusion XL text-to-image inference. |
|
Python application developers |
Stable Diffusion 3 text-to-image inference. |
|
Python application developers |
Flux text-to-image inference. |
|
Python application developers |
ControlNet Canny edge guidance with Stable Diffusion 1.5. |
Transformer examples#
Examples under examples/transformers/ cover large language model and
speech model inference.
Example |
Target user |
What it demonstrates |
|---|---|---|
Python application developers |
Llama 2 inference. |
|
Python application developers |
Whisper automatic speech recognition. |
ONNX Runtime examples#
Examples under examples/onnxruntime/ show MIGraphX integration through
the ONNX Runtime execution provider.
Example |
Target user |
What it demonstrates |
|---|---|---|
ONNX Runtime users |
ResNet50 inference through ONNX Runtime with the MIGraphX execution provider. |
|
ONNX Runtime users |
InceptionV3 inference through ONNX Runtime with the MIGraphX execution provider. |
See also#
Get started with MIGraphX for persona-based starting paths.
Build MIGraphX in a Docker container for a containerized build environment.
Validate model outputs to check example output against the reference implementation.