KEMBAR78
[ONNX] shape type inference fixes for control flow by BowenBao · Pull Request #59319 · pytorch/pytorch · GitHub
Skip to content

Conversation

@BowenBao
Copy link
Collaborator

@BowenBao BowenBao commented Jun 2, 2021

  • Allow shape inference to skip for blocks by checking unsupported cases recursively. Currently onnx::Identity would trigger a shape inference failure. Fixed in onnx submodule 1.9.
  • Remove previous special post process for if op, since that was for constant folding, and now it is handled elsewhere. Update new post process for control flow nodes to copy assign node shape from subblock output shape correctly.

@facebook-github-bot facebook-github-bot added cla signed oncall: jit Add this issue/PR to JIT oncall triage queue labels Jun 2, 2021
@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Jun 2, 2021

💊 CI failures summary and remediations

As of commit e31dfa1 (more details on the Dr. CI page):


  • 1/1 failures possibly* introduced in this PR
    • 1/1 non-scanned failure(s)

ci.pytorch.org: 1 failed


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@BowenBao BowenBao force-pushed the onnx_control_flow_special_case branch from 01244f9 to e31dfa1 Compare June 7, 2021 19:49
@jiafatom
Copy link
Contributor

Can we have a unit test for this? the onnx::Identity failure case

@BowenBao
Copy link
Collaborator Author

Can we have a unit test for this? the onnx::Identity failure case

Updated the description, onnx::identity fix no longer needed with onnx update.

Copy link
Collaborator

@shubhambhokare1 shubhambhokare1 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@neginraoof neginraoof left a comment

Choose a reason for hiding this comment

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

Thanks!

@BowenBao BowenBao merged commit c68a0e8 into pytorch:onnx_ms_1 Jun 17, 2021
BowenBao added a commit that referenced this pull request Jun 18, 2021
* ~~Allow shape inference to skip for blocks by checking unsupported cases recursively. Currently onnx::Identity would trigger a shape inference failure.~~ Fixed in onnx submodule 1.9.
* Remove previous special post process for if op, since that was for constant folding, and now it is handled elsewhere. Update new post process for control flow nodes to copy assign node shape from subblock output shape correctly.

Co-authored-by: BowenBao <bowbao@microsoft.com>
BowenBao added a commit that referenced this pull request Jun 18, 2021
* ~~Allow shape inference to skip for blocks by checking unsupported cases recursively. Currently onnx::Identity would trigger a shape inference failure.~~ Fixed in onnx submodule 1.9.
* Remove previous special post process for if op, since that was for constant folding, and now it is handled elsewhere. Update new post process for control flow nodes to copy assign node shape from subblock output shape correctly.

Co-authored-by: BowenBao <bowbao@microsoft.com>

[ghstack-poisoned]
BowenBao added a commit that referenced this pull request Jun 18, 2021
* ~~Allow shape inference to skip for blocks by checking unsupported cases recursively. Currently onnx::Identity would trigger a shape inference failure.~~ Fixed in onnx submodule 1.9.
* Remove previous special post process for if op, since that was for constant folding, and now it is handled elsewhere. Update new post process for control flow nodes to copy assign node shape from subblock output shape correctly.

Co-authored-by: BowenBao <bowbao@microsoft.com>

[ghstack-poisoned]
BowenBao added a commit that referenced this pull request Jun 21, 2021
* ~~Allow shape inference to skip for blocks by checking unsupported cases recursively. Currently onnx::Identity would trigger a shape inference failure.~~ Fixed in onnx submodule 1.9.
* Remove previous special post process for if op, since that was for constant folding, and now it is handled elsewhere. Update new post process for control flow nodes to copy assign node shape from subblock output shape correctly.

Co-authored-by: BowenBao <bowbao@microsoft.com>

