Skip to content

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

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

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

Conversation

@karim-vad

Copy link
Copy Markdown
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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread onnxruntime/core/platform/posix/env.cc Outdated
@karim-vad
karim-vad requested review from adrianlizarraga and snnn June 9, 2025 21:48
Comment thread onnxruntime/core/platform/posix/env.cc Outdated
#endif
} else if (type == kMIGraphXExecutionProvider) {
#ifdef USE_MIGRAPHX
#if defined(USE_MIGRAPHX) || defined(USE_MIGRAPHX_PROVIDER_INTERFACE)

@karim-vad karim-vad Jun 11, 2025

Copy link
Copy Markdown
Contributor Author

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

snnn commented Jul 3, 2025

Copy link
Copy Markdown
Contributor

@adrianlizarraga , any comment?

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

Copy link
Copy Markdown
Contributor

@nieubank is this PR needed by #25481 ?

@wonchung-microsoft

Copy link
Copy Markdown
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
Copy Markdown
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

karim-vad commented Jul 22, 2025

Copy link
Copy Markdown
Contributor Author

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