[ONNX] Enable constant folding for Shape#35386
[ONNX] Enable constant folding for Shape#35386KsenijaS wants to merge 14 commits intopytorch:masterfrom
Conversation
💊 CircleCI build failures summary and remediationsAs of commit 77c327d (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no CircleCI failures yet. 💚 💚 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. This comment has been revised 37 times. |
|
Also, please check the failures. Looks like test test/onnx/test_operators.py TestOperators.test_expand is failing. |
neginraoof
left a comment
There was a problem hiding this comment.
Thanks for the fixes. Please check if there's an onnxruntime test for shape and add that if not.
facebook-github-bot
left a comment
There was a problem hiding this comment.
@houseroad has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
@houseroad can you merge this PR? |
|
@KsenijaS could you rebase this PR please? |
|
@houseroad can you please review my PR, it seems that none of the failure are caused by my changes |
houseroad
left a comment
There was a problem hiding this comment.
not sure why we need to change onnx::gather part
| return c10::optional<at::Tensor>(updated_val); | ||
| } else if (node->kind() == onnx::Gather) { | ||
| assert(inputTensorValues.size() == 1); | ||
| assert(inputTensorValues.size() == 2); |
There was a problem hiding this comment.
gather has 2 inputs, that's why my tests were failing
There was a problem hiding this comment.
This was a bug in gather implementation for constant folding. This node is required to have 2 inputs always (Note that this assertion as not blocking tests on CI, and was caught locally).
There was a problem hiding this comment.
@houseroad if you have no further comments, can this PR be merged?
|
@houseroad can we merge this PR? |
BowenBao
left a comment
There was a problem hiding this comment.
LGTM, please update assert to TORCH_INTERNAL_ASSERT
facebook-github-bot
left a comment
There was a problem hiding this comment.
@houseroad has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
@houseroad merged this pull request in 4f728c9. |
1 similar comment
|
@houseroad merged this pull request in 4f728c9. |
Summary: Enabled constant folding for onnx::Shape Pull Request resolved: pytorch#35386 Reviewed By: hl475 Differential Revision: D20682412 Pulled By: houseroad fbshipit-source-id: 4559a35f174edfb7e6364c0fbf5bc1d55d0d26dc
Summary: Enabled constant folding for onnx::Shape Pull Request resolved: pytorch#35386 Reviewed By: hl475 Differential Revision: D20682412 Pulled By: houseroad fbshipit-source-id: 4559a35f174edfb7e6364c0fbf5bc1d55d0d26dc
Enabled constant folding for onnx::Shape