[ghstack-poisoned]
BowenBao added a commit that referenced this pull request Jun 22, 2021
* ~~Allow shape inference to skip for blocks by checking unsupported cases recursively. Currently onnx::Identity would trigger a shape inference failure.~~ Fixed in onnx submodule 1.9.
* Remove previous special post process for if op, since that was for constant folding, and now it is handled elsewhere. Update new post process for control flow nodes to copy assign node shape from subblock output shape correctly.

Co-authored-by: BowenBao <bowbao@microsoft.com>

[ghstack-poisoned]
BowenBao added a commit that referenced this pull request Jun 22, 2021
* ~~Allow shape inference to skip for blocks by checking unsupported cases recursively. Currently onnx::Identity would trigger a shape inference failure.~~ Fixed in onnx submodule 1.9.
* Remove previous special post process for if op, since that was for constant folding, and now it is handled elsewhere. Update new post process for control flow nodes to copy assign node shape from subblock output shape correctly.

Co-authored-by: BowenBao <bowbao@microsoft.com>

[ghstack-poisoned]
BowenBao added a commit that referenced this pull request Jun 23, 2021
* ~~Allow shape inference to skip for blocks by checking unsupported cases recursively. Currently onnx::Identity would trigger a shape inference failure.~~ Fixed in onnx submodule 1.9.
* Remove previous special post process for if op, since that was for constant folding, and now it is handled elsewhere. Update new post process for control flow nodes to copy assign node shape from subblock output shape correctly.

Co-authored-by: BowenBao <bowbao@microsoft.com>

[ghstack-poisoned]
BowenBao added a commit that referenced this pull request Jun 25, 2021
* ~~Allow shape inference to skip for blocks by checking unsupported cases recursively. Currently onnx::Identity would trigger a shape inference failure.~~ Fixed in onnx submodule 1.9.
* Remove previous special post process for if op, since that was for constant folding, and now it is handled elsewhere. Update new post process for control flow nodes to copy assign node shape from subblock output shape correctly.

Co-authored-by: BowenBao <bowbao@microsoft.com>

[ghstack-poisoned]
BowenBao added a commit that referenced this pull request Jun 30, 2021
* ~~Allow shape inference to skip for blocks by checking unsupported cases recursively. Currently onnx::Identity would trigger a shape inference failure.~~ Fixed in onnx submodule 1.9.
* Remove previous special post process for if op, since that was for constant folding, and now it is handled elsewhere. Update new post process for control flow nodes to copy assign node shape from subblock output shape correctly.

Co-authored-by: BowenBao <bowbao@microsoft.com>

[ghstack-poisoned]
BowenBao added a commit that referenced this pull request Jul 6, 2021
* ~~Allow shape inference to skip for blocks by checking unsupported cases recursively. Currently onnx::Identity would trigger a shape inference failure.~~ Fixed in onnx submodule 1.9.
* Remove previous special post process for if op, since that was for constant folding, and now it is handled elsewhere. Update new post process for control flow nodes to copy assign node shape from subblock output shape correctly.

Co-authored-by: BowenBao <bowbao@microsoft.com>

Differential Revision: [D29494913](https://our.internmc.facebook.com/intern/diff/D29494913)

[ghstack-poisoned]
facebook-github-bot pushed a commit that referenced this pull request Jul 8, 2021
Summary:
Pull Request resolved: #60248

* ~~Allow shape inference to skip for blocks by checking unsupported cases recursively. Currently onnx::Identity would trigger a shape inference failure.~~ Fixed in onnx submodule 1.9.
* Remove previous special post process for if op, since that was for constant folding, and now it is handled elsewhere. Update new post process for control flow nodes to copy assign node shape from subblock output shape correctly.

Test Plan: Imported from OSS

Reviewed By: zou3519, ZolotukhinM

Differential Revision: D29494913

Pulled By: SplitInfinity

fbshipit-source-id: de274a388df86e86403981e1b89b8b4a0d1e26d1

Co-authored-by: BowenBao <bowbao@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed oncall: jit Add this issue/PR to JIT oncall triage queue open source

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants