Skip to content

Conversation

@yuslepukhin
Copy link
Member

@yuslepukhin yuslepukhin commented Nov 16, 2023

Description

Truncate traling non-existing arguments.
Make sure we do not skip on the non-existing arguments in the middle,
because shape inferece relies on their proper position.
This also affects the argument position in the Edges that must be properly rebuilt
each time If node branch is inlined.
Make sure that when we rename Defs in subgraphs, new renamed defs are created in those subgraphs
instead of pointing to outer scope defs.
Add unit test.

Motivation and Context

This is a follow up for #18105
Currently, the non-trailing arguments are simply ignored and the edges are created
with potentially incorrect positions.

Copy link
Contributor

@pranavsharma pranavsharma left a comment

Choose a reason for hiding this comment

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

Do you've a test case?

  Make sure we do not skip on the non-existing arguments in the middle,
  because shape inferece relies on their proper position.
  This also affects the argument position in the Edges that must be properly rebuilt
  each time If node branch is inlined.
  Make sure that when we rename Defs in subgraphs, new renamed defs are created in those subgraphs
  instead of pointing to outer scope defs.
  Add unit test.
@yuslepukhin yuslepukhin changed the title Create edges with arg posisitons correctly accounting for non-existing args Create edges with arg positons correctly accounting for non-existing args Nov 17, 2023
@yuslepukhin yuslepukhin merged commit cc54202 into main Nov 20, 2023
@yuslepukhin yuslepukhin deleted the yuslepukhin/if_edges branch November 20, 2023 22:49
kleiti pushed a commit to kleiti/onnxruntime that referenced this pull request Mar 22, 2024
…args (microsoft#18462)

### Description
Truncate traling non-existing arguments.
  Make sure we do not skip on the non-existing arguments in the middle,
  because shape inferece relies on their proper position.
This also affects the argument position in the Edges that must be
properly rebuilt
  each time If node branch is inlined.
Make sure that when we rename Defs in subgraphs, new renamed defs are
created in those subgraphs
  instead of pointing to outer scope defs.
  Add unit test.

### Motivation and Context
This is a follow up for
microsoft#18105
Currently, the non-trailing arguments are simply ignored and the edges
are created
with potentially incorrect positions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants