-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[ONNX] Add dim_param support in export with onnx shape inference #44920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
💊 CI failures summary and remediationsAs of commit 2b54121 (more details on the Dr. CI page):
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. This comment has been revised 68 times. |
97a6e9a to
b5b4a0e
Compare
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
768ca81 to
4e5aa2e
Compare
facebook-github-bot
left a comment
There was a problem hiding this 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.
4e5aa2e to
b3b7574
Compare
|
rebased to resolve conflict. |
c2e764a to
0f70a20
Compare
spandantiwari
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
bcd6bbf to
6372c86
Compare
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
6372c86 to
2b54121
Compare
|
@bzinodev This PR has been approved and rebased, please help importing for merge. |
facebook-github-bot
left a comment
There was a problem hiding this 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.
…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
) (#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
dim_paramin ONNX by encoding asShapeSymbolinSymbolicShapeof outputs. If export is called withdynamic_axesprovided, shape inference will start with these axes set as dynamic.test_pytorch_onnx_shape_inference.py, reusing all test cases fromtest_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.