-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Add onnx export for floor, ceil, log2 and prim::shape #17895
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
9a6ae65 to
fd70d56
Compare
houseroad
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.
Thanks for the PR. Please address inline comments.
torch/onnx/symbolic.py
Outdated
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.
can we also add a test case for this one?
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.
done.
a6f3547 to
3001465
Compare
add test for prim_shape nit remove ceil, floor symbolic due to already resolved merge
3001465 to
48311d5
Compare
| return g.op('Div', log(g, self), g.op('Constant', value_t=torch.Tensor([_ln2]))) | ||
|
|
||
|
|
||
| def prim_shape(g, self): |
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.
Interesting, I am wondering why this would work with prim::shape node.
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.
I need to think about whether this is a good way to handle prim::nodes
houseroad
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.
Looks good.
Once we add support for custom domain op, we should refactor prim domain op.
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.
@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 8e77506. |
Summary: Pull Request resolved: pytorch#17895 Reviewed By: zrphercule Differential Revision: D15103396 Pulled By: houseroad fbshipit-source-id: 2ec80f11a19a8659aa496e68aed769a8dd1efb18
No description provided.