-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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] Add DenseBincount kernel #7267
Conversation
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: 0 of 1 approvals obtained (waiting on @chunnienc and @Linchenn)
tfjs-backend-wasm/src/cc/kernels/DenseBincount.cc
line 32 at r1 (raw file):
template <typename T> inline void Bincount1D(const int32_t* x_buf, int32_t x_len, int32_t size,
this function could be shared with bincount op, should these two function be separated in a new file?
tfjs-backend-wasm/src/cc/kernels/DenseBincount.cc
line 60 at r1 (raw file):
bool binary_output, T* out_buf) { for (int32_t i = 0; i < x_shape_0; ++i) { Bincount1D(x_buf + i * x_shape_1, x_shape_1, size,
good refactoring, nicely done!
I will move them to Bincount.h in the PR adding the bincount op/kernel later. |
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 @chunnienc)
To see the logs from the Cloud Build CI, please join either our discussion or announcement mailing list.
This change is