Skip to content
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

Adding Bernoulli operator #3431

Merged
merged 18 commits into from
Jun 17, 2021
Merged

Adding Bernoulli operator #3431

merged 18 commits into from
Jun 17, 2021

Conversation

hwangdeyu
Copy link
Contributor

Adding new operator "Bernoulli" to ONNX.
This op is needed for HuggingFace Transformer model export from ORTModule.

@hwangdeyu hwangdeyu requested review from a team as code owners April 16, 2021 14:02
@CLAassistant
Copy link

CLAassistant commented Apr 16, 2021

CLA assistant check
All committers have signed the CLA.

@gramalingam
Copy link
Contributor

It looks like it might be possible to define this as a function using RandomUniformLike? E.g., using Where(random < input, 0, 1) or something like that. If so, it would be better to define it as a function.

@gramalingam gramalingam added the operator Issues related to ONNX operators label Apr 30, 2021
@hwangdeyu hwangdeyu force-pushed the deyu/bernoulli branch 4 times, most recently from dd77ee5 to 640ebd8 Compare May 11, 2021 06:21
@askhade
Copy link
Contributor

askhade commented May 12, 2021

How did you generate the test data? The .py should also be checked in along with this PR

@askhade
Copy link
Contributor

askhade commented May 12, 2021

this op should be registered in operator_sets.h

@askhade
Copy link
Contributor

askhade commented May 12, 2021

please also add shape inference test for this op

@hwangdeyu
Copy link
Contributor Author

hwangdeyu commented May 13, 2021

How did you generate the test data? The .py should also be checked in along with this PR

Thanks for the good catch.
Sorry for deleting the test and registered code in once a rebase master branch and force-pushed git behavior.
Now I added those logic again.

@hwangdeyu
Copy link
Contributor Author

@gramalingam @askhade
All the CI failures are passed, do you have other comments?
Thanks!

@hwangdeyu
Copy link
Contributor Author

@postrational Would you also convenient to help us review this Bernoulli spec PR? Thanks!

hwangdeyu added 4 commits May 24, 2021 18:20
Signed-off-by: hwangdeyu <deyhuang@qq.com>
Signed-off-by: hwangdeyu <deyhuang@qq.com>
Signed-off-by: hwangdeyu <deyhuang@qq.com>
Signed-off-by: hwangdeyu <deyhuang@qq.com>
hwangdeyu added 3 commits May 24, 2021 18:20
Signed-off-by: hwangdeyu <deyhuang@qq.com>
Signed-off-by: hwangdeyu <deyhuang@qq.com>
Signed-off-by: hwangdeyu <deyhuang@qq.com>
@hwangdeyu
Copy link
Contributor Author

@gramalingam @askhade
Please let me know if we can approve and merge the PR.
Thanks!

@askhade askhade added this to the 1.10 milestone Jun 3, 2021
hwangdeyu and others added 9 commits June 17, 2021 16:41
Signed-off-by: hwangdeyu <deyhuang@qq.com>
Signed-off-by: hwangdeyu <deyhuang@qq.com>
Signed-off-by: hwangdeyu <deyhuang@qq.com>
Signed-off-by: hwangdeyu <deyhuang@qq.com>
Signed-off-by: hwangdeyu <deyhuang@qq.com>
Signed-off-by: hwangdeyu <deyhuang@qq.com>
Signed-off-by: hwangdeyu <deyhuang@qq.com>
Signed-off-by: hwangdeyu <dejack953@outlook.com>
@gramalingam gramalingam merged commit edd0878 into onnx:master Jun 17, 2021
@hwangdeyu hwangdeyu deleted the deyu/bernoulli branch August 3, 2021 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
operator Issues related to ONNX operators
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants