MIGraphX Field Guide
Models

ONNX Models

Prepare ONNX graphs for MIGraphX compilation and avoid common export issues.

MIGraphX works well when the ONNX graph is explicit, shape-stable, and uses supported operators.

Export Rules

Good defaults:

opset: match MIGraphX support for your ROCm release
input names: stable, human-readable
dynamic dims: only where needed
NMS/postprocess: either fully supported in graph or moved outside the graph
precision: start FP32, then test FP16

Validate The Graph

python -m onnx.checker model.onnx
migraphx-driver compile model.onnx --gpu
migraphx-driver verify model.onnx --gpu

Inspect Input Names

import onnx

model = onnx.load("model.onnx")
for value in model.graph.input:
    print(value.name)

Use those names when declaring shape maps in Python or C++.

Unsupported Operator Triage

If compile fails on an operator:

1. check the MIGraphX supported ONNX operator list
2. try a different exporter opset
3. simplify the graph
4. move unsupported postprocess outside the model
5. test the same model with migraphx-driver verify

Do not bury operator compatibility failures behind application logs. Keep a standalone driver reproduction.

Output Contract

Write down exactly what the application expects:

output name
output rank
output dimensions
element type
batch dimension behavior
postprocess assumptions

Then assert it during engine/program load.

On this page