This adds a new script that can identify the kws_streaming conv2d
pattern and replace this pattern with the custom Xtensa StreamingConv2d
operator.
BUG=b/327502734
The prototype streaming conv2d operator re-uses the Conv2D options, so
we can re-use the ParseConv2D function for parsing the flatbuffer
options.
BUG=b/327502734
The tests_entry workflow was invalid due to parsing error when a `==`
was expected instead of `=`. The tests_post needed to remove the
ci:run_full label.
BUG=b/327686165
Per-channel quantization in fully connected layers are still not supported by TFLM, but the converter now has proper support so we can remove the flag.
BUG=cl/610755484
Despite existing in TFLite, the runtime_shape.h has long differed
between TFLite and TFLM. The file is not copied during the sync and the
sync script does a `git checkout` on the file to ensure that the
existing version in the TFLM tree remains.
In PR #2476, we needed to add a runtime_shape.cc file. This PR ensures
that the runtime_shape.cc file will not be removed during the sync by
performing a `git checkout` on the existing file.
BUG=323856831
When building with a recent version of xt-clang and -std=c++11, the linker errs on missing definition of a static constexpr class member. In C++11, static class members still had to be defined in a C++11 file and TFLM code is expected to be compatible with C++11.
BUG=323856831
### Problem description:
In the original code, pointer arithmetic of gain_lut and the assignment of gain_lut[4 * interval + 3] could potentially lead to out-of-bounds array access.
On certain architectures (e.g., macOS ARM64), this out-of-bounds access causes the program to crash.
BUG=None, reported issue#2464
### Solution:
Increase the size of the gain_lut_storage array by 1 to provide an extra buffer and prevent overflow during the calculation within the loop.
### Risks and considerations:
Increasing the array size will slightly increase memory usage.
In extremely resource-constrained systems, alternative algorithm implementations may need to be considered.
Adds a build flag that can be used by any kernel to provide a different implementation depending on use case.
Adds a first use case for cmsis-nn transpose conv.
The background for this PR is in https://github.com/tensorflow/tflite-micro/pull/2345
BUG=none
- Adds non zero filter offset support.
- Adds support for batch matmul like behavior where weights are like input, i.e. not initialized before eval.
BUG=non zero filter offset not supported for CMSIS-NN
The tensorflow-cpu package does not support MacOS or non-x86 hardware. Replacing the tensorflow-cpu python package requirement with the tensorflow meta package should enable the bazel build and the dependent python scripts to be used on those platforms.
BUG=#2367, #1781
@tensorflow/micro
Capture size, then remove model size var from person_detect_model_data_vela.cc
Update model size var in person_detect_model_data.h
Add cortex_m_generic and cortex_m_corstone_300 tests to CI full run
bug=fixes #2455
When building with a recent version of xt-clang and -std=c++, the linker errs on missing definition of a static constexpr class member. In C++11, static class members still had to be defined in a C++11 file and TFLM code is expected to be compatible with C++11.
BUG=323856831
We're seeing these warnings/errors only with newer version of the Xtensa toolchains.
The warnings/errors can be silenced, but that might mask other occurances.
BUG=323856831
CONV
- Set filter_dims.c to allow for use of grouped convolution
- Additionally moves all consistency checks to the prepare stage
LSTM
- Updates CMSIS-NN download SHA
- New API for arm_lstm_unidirectional_s8
- New API for arm_vector_sum_s8
BUG=#2074, bit exactness of lstm kernel.
The HiFi5 nnlib has the same optimized kernels for ADD and SUB as the HiFi4 nnlib, but the proper defines were not added to the kernel implementation. This was resulting in falling back to reference kernels for both of those operators on HiFi5.
BUG=none
The Vision P6 reduce kernel used a temporary std::vector to calculate which axis should be reduced. This commit replaces that with an array of 4 elements because the number of axis to reduce should already be resolved to less than or equal to the input tensor rank, which is also limited to 4.
This commit also aligns variable naming conventions and types in this file for consistency.
BUG=b/287051090
This change broke some internal models, so reverting this until we can better understand why.
This also reverts PR #2383. When relanded, both should go back in together.
BUG=b/318738218
The PythonOpsResolver and the utility TflmOpResolver are intended to support all built-in ops allow for models to be tested without code changes. This PR syncs those op resolvers with all available ops from the MicroMutableOpResolver, notably adding BatchMatMul and the Signal ops.
Additionaly, this PR sorts the list alphabetically for readability and adds an alias for the utility TflmOpResolver since it is used in both the benchmarking tool and the layer by layer debugging tool.
BUG=cleanup
This partially reverts commit 1e9b4c5d84. The make helpers for running the inference code generator were somewhat of a hack due to the desire to integrate a target-specific preprocessor binary as part of the process. Since that is no longer necessary, we can now switch over to just using Bazel for running the code generator.
BUG=b/294230402
Due to an assembler error:
/tmp/xa_nn_activations_asym8_asym8-037a85.s: Assembler messages: /tmp/xa_nn_activations_asym8_asym8-037a85.s:470: Error: operand 3 of 'slli' has invalid value '0' clang-3.9: error: Xtensa-as command failed with exit code 1 (use -v to see invocation)
BUG=319139235
The layer_by_layer tool re-uses the OpResolver from the benchmarking
utility, so the size of the MicroMutableOpResolver needs to be increased
in sync with each other.