-
Notifications
You must be signed in to change notification settings - Fork 9
MIGX EP Subgraph debug fixes and cleanup for unsupported ops #196
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
MIGX EP Subgraph debug fixes and cleanup for unsupported ops #196
Conversation
Should make debugging easier more clear before we start getting into subGraph optimization, splits and partitioning. Especially important when there's cases where say a subgraph has inputs that seemingly error out and can't be evaluated correctly as the input isn't found but exists in the parent graph (As seen with the IF operator)
Should be clear which node and corresponding input is being filtered out by the MIGraphX EP. This is useful to hunt down operators who may be either malformed or incorrectly handled due to subgraphs/splits/partitioning
Put this logic behind dump_model_as_onnx call to avoid repeated code .
|
This will supersede - #195 |
| return isInputNode(n, input_name); | ||
| }); | ||
| if (nit == in_nodes.end()) { | ||
| LOGS_DEFAULT(WARNING) << "Node:" << node->Name() << " Input:" << input_name << " Can't Find node to name"; |
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.
| LOGS_DEFAULT(WARNING) << "Node:" << node->Name() << " Input:" << input_name << " Can't Find node to name"; | |
| LOGS_DEFAULT(WARNING) << "Node:" << node->Name() << " Input:" << input_name << " Cannot find node to name"; |
| "SimplifiedLayerNormalization", | ||
| "Sin", | ||
| "Sinh", | ||
| "Size", |
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.
Question; Is this needed for other changes in this? Wondering if it makes more sense to add this in a separate PR.
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.
Its a one line change it was needed for a customer. Bundling all that work into on PR.
| // if graph is split we dont know if output is used so we need this, otherwise if the graph isn't split | ||
| // then we can safely assume this output is a dangling output from a node and to discard it as part of the | ||
| // final graph output | ||
| if (is_graph_split) { | ||
| output_names.push_back(name); | ||
| } |
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.
Is there a change you made here? Seems identical except the format of braces.
Not sure why the comment is also showing as a change.
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.
Formatting with lintrunner
|
|
||
| // Input cannot be constant folded | ||
| if (IsGraphInput(graph, input_name)) { | ||
| LOGS_DEFAULT(WARNING) << "Node:" << node->Name() << " Input:" << input_name << " Can't be const folded"; |
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.
| LOGS_DEFAULT(WARNING) << "Node:" << node->Name() << " Input:" << input_name << " Can't be const folded"; | |
| LOGS_DEFAULT(WARNING) << "Node:" << node->Name() << " Input:" << input_name << " Cannot be const folded"; |
| } | ||
|
|
||
| if (!canEvalShapeGeneral(graph, *nit, input_nodes)) { | ||
| LOGS_DEFAULT(WARNING) << "Node:" << node->Name() << " Input:" << input_name << " Can't eval shape"; |
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.
| LOGS_DEFAULT(WARNING) << "Node:" << node->Name() << " Input:" << input_name << " Can't eval shape"; | |
| LOGS_DEFAULT(WARNING) << "Node:" << node->Name() << " Input:" << input_name << " Cannot eval shape"; |
|
@apwojcik should cherry pick this to wml main since it has the debug code broken away from the dump_model_ops if you're hitting unsupported ops or issues with preprocessing operators with invalid inputs for some of the newer graphs seen on the windows/UAI side. |
c4e1e69
into
rocm7.1_internal_testing
Description
Motivation and Context
Changes found for control flow, size operator and other debug fixes and cleanup
We want to be clear there's an unsupported op in the run on initial get capabilities to be clear where graph break occur
The requiring dump model ops code wasn't clear to use when we have unsupported ops to the user if there is missing support
Added some additional debug output (warnings) if an input op isn't supported due to issues with evaluation. This isn't obvious if an operator fails due to shape or const tensor inputs.