set node schema when apply NHWC transformer#13660
Merged
Conversation
skottmckay
reviewed
Nov 22, 2022
|
|
||
| onnx_layout_transformation::SwapNodeOpTypeAndDomain(*api_graph, *node, node->OpType(), kMSInternalNHWCDomain); | ||
| [[maybe_unused]] auto new_node_ref = | ||
| onnx_layout_transformation::SwapNodeOpTypeAndDomain(*api_graph, *node, node->OpType(), kMSInternalNHWCDomain); |
Contributor
There was a problem hiding this comment.
typically we'd add
ORT_UNUSED_PARAMETER(new_node_ref);
but if all the builds pass with maybe_unused that seems fine as well. only difference would be that if the value becomes unused in the #if as well that wouldn't be noticed. probably doesn't matter though.
simon-moo
pushed a commit
to simon-moo/onnxruntime
that referenced
this pull request
Dec 26, 2022
### Description set node schema when apply NHWC transformer ### Motivation and Context The implementation in `IExecutionProvider::GetCapability()` checks node schema to determine the capability of the current EP. If NHWC graph transformer created a new channel last `Conv` node to replace the channel first `Conv` node, we need to assign the schema to the replaced node.
fs-eire
added a commit
that referenced
this pull request
Jan 28, 2023
### Description as a more generic solution to #13660, always set OpSchema in CreateNodeHelper() so that added nodes by transformers will have OpSchema set ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. -->
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
set node schema when apply NHWC transformer
Motivation and Context
The implementation in
IExecutionProvider::GetCapability()checks node schema to determine the capability of the current EP. If NHWC graph transformer created a new channel lastConvnode to replace the channel firstConvnode, we need to assign the schema to the replaced node.