-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[Cherrypick from win-onnxruntime] Add MigraphX EP support for auto EP #25481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
onnxruntime/core/providers/migraphx/migraphx_provider_factory.cc
Outdated
Show resolved
Hide resolved
onnxruntime/core/providers/migraphx/migraphx_provider_factory.cc
Outdated
Show resolved
Hide resolved
|
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);
} |
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.
onnxruntime/core/providers/migraphx/migraphx_provider_factory.cc
Outdated
Show resolved
Hide resolved
onnxruntime/core/providers/migraphx/migraphx_provider_factory.cc
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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>
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>
|
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. |
|
Hi there! We haven't cut the release branch for this version yet, so I'm removing the |
…me (microsoft#25516) After cherry-picking from win-onnxruntime (microsoft#25481), the MIGraphX EP stopped compiling on the main branch.
…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>
…me (microsoft#25516) After cherry-picking from win-onnxruntime (microsoft#25481), the MIGraphX EP stopped compiling on the main branch.

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.