Skip to content

Conversation

@neginraoof
Copy link
Contributor

@neginraoof neginraoof commented Oct 22, 2019

[ONNX] Fixed export for random generator ops

@neginraoof
Copy link
Contributor Author

@pytorchbot rebase this please

return g.op('RandomNormalLike', self)


def rand_like(g, self, *others):
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@rajeevsrao
Copy link

@lara-hdr can you please approve?

Copy link
Contributor

@lara-hdr lara-hdr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rajeevsrao
Copy link

@neginraoof can you please merge this?

@neginraoof
Copy link
Contributor Author

cc @houseroad this PR is approved and ready.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a 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.

Copy link
Member

@houseroad houseroad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG

@neginraoof
Copy link
Contributor Author

@houseroad is there a related failure?

@facebook-github-bot
Copy link
Contributor

@houseroad merged this pull request in 364e525.

@houseroad
Copy link
Member

This PR was reverted since it broke CIs. Could you resubmit the PR @neginraoof ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants