Xtensa: HIFI opt paths for add/sub/quantize/dequantize/strided_slice - #3642
Open
unmeshna017 wants to merge 2 commits into
Open
Xtensa: HIFI opt paths for add/sub/quantize/dequantize/strided_slice#3642unmeshna017 wants to merge 2 commits into
unmeshna017 wants to merge 2 commits into
Conversation
…ation Move the explicit Xtensa kernel source list from xtensa_makefile.inc into ext_libs/xtensa.inc and extend it with the split float/int reference kernels (conv, depthwise_conv, fully_connected, pooling, reduce). Add a FLOAT_OPT_FLAG build path and an INCLUDE_FLOAT_OPT gate driven by the core's VFPU capability. - xtensa.h: gate INCLUDE_FLOAT_OPT on VFPU + FLOAT_OPT_FLAG, add HIFI_IQ to the nnlib include guard, and restore the hifimini/fixedpoint_utils.h include path. - xtensa_makefile.inc: add XTENSA_INCLUDE_FLOAT_OPT / -DFLOAT_OPT_FLAG, map hifi3/3z/fusion_f1/hifi1 to -DHIFI4, and restructure the LSTM/DECODE sources. - xtensa.inc: add hifi_iq target, HIFI_SIMD_WIDTH, NDSP includes, and FFT paths. - xtensa_download.sh: apply per-arch NNLib patches (xa_nnlib_<arch>.patch) and switch the patch guard to a file-existence check. - Restore hifimini svdf.cc and fully_connected.cc kernels.
Route ADD, SUB, QUANTIZE, DEQUANTIZE, and STRIDED_SLICE through the Xtensa NNLib kernels on HIFI3/HIFI4/HIFI5 (and HIFI_IQ) targets, with reference fallbacks preserved for all other configurations. - add.cc / sub.cc: add INCLUDE_FLOAT_OPT float32 broadcast paths (xa_nn_elm_add/sub_broadcast_4D_f32xf32_f32) and int8/int16 quantized broadcast paths; sub.cc fixes the input2 broadcast offset (inp2_off) and changes EvalSub to return TfLiteStatus. - quantize.cc: add xa_nn_elm_requantize_* fast paths for asym8s/asym16s outputs with reference fallbacks, and replace the unsupported-type error with EvalQuantizeReference. - dequantize.cc: gate the int8/int16 xa_nn_elm_dequantize_*_f32 paths on INCLUDE_FLOAT_OPT (replacing the older HIFI_VFPU macro). - strided_slice.cc: add int8/int32 HIFI paths alongside the existing int16 path (xa_nn_strided_slice_int8/int16/int32).
Contributor
|
@ddavis-2015 @veblush Please review this PR |
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.
BUG=NA
Adding @cad-audio and @joshih-cad for review