[MIGRAPHX] Add ORT generic interface build support for MigraphX#25004
[MIGRAPHX] Add ORT generic interface build support for MigraphX#25004
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for building the ORT generic interface for MigraphX by introducing new build flags and updating macro conditions to include MIGraphX_INTERFACE alongside MIGraphX.
- Added a new flag for MIGraphX interface in the build script.
- Updated macro conditions in several source files to include cases when USE_MIGRAPHX_INTERFACE is defined.
- Modified CMakeLists.txt to append the appropriate provider flag when the generic interface is enabled.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tools/ci_build/build.py | Added build flag for enabling MIGraphX interface support. |
| onnxruntime/core/session/provider_bridge_ort.cc | Adjusted macro condition to support MIGraphX_INTERFACE. |
| onnxruntime/core/providers/shared_library/provider_interfaces.h | Modified macro condition to include MIGraphX_INTERFACE. |
| onnxruntime/core/providers/shared_library/provider_bridge_provider.cc | Updated macro condition for MG interface function exposure. |
| onnxruntime/core/platform/posix/env.cc | Altered macro condition that controls logging for thread affinity. |
| cmake/CMakeLists.txt | Added condition and flag for building with MIGraphX_INTERFACE. |
| #endif | ||
| } else if (type == kMIGraphXExecutionProvider) { | ||
| #ifdef USE_MIGRAPHX | ||
| #if defined(USE_MIGRAPHX) || defined(USE_MIGRAPHX_PROVIDER_INTERFACE) |
There was a problem hiding this comment.
@adrianlizarraga , can you specifically review these changes under onnxruntime/python/* as I am not sure where changes are needed. I hope onnxruntime_pybind_mlvalue.c, onnxruntime_pybind_mlvalue.h, onnxruntime_pybind_ortvalue.cc does not require any changes ?
|
@adrianlizarraga , any comment? |
|
This also needs to be cherrypicked: https://github.com/microsoft/win-onnxruntime/pull/111 |
Yes, please include whatever is necessary from win-onnxruntime here. |
|
Closing this PR as it these changes will be included in Won PR. |

Description
Motivation and Context