-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[ONNX] Fixed export for random #28470
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
|
@pytorchbot rebase this please |
torch/onnx/symbolic_opset9.py
Outdated
| return g.op('RandomNormalLike', self) | ||
|
|
||
|
|
||
| def rand_like(g, self, *others): |
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.
one of the args of these ops is dtype.
Can you add a Cast when necessary to make sure to match the desired type?
And maybe change one of the tests to set the dtype for a type other than float.
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.
Sure. Double was another type supported by torch.rand_like. I've added tests for that.
|
@lara-hdr can you please approve? |
lara-hdr
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
|
@neginraoof can you please merge this? |
|
cc @houseroad this PR is approved and ready. |
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
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.
LG
|
@houseroad is there a related failure? |
|
@houseroad merged this pull request in 364e525. |
|
This PR was reverted since it broke CIs. Could you resubmit the PR @neginraoof ? |
[ONNX] Fixed export for random generator ops