@tensorflow/micro
Set the alternate profiler in the benchmark tool prior to the `Prepare` phase (before calling `MicroInterpreter::AllocateTensors`). This is because the DECODE operator requires the alternate `MicroProfilerInterface` to already be initialized during the `Prepare` phase.
Previously the alternate profiler was only required during the `Eval` phase with the legacy compression code. This fix does not change the functionality of the benchmark tool with respect to the legacy compression.
bug=#3628
- Adapt build logic to not build float support since TFLM does not use
the CMSIS-NN CMake path.
- Zero-initialize the cmsis_nn_lstm_context used by the int8 and int16
unidirectional sequence LSTM paths so optional fields such as hidden_state do
not contain stack garbage.
Change-Id: I5b44a3a231eb19023e004a5652b207930853648f
Signed-off-by: Måns Nilsson <mans.nilsson@arm.com>
Python targets in this repository import one another under the
"tflite_micro" package namespace, which //:tflite_micro_shim synthesizes
at import time. The shim is required under Bzlmod, where the main
repository's runfiles root is the fixed name "_main" rather than the
module name, so the "tflite_micro" prefix no longer resolves on its own.
Every such target therefore had to list //:tflite_micro_shim in its
deps, which was repetitive and easy to forget.
Add tflm_py_library, tflm_py_test, and tflm_py_binary wrappers in a new
//python:py_rules.bzl that inject the shim dependency automatically,
following the naming convention of the existing tflm_cc_* wrappers, and
document the shim's rationale there. Convert every target that
previously listed the shim to the corresponding wrapper and drop the
explicit dependency. The dependency graph is unchanged; only the means
by which the shim is attached differs.
* Fix Python module shadowing in Docker CI
Applies legacy_create_init = False to Python rules in BUILD files to prevent Bazel from automatically generating __init__.py files. This prevents the root 'signal/' directory (which contains C++ kernels but no Python source) from being treated as a Python package, which was shadowing the standard library 'signal' module and causing psutil failures in the tflm-ci Docker container.
* Fix directory path in Docker workflows
__renaming__.h re-#defines expftblf, which is already #defined in the NN library for the same cores.
To avoid the compiler throwing a re-definition error, renaming of just this one function is disabled.
This only disables renaming. The function is still compiled into the library.
BUG=478153404
* Added ResetVariableTensor
* Return kTfLiteError if case of error
* Added new test to Makefile
* Better quantiazation check
* EXPECT in the test
* Typo
* Fixed API usage
* 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>
* 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>
* Support for DECODE operator
@tensorflow/micro
Add support for alternate decompression memory to DECODE operator.
Additional unit tests.
Update generic benchmark application and Makefile.
bug=fixes #3212
* fixes.
* Changes as per review.
* Change SetDecompressionMemory API
* Support for DECODE operator
@tensorflow/micro
Add support for alternate decompression memory to DECODE operator.
Additional unit tests.
Update generic benchmark application and Makefile.
bug=fixes #3212
* fixes.
* Changes as per review.