Three operator conditional blocks removed to get migraphx ep working for certain models#221
Open
tamahedi wants to merge 2 commits intowml-main-wcrforamdfrom
Open
Three operator conditional blocks removed to get migraphx ep working for certain models#221tamahedi wants to merge 2 commits intowml-main-wcrforamdfrom
tamahedi wants to merge 2 commits intowml-main-wcrforamdfrom
Conversation
added 2 commits
February 25, 2026 14:49
Collaborator
|
Why are you removing checks for these operators? What errors are you seeing? Is this tied to another ticket? Please PM me the info and issue you're experiencing. We shouldn't be removing checks as part of a fix. The checks are there as this signals unsupported behavior/inputs for the given operators. If you require changes on the MIGraphX side for the parsers due to new inputs/modes this should be discussed. |
Collaborator
|
The PR requests a merge to the wrong branch. Please use |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In migraphx_execution_provider.cc, within IsUnsupportedOpMode the conditional blocks for optype NonZero, Range and MaxPool were removed.
Motivation and Context
For some models (MeloTTS and SIE:SmolVLM2-500M-Video-Instruct:vision_* models) these three operators were being reported unsupported by migraphx ep but they are in the supported list. These conditionals were removed because when stepping through their code path they enter canEvalShapeGeneral and then eventually to IsGraphInput(graph, input_name) where it returns false from. After removing the conditional the two operators were no longer an issue.
A new issue stemmed later on for MeloTTS:
Error: C:/w/src/include\migraphx/op/multibroadcast.hpp:87: compute_shape: MULTIBROADCAST: input shape {0} cannot be broadcasted to {1, 1}!
Error: Non-zero status code returned while running MGXKernel_graph_main_graph_15922752454231187159_0 node. Name:'MIGraphXExecutionProvider_MGXKernel_graph_main_graph_15922752454231187159_0_0' Status Message: Failed to call function
Ticket related to it: https://amd-hub.atlassian.net/browse/AIRADSW-61
for some SmolVLM2-500M-Video-Instruct:vision_ models:
Error simplify_reshapes: C:/w/src/include\migraphx/check_shapes.hpp:220: same_dims: equal: Dimensions do not match
Dump: "C:\Users\tamahedi\AppData\Local\Temp\migraphx\simplify_reshapes1552374039121400.mxr"
: Error: C:/w/src/include\migraphx/check_shapes.hpp:220: same_dims: equal: Dimensions do not match
Error: Non-zero status code returned while running MGXKernel_graph_main_graph_6827965760175395044_0 node. Name:'MIGraphXExecutionProvider_MGXKernel_graph_main_graph_6827965760175395044_0_0' Status Message: Failed to call function
Ticket related to it: https://amd-hub.atlassian.net/browse/AIRADSW-59
MaxPool Conditional removal fixed ResNet50_int8 and Squeezenet_int8 errors.
MaskRCNN-12 had nonzero unsupported errors but these changes only led to another error:
: Error: C:/Users/taccuser/Documents/AMDMIGraphX/src/targets/gpu/include\migraphx/gpu/context.hpp:341: wait_for: Failed to record: context is destroyed
2026-02-27 10:19:20.9204205 [E:onnxruntime:, sequential_executor.cc:572 onnxruntime::ExecuteKernel] Non-zero status code returned while running MGXKernel_graph_torch-jit-export_15747441500071067602_0 node. Name:'MIGraphXExecutionProvider_MGXKernel_graph_torch-jit-export_15747441500071067602_0_0' Status Message: Failed to call function
Run failed:PerformanceRunner::RunOneIteration caught exception: Non-zero status code returned while running MGXKernel_graph_torch-jit-export_15747441500071067602_0 node. Name:'MIGraphXExecutionProvider_MGXKernel_graph_torch-jit-export_15747441500071067602_0_0' Status Message: Failed to call function
MaskRCNN-12-int8 originally had issues with maxpool and nonzero being unsupported. Now:
Error simplify_qdq: C:/w/src/include\migraphx/check_shapes.hpp:220: same_dims: quantizelinear: Dimensions do not match
Dump: "C:\Users\tamahedi\AppData\Local\Temp\migraphx\simplify_qdq1712991398399200.mxr"
: Error: C:/w/src/include\migraphx/check_shapes.hpp:220: same_dims: quantizelinear: Dimensions do not match
Error: Exception during initialization: Failed to call function
Originally the mentioned models here had a problem reporting MaxPool, NonZero or Range as unsupported. These are their later results.
All the models mentioned here work with cpu and dml ep.