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

[WASM] Use XNNPack for div #3480

Merged
merged 2 commits into from Jun 25, 2020
Merged

[WASM] Use XNNPack for div #3480

merged 2 commits into from Jun 25, 2020

Conversation

pvaneck
Copy link
Contributor

@pvaneck pvaneck commented Jun 19, 2020

This will allow full broadcasting support for float32 tensor division. I ran into issues when doing basic training using the Layers API with WASM due to the lack of broadcasting support for div, so switching to xnnpack will at least allow it for floats.

Broadcasting for binary ops don't work with non-float tensors, so added a check for the float data type in registerBinaryKernel kernelFunc (so that trying to broadcast int32 tensors with something like mul or sub doesn't produce erroneous results like it does now).


This change is Reviewable

This will allow full broadcasting support for float32 tensor division.
@pvaneck pvaneck changed the title [WASM} Use XNNPack for div [WASM] Use XNNPack for div Jun 19, 2020
Copy link
Collaborator

@annxingyuan annxingyuan left a comment

Choose a reason for hiding this comment

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

Awesome. Thanks @pvaneck !

@annxingyuan annxingyuan merged commit b7a28db into tensorflow:master Jun 25, 2020
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.

None yet

3 participants