mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-23 19:32:23 +00:00
Add support for opset 11 in reshape fusion (#2592)
Support opset verion 11 in reshape fusion
This commit is contained in:
parent
35ceb1a6a6
commit
6858f0a06a
1 changed files with 5 additions and 5 deletions
|
|
@ -72,7 +72,7 @@ bool ReshapeFusion::Fuse_Subgraph1(Node& reshape, Graph& graph, const logging::L
|
|||
}
|
||||
const Node& concat = *p_concat;
|
||||
|
||||
if (!graph_utils::IsSupportedOptypeVersionAndDomain(concat, "Concat", {1, 4})) {
|
||||
if (!graph_utils::IsSupportedOptypeVersionAndDomain(concat, "Concat", {1, 4, 11})) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -83,8 +83,8 @@ bool ReshapeFusion::Fuse_Subgraph1(Node& reshape, Graph& graph, const logging::L
|
|||
|
||||
// path 1: [Root] --> Shape --> Gather(indices=0) --> Unsqueeze (axes=0) --> Concat [input 0]
|
||||
std::vector<graph_utils::EdgeEndToMatch> parent_path{
|
||||
{0, 0, "Unsqueeze", {1}, kOnnxDomain},
|
||||
{0, 0, "Gather", {1}, kOnnxDomain},
|
||||
{0, 0, "Unsqueeze", {1, 11}, kOnnxDomain},
|
||||
{0, 0, "Gather", {1, 11}, kOnnxDomain},
|
||||
{0, 0, "Shape", {1}, kOnnxDomain}};
|
||||
|
||||
std::vector<const Node::EdgeEnd*> edges;
|
||||
|
|
@ -114,8 +114,8 @@ bool ReshapeFusion::Fuse_Subgraph1(Node& reshape, Graph& graph, const logging::L
|
|||
|
||||
// path 2: [Root] --> Shape --> Gather(indices=1) --> Unsqueeze (axes=0) --> Concat [input 1]
|
||||
std::vector<graph_utils::EdgeEndToMatch> parent_path2 {
|
||||
{0, 1, "Unsqueeze", {1}, kOnnxDomain},
|
||||
{0, 0, "Gather", {1}, kOnnxDomain},
|
||||
{0, 1, "Unsqueeze", {1, 11}, kOnnxDomain},
|
||||
{0, 0, "Gather", {1, 11}, kOnnxDomain},
|
||||
{0, 0, "Shape", {1}, kOnnxDomain}};
|
||||
|
||||
if (!graph_utils::FindPath(concat, true, parent_path2, edges, logger)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue