Add Xtensa HiFi optimizations for elementwise, logical, mul, and squared_difference kernels - #3666
Draft
unmeshna017 wants to merge 3 commits into
Draft
Add Xtensa HiFi optimizations for elementwise, logical, mul, and squared_difference kernels#3666unmeshna017 wants to merge 3 commits into
unmeshna017 wants to merge 3 commits into
Conversation
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.
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.
…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.
Contributor
Author
|
Added comparisons.cc (EQUAL, NOT_EQUAL, GREATER, GREATER_EQUAL, LESS, LESS_EQUAL) |
unmeshna017
marked this pull request as draft
August 13, 2026 13:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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