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
[wasm] added reciprocal op support for wasm #6992
Conversation
#include "tfjs-backend-wasm/src/cc/unary.h" | ||
|
||
namespace { | ||
float reciprocal(const float a) { return 1 / a; } |
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.
Nit: Do we need to account for divide by zero? I assume we're not supporting that yet since we don't propagate NaNs.
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!
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.
Reviewable status: complete! 2 of 1 approvals obtained (waiting on @mattsoulanille)
tfjs-backend-wasm/src/cc/kernels/Reciprocal.cc
line 25 at r1 (raw file):
Previously, mattsoulanille (Matthew Soulanille) wrote…
Nit: Do we need to account for divide by zero? I assume we're not supporting that yet since we don't propagate NaNs.
In core, there is a NaN propagation test.
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.
Reviewable status: complete! 2 of 1 approvals obtained (waiting on @mattsoulanille)
tfjs-backend-wasm/src/cc/kernels/Reciprocal.cc
line 25 at r1 (raw file):
Previously, pyu10055 (Ping Yu) wrote…
In core, there is a NaN propagation test.
as well as Infinity test
fixed #6971
To see the logs from the Cloud Build CI, please join either our discussion or announcement mailing list.
This change is