-
Notifications
You must be signed in to change notification settings - Fork 24.2k
[ONNX] Handle dynamic input axes for prim_ConstantChunk #48176
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 1929925 (more details on the Dr. CI page):
Extra GitHub checks: 1 failed
codecov.io: 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 20 times. |
Codecov Report
@@ Coverage Diff @@
## master #48176 +/- ##
==========================================
- Coverage 80.92% 80.92% -0.01%
==========================================
Files 1855 1855
Lines 200195 200224 +29
==========================================
+ Hits 162009 162025 +16
- Misses 38186 38199 +13 |
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
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.
When converting a model that uses
torch.chunk
, it does not work when we have a dynamic input axes, becauseSplit
split attr is static for opset 11. Therefore, we convert it usingSlice
(support opset 11+). This PR also handles the cases that the input axes cannot be divided by the number of outputs. Pytorch works a way that fit the first (n-1) outputs for the same dim, and remaining for the last one. Added UT for it.The existing code on
sequence
split
cannot be leveraged here, becausestart
,end
ofSlice
are static there, but dynamic here.