@tensorflow/micro
Remove extraneous tensor copy operation after first invocation of condition subgraph.
Move copy of operator inputs to outputs, such that it occurs before the first invocation of the condition subgraph. This preserves the operator inputs when one or more of them is the output of DECODE, and alternate decompression memory is in use. This is because the output of DECODE is for immediate consumption by the next operator in the graph (WHILE), yet it is possible for the WHILE subgraph invocations to share memory with the original DECODE output.
Update the unit test for multiple invocations of the condition and body subgraphs.
When copying tensors between operator inputs/outputs and subgraph inputs/outputs, check if the source and destination tensors share memory.
bug=fixes #3632
- 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.
* Correctly initialize `ae_int8x8` zero point vectors by explicitly packing scalar values.
The implicit broadcast doesn't compile with toolchain version RI-2020.5-linux and a hifi5 core.
BUG=478153404
* refactor: simplify Xtensa `ae_int8x8` zero vector initialization using `AE_MOVDA8`.
* Simplify
When building with old Xtensa toolchains, the compiler throws 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.
Old pre C++14 Xtensa compilers don't support ticks in preprocessor constants, e.g. 0x8000'0000
Removed the ticks.
BUG=451462435
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
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
* 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>