onnxruntime/docs/reference/execution-providers/MIGraphX-ExecutionProvider.md
Scott McKay 9e8d795344
Update ORT Mobile documentation (#7874)
* Update ORT Mobile documentation for both the pre-built package and custom build usage
Add info on pre-built package and CoreML EP
Refer to operator kernels and contrib ops documentation in github so we can point to the version specific content
Tweak some aspects like not specifying nav_order in places (items sort alphabetically by default)

* merge previous unmerged ios doc updates

* Address PR comments

* Minor tweaks

* Address PR comments

Co-authored-by: Guoyu Wang <wanggy@outlook.com>
2021-06-01 21:21:41 -07:00

1.7 KiB

title parent grand_parent
AMD MI GraphX Execution Providers Reference

MIGraphX Execution Provider

{: .no_toc }

The MIGraphX execution provider uses AMD's Deep Learning graph optimization engine to accelerate ONNX model on AMD GPUs.

Contents

{: .no_toc }

  • TOC placeholder {:toc}

Build

For build instructions, please see the BUILD page.

Usage

C/C++

Ort::Env env = Ort::Env{ORT_LOGGING_LEVEL_ERROR, "Default"};
Ort::SessionOptions sf;
int device_id = 0;
Ort::ThrowOnError(OrtSessionOptionsAppendExecutionProvider_MiGraphX(sf, device_id));

You can check here for a specific c/c++ program.

The C API details are here.

Python

When using the Python wheel from the ONNX Runtime build with MIGraphX execution provider, it will be automatically prioritized over the default GPU or CPU execution providers. There is no need to separately register the execution provider. Python APIs details are here.

You can check here for a python script to run an model on either the CPU or MIGraphX Execution Provider.

Configuration Options

MIGraphX providers an environment variable ORT_MIGRAPHX_FP16_ENABLE to enable the FP16 mode.

Performance Tuning

For performance tuning, please see guidance on this page: ONNX Runtime Perf Tuning

When/if using onnxruntime_perf_test, use the flag -e migraphx