Skip to content

[MIGRAPHX] Add ORT generic interface build support for MigraphX#25004

Closed
karim-vad wants to merge 5 commits intomainfrom
dev/kvadsariya/migraphx_generic
Closed

[MIGRAPHX] Add ORT generic interface build support for MigraphX#25004
karim-vad wants to merge 5 commits intomainfrom
dev/kvadsariya/migraphx_generic

Conversation

@karim-vad
Copy link
Contributor

Description

  • Include MIGRAPH EP to be part of generic ORT interface for WCR

Motivation and Context

@karim-vad karim-vad requested a review from Copilot June 9, 2025 21:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@karim-vad karim-vad requested review from adrianlizarraga and snnn June 9, 2025 21:48
#endif
} else if (type == kMIGraphXExecutionProvider) {
#ifdef USE_MIGRAPHX
#if defined(USE_MIGRAPHX) || defined(USE_MIGRAPHX_PROVIDER_INTERFACE)
Copy link
Contributor Author

@karim-vad karim-vad Jun 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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 ?

image

@snnn
Copy link
Contributor

snnn commented Jul 3, 2025

@adrianlizarraga , any comment?

@jywu-msft jywu-msft added the ep:MIGraphX issues related to AMD MI GraphX execution provider label Jul 22, 2025
@jywu-msft
Copy link
Member

@nieubank is this PR needed by #25481 ?

@wonchung-microsoft
Copy link
Contributor

This also needs to be cherrypicked: https://github.com/microsoft/win-onnxruntime/pull/111
Could we include it in this PR?

@nieubank
Copy link
Contributor

This also needs to be cherrypicked: microsoft/win-onnxruntime#111 Could we include it in this PR?

Yes, please include whatever is necessary from win-onnxruntime here.

@karim-vad
Copy link
Contributor Author

karim-vad commented Jul 22, 2025

Closing this PR as it these changes will be included in Won PR.
(#25481)

@karim-vad karim-vad closed this Jul 22, 2025
@nieubank nieubank removed ep:MIGraphX issues related to AMD MI GraphX execution provider release:1.23.0 labels Jul 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants