Skip to content

Conversation

@BowenBao
Copy link
Collaborator

  • Support propagating dim_param in ONNX by encoding as ShapeSymbol in SymbolicShape of outputs. If export is called with dynamic_axes provided, shape inference will start with these axes set as dynamic.
  • Add new test file test_pytorch_onnx_shape_inference.py, reusing all test cases from test_pytorch_onnx_onnxruntime.py, but focus on validating shape for all nodes in graph. Currently this is not enabled in the CI, since there are still quite some existing issues and corner cases to fix. The test is default to run only at opset 12.
  • Bug fixes, such as div, _len, and peephole.cpp passes for PackPadded, and LogSoftmaxCrossEntropy.
  • This PR depends on existing PR such as 44332.

@BowenBao BowenBao requested a review from apaszke as a code owner September 17, 2020 23:45
@facebook-github-bot facebook-github-bot added the oncall: jit Add this issue/PR to JIT oncall triage queue label Sep 17, 2020
@BowenBao BowenBao added the module: onnx Related to torch.onnx label Sep 17, 2020
@dr-ci
Copy link

dr-ci bot commented Sep 17, 2020

💊 CI failures summary and remediations

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


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

Extra GitHub checks: 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 on the GitHub issue tracker or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 68 times.

@gchanan gchanan added this to the 1.7.0 milestone Sep 21, 2020
@BowenBao BowenBao force-pushed the onnx_shape_inf_dim_param branch from 97a6e9a to b5b4a0e Compare September 21, 2020 22:34
@codecov
Copy link

codecov bot commented Sep 22, 2020

Codecov Report

Merging #44920 into master will decrease coverage by 0.00%.
The diff coverage is 68.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #44920      +/-   ##
==========================================
- Coverage   68.56%   68.56%   -0.01%     
==========================================
  Files         405      405              
  Lines       51969    51979      +10     
==========================================
+ Hits        35634    35639       +5     
- Misses      16335    16340       +5     
Impacted Files Coverage Δ
torch/onnx/symbolic_opset9.py 35.56% <ø> (ø)
torch/onnx/symbolic_helper.py 42.81% <50.00%> (+0.04%) ⬆️
torch/onnx/symbolic_opset11.py 22.70% <50.00%> (ø)
torch/onnx/utils.py 71.76% <73.33%> (-0.31%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6375704...2b54121. Read the comment docs.

@ailzhang ailzhang requested a review from bzinodev September 22, 2020 20:04
@ailzhang ailzhang added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Sep 22, 2020
@BowenBao BowenBao force-pushed the onnx_shape_inf_dim_param branch from 768ca81 to 4e5aa2e Compare September 24, 2020 21:51
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@bzinodev has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@BowenBao BowenBao force-pushed the onnx_shape_inf_dim_param branch from 4e5aa2e to b3b7574 Compare September 28, 2020 18:05
@BowenBao
Copy link
Collaborator Author

rebased to resolve conflict.

@BowenBao BowenBao force-pushed the onnx_shape_inf_dim_param branch from c2e764a to 0f70a20 Compare September 28, 2020 23:14
Copy link

@spandantiwari spandantiwari left a comment

Choose a reason for hiding this comment

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

LGTM.

@BowenBao BowenBao force-pushed the onnx_shape_inf_dim_param branch from bcd6bbf to 6372c86 Compare September 29, 2020 16:55
remove prints

remove debug prints

clang format

fix flake8, remove old outdated code

unrelated clang tidy

clang-tidy

clang-tidy

clang format

fix windows build

merge changes

add second pass shape inference to increase coverage

clang format

update to comments
@BowenBao BowenBao force-pushed the onnx_shape_inf_dim_param branch from 6372c86 to 2b54121 Compare September 29, 2020 23:29
@BowenBao
Copy link
Collaborator Author

@bzinodev This PR has been approved and rebased, please help importing for merge.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@bzinodev has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@bzinodev merged this pull request in 3da4cea.

BowenBao added a commit to BowenBao/pytorch that referenced this pull request Oct 2, 2020
…orch#44920)

Summary:
* Support propagating `dim_param` in ONNX by encoding as `ShapeSymbol` in `SymbolicShape` of outputs. If export is called with `dynamic_axes` provided, shape inference will start with these axes set as dynamic.
* Add new test file `test_pytorch_onnx_shape_inference.py`, reusing all test cases from `test_pytorch_onnx_onnxruntime.py`, but focus on validating shape for all nodes in graph. Currently this is not enabled in the CI, since there are still quite some existing issues and corner cases to fix. The test is default to run only at opset 12.
* Bug fixes, such as div, _len, and peephole.cpp passes for PackPadded, and LogSoftmaxCrossEntropy.
* This PR depends on existing PR such as 44332.

Pull Request resolved: pytorch#44920

Reviewed By: eellison

Differential Revision: D23958398

Pulled By: bzinodev

fbshipit-source-id: 00479d9bd19c867d526769a15ba97ec16d56e51d
soumith pushed a commit that referenced this pull request Oct 6, 2020
) (#45755)

Summary:
* Support propagating `dim_param` in ONNX by encoding as `ShapeSymbol` in `SymbolicShape` of outputs. If export is called with `dynamic_axes` provided, shape inference will start with these axes set as dynamic.
* Add new test file `test_pytorch_onnx_shape_inference.py`, reusing all test cases from `test_pytorch_onnx_onnxruntime.py`, but focus on validating shape for all nodes in graph. Currently this is not enabled in the CI, since there are still quite some existing issues and corner cases to fix. The test is default to run only at opset 12.
* Bug fixes, such as div, _len, and peephole.cpp passes for PackPadded, and LogSoftmaxCrossEntropy.
* This PR depends on existing PR such as 44332.

Pull Request resolved: #44920

Reviewed By: eellison

Differential Revision: D23958398

Pulled By: bzinodev

fbshipit-source-id: 00479d9bd19c867d526769a15ba97ec16d56e51d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged module: onnx Related to torch.onnx oncall: jit Add this issue/PR to JIT oncall triage queue open source triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants