CI broken because cusom optimizations are missing from the code base.
24-bit cores (HiFi mini, HiFi2, HiFi EP) are being replace by 32-bit cores,
so optimizations are being remove for now. If optimizations are ever needed,
it's recommended to use whatever is available in Cadence's Nature DSP libraries.
BUG=315941833
* Add missing optimizations for xtensa/ and hexagon/ to forntend ops under signal/
* Revert change to copyright year
* Fix wrong include paths
* Reorder include paths
* Move static inline functions out of the namespace block.
* Fix path to KissFFT
* Remove file that was added by mistake
* Realized a lot of these optimizations were already added under src/
* Reverted a few more files
* Fix compilation errors
* Porting Reduce_All reference operator porting from TFLite to TFLM (#3269)
* Sync files related to Reverse_V2 from TFLite
#3110
* PRelu Int16x8 support in RefC
* Fix code style in prelu_test.cc
* 1. Reverted the copyright year
* Resolved compilation error for Int8x8 test case
* Add Dynamic_Update_Slice support to TFLM
* Code style error correction
* Code style correction
* Replaced hard coded MaxDimensions to RuntimeShape::kMaxSmallSize
* 1. Added more test cases \n2.Removed unused code
* Updates for test failure on ARM
* Code style updates
* Updates on test case failure for ARM
* Updates on test case failure for ARM
* Code style updates
* Add Reduce_All reference operator support to TFLM
* Resolving HiFi build errors
---------
Co-authored-by: Esun Kim <veblush@google.com>
* Provide default values for uninitialized variable (#3282)
Switch-cases in decode_state_lut.cc don't assign a default value
to a local variables. On one version of ARM GCC (building for ARM cortex m33, this results in
a compiler error [-Werror=maybe-uninitialized].
BUG=451462435
* Add Ingenic MIPS port to README.md (#3255)
* Add Ingenic MIPS port to README.md
* Update README.md
Changed order of new board to be alphabetical
* Update README.md
Removed extra brackets making things look wrong.
---------
Co-authored-by: Esun Kim <veblush@google.com>
* Solve compiler errors in decode op (#3284)
1. When building with old Xtensa toolchains, the compiler throw an unused variable warning
which is treated as error (-Werror is defined by default).
The cause is ScopedMicroProfile instantiation in the decoder op. Added a dummy reference to mute the warning.
2. Old pre C++14 Xtensa compilers don't support ticks in preprocessor constants, e.g. 0x8000'0000
Removed the ticks.
BUG=451462435
* Fix coding style
* Match FFT int16 test's tolerance with audiofrontend's
* Fix failure in micro_speech example
* Increase tolerance of feature extraction
* Incerased error interval for micro speech detection
* Incerased error interval for micro speech detection
* Incerased error interval for micro speech detection
* Incerased error interval for micro speech detection
* Comment on looser tolerance in micro speech test and limit it to Xtensa
---------
Co-authored-by: Kunasi Ramesh <28750242+rameshkunasi@users.noreply.github.com>
Co-authored-by: Esun Kim <veblush@google.com>
Co-authored-by: Matthew Vance <yinzara@gmail.com>
- Upgraded the Bazel BuildTool to the latest version (8.2.1).
- Updated the `tflm-ci` Docker image and pushed the new tag (0.6.1) to the `ghcr.io/tflm-bot/tflm-ci registry`.
- Updated the WORKSPACE to load `rules_cc` and `rules_shell` explicitly
- Ran `buildifier` to ensure all BUILD files to have all the fixes.
BUG=Clean-up
Remove micro_copts() by replacing every cc_* target that used
them with a tflm_cc_* equivalent, and setting those common copts
in one place, inside the tflm_cc_* macro.
This is the first of several commits introducing tflm_cc_* macros
in place of cc_binary, cc_library, and cc_test. Motivated by the
upcoming need to support conditional compilation, the objective
is to centralize build configuration rather than requiring (and
remembering that) each cc_* target in the project add the same
common attributes such as compiler options and select()ed
Alternatives such as setting global options on the command line
or in .bazelrc, even if simplified with a --config option, fail
to preserve flags and hooks for configuration in the case TFLM is
used as an external repository by an application project. Nor is
it easy in that case for individual targets to override an
otherwise global setting.
BUG=#2636
Adds optimized directory structure for Signal OPs.
This PR targets optimizations for xtensa for FftAutoScale and FilterBankSquareRoot.
BUG=[287346710](https://b.corp.google.com/issues/287346710)
`port c++ PCAN op to open source in tflm_signal`
-port PCAN op and corresponding to new open source location for C++
BUG=[b/294387385](https://b.corp.google.com/issues/294387385)
Our Cortex-m55 build is failing for fft_test.cc due to strict tolerance in irfft tests. Increasing tolerance slightly similar to what we did for rfft.
Can test locally with
```make -f tensorflow/lite/micro/tools/make/Makefile -j24 test_kernel_signal_fft_test TARGET=cortex_m_corstone_300 TARGET_ARCH=cortex-m55```
BUG=[287518815](http://b/287518815)
This PR adds additional FFT op functionality in the Signal library, namely adding the FFT Auto Scale operation.
Testing added in the original `fft_test.cc` and `fft_ops_test.py`.
BUG=[287346710](http://b/287346710)
`port c++ filter_bank ops to open source in tflm_signal`
-port filter_bank ops and corresponding to new open source location for C++
BUG=[b/289422411](https://b.corp.google.com/issues/289422411)
`port c++ energy op to open source in tflm_signal`
-port energy op and corresponding to new open source location for C++
BUG=[b/289422411](https://b.corp.google.com/issues/289422411)
`port c++ stacker op to open source in tflm_signal`
-port stacker op and corresponding to new open source location for C++
BUG=[b/289298641](https://b.corp.google.com/issues/289298641)
`port c++ delay op to open source in tflm_signal`
-port delay op and corresponding to new open source location for C++
BUG=[b/289296081](https://b.corp.google.com/issues/289296081)
`port c++ Overlapp_Add op to open source in tflm_signal`
-port Overlapp_Add op and corresponding to new open source location for C++
BUG=[b/289291202](https://b.corp.google.com/issues/289291202)
`port c++ framer op to open source in tflm_signal`
-port framer op and corresponding to new open source location for C++
BUG=[b/288965505](https://b.corp.google.com/288965505)
This is needed to avoid name clashes and properly build all targets.
The make command names to run the signal tests have changed to use `signal_` before the op.
So:
`test_kernel_fft_test` is now `test_kernel_signal_fft_test`, etc.
BUG=[288938993](http://b/288938993)
Our Cortex-M55 test is failing due to strict tolerance in the Rfft float test.
Increasing tolerance for this target.
BUG=[287518815](http://b/287518815)
Second OP for the TFLM Signal library, Real-Valued Fast Fourier Transform.
The RFFT OP provides three resolutions: `FLOAT, INT16, INT32`
Similar usage as to previous Window OP:
* `op_resolver.AddRfft()` (which will add all resolutions, and determine the type at runtime)
* `op_resolver.AddRfftFloat()`, `op_resolver.AddRfftInt16()`, `op_resolver.AddRfftInt32()` for a specific resolution type.
* or via python as can be seen in `fft_ops_test.py`
3 testing options are provided:
* Micro(C++): bazel run signal/micro/kernels:fft_test
* Tensorflow/Micro(Python): bazel run python/tflite_micro/signal:fft_ops_test
* Makefile(C++): make -f tensorflow/lite/micro/tools/make/Makefile test_kernel_fft_test
BUG=[287346710](http://b/287346710)
First Op for the TFLM Signal Processing Ops library.
Doc linked in bug.
The Window OP is a custom signal processing OP similar to what is found in tf.signal library, but specific for integer (int16) purposes.
You can directly use this as a builtin op via the op resolver as:
* `op_resolver.AddWindow()`
* or via python as shown in `window_op_test.py`
3 testing options are provided:
* Micro(C++): `bazel run signal/micro/kernels:window_test`
* Tensorflow/Micro(Python): `bazel run python/tflite_micro/signal:window_op_test`
* Makefile(C++): `make -f tensorflow/lite/micro/tools/make/Makefile test_kernel_window_test`
BUG=[259145369](http://b/259145369)