Skip to content

Fix Gather to Split optimizer#14478

Merged
faxu merged 7 commits into
microsoft:mainfrom
xadupre:split18
Feb 2, 2023
Merged

Fix Gather to Split optimizer#14478
faxu merged 7 commits into
microsoft:mainfrom
xadupre:split18

Conversation

@xadupre
Copy link
Copy Markdown
Member

@xadupre xadupre commented Jan 30, 2023

Description

Gather to Split optimizer fails if opset == 18. This PR fixes one bug and extend unit tests.

Motivation and Context

The model produced by the optimizer does not follow onnx specifications with opset 18.

@xadupre xadupre added the core runtime issues related to core runtime label Jan 30, 2023
@xadupre xadupre changed the title Fix Gather to Split optimizer [WIP] Fix Gather to Split optimizer Jan 30, 2023
@xadupre xadupre changed the title [WIP] Fix Gather to Split optimizer Fix Gather to Split optimizer Jan 30, 2023
@xadupre xadupre added api issues related to all other APIs: C, C++, Python, etc. release:1.14 and removed api issues related to all other APIs: C, C++, Python, etc. labels Jan 30, 2023
@faxu faxu added the triage:approved Approved for cherrypicks for release label Jan 31, 2023
@pranavsharma pranavsharma requested a review from Lafi7e January 31, 2023 20:26

Node& split_node = graph.AddNode(graph.GenerateNodeName("Split"), "Split", "Split for Fused Gather nodes",
{node.MutableOutputDefs()[0]}, split_outputs);
{node.MutableOutputDefs()[0]}, indices_n_dims == 0 ? split_outputs: gather_outputs);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we don't need split_outputs when indices_n_dims is not 0, maybe we can put line from 124 to 140 to branch of "if (indices_n_dims == 0)" so that we don't need to create unused NodeArg to the graph by line 139?

@faxu faxu merged commit 0bcca7a into microsoft:main Feb 2, 2023
rui-ren pushed a commit that referenced this pull request Feb 3, 2023
### Description
Gather to Split optimizer fails if opset == 18. This PR fixes one bug
and extend unit tests.



### Motivation and Context
The model produced by the optimizer does not follow onnx specifications
with opset 18.
rui-ren pushed a commit that referenced this pull request Feb 3, 2023
### Description
Gather to Split optimizer fails if opset == 18. This PR fixes one bug
and extend unit tests.



### Motivation and Context
The model produced by the optimizer does not follow onnx specifications
with opset 18.
rui-ren pushed a commit that referenced this pull request Feb 3, 2023
### Description
Gather to Split optimizer fails if opset == 18. This PR fixes one bug
and extend unit tests.



### Motivation and Context
The model produced by the optimizer does not follow onnx specifications
with opset 18.
rui-ren pushed a commit that referenced this pull request Feb 3, 2023
### Description
Gather to Split optimizer fails if opset == 18. This PR fixes one bug
and extend unit tests.



### Motivation and Context
The model produced by the optimizer does not follow onnx specifications
with opset 18.
@faxu faxu removed the release:1.14 label Feb 7, 2023
@xadupre xadupre deleted the split18 branch November 7, 2024 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core runtime issues related to core runtime triage:approved Approved for cherrypicks for release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants