Skip to content

Add Xtensa HiFi optimizations for elementwise, logical, mul, and squared_difference kernels - #3666

Draft
unmeshna017 wants to merge 3 commits into
tensorflow:mainfrom
unmeshna017:xtensa-elementwise-logical
Draft

Add Xtensa HiFi optimizations for elementwise, logical, mul, and squared_difference kernels#3666
unmeshna017 wants to merge 3 commits into
tensorflow:mainfrom
unmeshna017:xtensa-elementwise-logical

Conversation

@unmeshna017

@unmeshna017 unmeshna017 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Adds xtensa-specific elementwise.cc, logical.cc, mul.cc, and squared_difference.cc kernels with HiFi-optimized implementations (xa_nn_elm_* NN library calls) for the elementwise unary ops (abs, sin, cos, log, sqrt, rsqrt, square), logical_not, and the binary MUL and SQUARED_DIFFERENCE operators.

@cad-audio @joshih-cad

Add xtensa-specific elementwise.cc and logical.cc kernels providing HiFi-optimized implementations (xa_nn_elm_*) for abs, sin, cos, log, sqrt, rsqrt, square, and logical_not. These same-name kernels auto-substitute the reference implementations via specialize_files.py.
@unmeshna017
unmeshna017 requested a review from a team as a code owner August 13, 2026 12:06
Add xtensa-specific mul.cc and squared_difference.cc kernels providing HiFi-optimized implementations for the MUL and SQUARED_DIFFERENCE operators. These same-name kernels auto-substitute the reference implementations via specialize_files.py.
@unmeshna017 unmeshna017 changed the title Add Xtensa HiFi optimizations for elementwise and logical kernels Add Xtensa HiFi optimizations for elementwise, logical, mul, and squared_difference kernels Aug 13, 2026
…nels

Add xtensa-specific comparisons.cc and maximum_minimum.cc kernels providing HiFi-optimized implementations for the relational operators (EQUAL, NOT_EQUAL, GREATER, GREATER_EQUAL, LESS, LESS_EQUAL) and MAXIMUM/MINIMUM. These same-name kernels auto-substitute the reference implementations via specialize_files.py.
@unmeshna017

Copy link
Copy Markdown
Contributor Author

Added comparisons.cc (EQUAL, NOT_EQUAL, GREATER, GREATER_EQUAL, LESS, LESS_EQUAL)
and maximum_minimum.cc (MAXIMUM, MINIMUM).

@unmeshna017
unmeshna017 marked this pull request as draft August 13, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant