Skip to content

Conversation

@wonchung-microsoft
Copy link
Contributor

@wonchung-microsoft wonchung-microsoft commented Jul 21, 2025

Cherrypick from the following branches in win-onnxruntime repo.
dev/amd/ozhang/update_mgx_ep_creation
dev/kvadsariya/auto_ep_migraphx

This change allows MigraphX EP (AMD GPU EP) to be selected through auto ep (prefer gpu) policy.

@nieubank
Copy link
Contributor

You'll probably want to add a test for this since MiGraphX has a provider test in migraphx_basic_test.cc. Something like

TEST(MIGraphXExecutionProviderTest, AutoEp_PreferGpu) {
  PathString model_name = ORT_TSTR("migraphx_basic_test.onnx");
  
  onnxruntime::Model model("test", false, DefaultLoggingManager().DefaultLogger());
  std::vector<int> dims = {1, 3, 2};
  CreateBaseModel(model, dims);
 
  auto status = onnxruntime::Model::Save(model, model_name);
  ASSERT_TRUE(status.IsOK());

  auto env = Ort::Env();
  env.UpdateEnvWithCustomLogLevel(OrtLoggingLevel::ORT_LOGGING_LEVEL_WARNING);

  {
    env.RegisterExecutionProviderLibrary(kMIGraphXExecutionProvider, ORT_TSTR("onnxruntime_providers_migraphx.dll"));

    Ort::SessionOptions so;
    so.SetEpSelectionPolicy(OrtExecutionProviderDevicePolicy_PREFER_GPU);
    Ort::Session session_object(env, model_name.c_str(), so);
    EXPECT_TRUE(SessionHasEp(session_object, kMIGraphXExecutionProvider));
  }

  env.UnregisterExecutionProviderLibrary(kMIGraphXExecutionProvider);
}

@nieubank nieubank added ep:MIGraphX issues related to AMD MI GraphX execution provider release:1.23.0 labels Jul 21, 2025
Karim Vadsariya and others added 5 commits July 22, 2025 13:47
Remove #ifdef MIGRAPHX so that the ort bin built for generic interface
and ep bin built without use_migraphx are still compatible. Currently,
ort bin built with use_generic has different struct from ep bin like
VitisAI which does not utilize use_generic nor use_migraphx, ending up
in a crash.
nieubank
nieubank previously approved these changes Jul 22, 2025
@wonchung-microsoft wonchung-microsoft removed the request for review from karim-vad July 22, 2025 23:19
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

You can commit the suggested changes from lintrunner.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
wonchung-microsoft and others added 3 commits July 22, 2025 21:16
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@wonchung-microsoft wonchung-microsoft merged commit 85ddbe7 into main Jul 23, 2025
107 of 115 checks passed
@wonchung-microsoft wonchung-microsoft deleted the dev/wonchung/auto_ep_migraphx branch July 23, 2025 17:18
@TedThemistokleous
Copy link
Contributor

How was this even approved? This breaks builds completely on Linux side builds

image

@TedThemistokleous
Copy link
Contributor

TedThemistokleous commented Jul 24, 2025

Hey it looks like your team pulled out the CI entirely for MIGraphX, and this is why all your testing looks good. There's no coverage anymore for MIGraphX EP being done. Not sure why this wasn't discussed between our teams but we're flying blind without any CI during integration.

#25418

@snnn
Copy link
Member

snnn commented Jul 25, 2025

Hi there! We haven't cut the release branch for this version yet, so I'm removing the release:1.23.0 label for now to keep things tidy. Thanks so much for your contribution! We'll make sure this gets included when the release is prepared. 🤖

snnn pushed a commit that referenced this pull request Jul 29, 2025
…me (#25516)

After cherry-picking from win-onnxruntime (#25481), the MIGraphX EP
stopped compiling on the main branch.
psakhamoori pushed a commit to psakhamoori/onnxruntime that referenced this pull request Aug 5, 2025
…me (microsoft#25516)

After cherry-picking from win-onnxruntime (microsoft#25481), the MIGraphX EP
stopped compiling on the main branch.
sanketkaleoss pushed a commit to sanketkaleoss/onnxruntime that referenced this pull request Aug 11, 2025
…microsoft#25481)

Cherrypick from the following branches in win-onnxruntime repo.
dev/amd/ozhang/update_mgx_ep_creation
dev/kvadsariya/auto_ep_migraphx

This change allows MigraphX EP (AMD GPU EP) to be selected through auto
ep (prefer gpu) policy.

---------

Co-authored-by: Karim Vadsariya <[email protected]>
Co-authored-by: ozhang <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
sanketkaleoss pushed a commit to sanketkaleoss/onnxruntime that referenced this pull request Aug 11, 2025
…me (microsoft#25516)

After cherry-picking from win-onnxruntime (microsoft#25481), the MIGraphX EP
stopped compiling on the main branch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ep:MIGraphX issues related to AMD MI GraphX execution provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants