Commit graph

587 commits

Author SHA1 Message Date
David Davis
0965635467
Fix benchmark tool alternate profiler (#3629)
@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
2026-07-13 18:10:56 +00:00
Esun Kim
e142972d4f
Manual sync from sync from github.com/tensorflow/tensorflow (#3616)
* Synced

* Added FLOAT8_* types
2026-07-01 18:13:01 -07:00
Måns Nilsson
acc13e42eb
Update CMSIS-NN download (#3607)
- 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>
2026-06-24 04:03:35 +00:00
Esun Kim
b6ee3dc974
Fix missing quantizedBiasType setting for 16x8 requantization (#3597) 2026-06-16 15:53:23 +00:00
Ryan Kuester
068c6a59b6
build(bazel): inject tflite_micro shim via tflm_py_* wrappers (#3573)
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.
2026-05-26 19:51:58 +00:00
Esun Kim
d0890bb456
Updated CMSIS_NN to the latest (6d9d61d) (#3565) 2026-05-21 22:05:29 +00:00
Esun Kim
a9952453ab
Improve Check TfLite Files (#3566) 2026-05-21 14:40:16 -07:00
Esun Kim
9f5ac257ee
No tensorflow 2 (#3548) 2026-05-06 21:17:46 +00:00
Esun Kim
1c2bae841e
No tensorflow 1 (#3546)
* No tensorflow 1

* Vendoring our own utils

* Vendoering revise

* Removed unnecessary tf pythons

* Reformat
2026-05-06 18:31:12 +00:00
Esun Kim
807c35d6a9
Bazel Module (#3364)
* Work

* Review update

* Enabled tests

* Bazel: Suppress warnings from external repositories

* Fixed whl_test

* Formatted

* More format
2026-02-11 14:11:47 -08:00
Esun Kim
183da3e302
Typo in code (#3447)
* Typo in code

* Format
2026-02-11 20:34:42 +00:00
Esun Kim
510a6c505c
pick 42ff343b # Fix handling of empty CSV files in generate_cc_arrays.py (#3423)
csv.
2026-02-10 23:25:19 +00:00
Esun Kim
c0564e46c5
[CI] More fixes (#3442)
* Fixed micro_allocator.cc

* Removed needs-mmap-rnd usage

* Disable python tests under bazel

* Removed -Werror
2026-02-10 13:54:49 -08:00
Esun Kim
89bf22f7a6
Ah.. revert legacy_create_init (#3440) 2026-02-10 11:14:56 -08:00
Esun Kim
b4bb8128b6
[CI] Docker test fixes (#3436)
* 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
2026-02-10 10:51:10 -08:00
Esun Kim
df89e4c7bd
Check maybe (#3396) 2026-01-31 09:32:03 -08:00
Esun Kim
ab68b206b0
Refactor t2-20 (#3387) 2026-01-30 18:27:00 +00:00
Esun Kim
0a7eaa3c28
Clean up makefile (#3362)
* Quiet mode

* Formatting

* Refactor sources.inc

* Fix

* Third_party

* Fix

* Fix2

* Fix

* Tests

* Fix?

* Logs

* third_party

* Shell

* Fix path

* Added patch to msys2

* Evertying
2026-01-29 13:57:07 -08:00
Esun Kim
0c05a37bcc
[Testing] New Testing API (#3311)
* Fixed StackAllocator

* Bumped kStackAllocatorSize to 16KB

* Simplified

* Added micro_test v2

* Sample migration

* More APIs

* Fixed format

* Output is more aligned with gtest

* Removed legacy-eq

* Migrated memory_planner tests

* Code style

* Added ~~~ALL TESTS PASSED~~~

* Review

* Review 2

* Output messages
2026-01-29 17:17:35 +00:00
Esun Kim
8878fe93d3
Clean up make file (#3361)
* Format makefile

* Macros
2026-01-27 16:10:38 -08:00
Esun Kim
41a80afaa4
[Dep] Upgraded Flatbuffer to 25.9.23 (#3296)
* flatbuffer-25.9.23

* Patch 1

* No dynamic allocation patch to Flatbuffer

* Individual ModelBuilder

* Fix

* Patch

* One more removal
2026-01-27 22:12:21 +00:00
Esun Kim
e63f7e85a3
Deleted codegen (#3360) 2026-01-27 20:57:50 +00:00
Esun Kim
b46e68e79f
Bazel clean-up (#3359) 2026-01-26 17:20:18 -08:00
Shlomi Regev
02acf8f861
Disable renaming of expftblf in NDSP libraries for hifi5 and hifi4 (#3351)
__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
2026-01-27 00:14:29 +00:00
Shlomi Regev
d4e767053b
Exclude Cadence NNlib function xa_nn_norm3D_16 from build (#3352)
The function causes an internal compiler error on some hifi4 cores.
The function isn't currently used by any kernels.

BUG=478153404
2026-01-27 00:14:25 +00:00
Esun Kim
e224763936
Added ResetVariableTensor (#3298)
* Added ResetVariableTensor

* Return kTfLiteError if case of error

* Added new test to Makefile

* Better quantiazation check

* EXPECT in the test

* Typo

* Fixed API usage
2026-01-26 21:22:13 +00:00
Esun Kim
b41b1cb25e
Clean-up shebang (#3356) 2026-01-26 14:07:28 -08:00
Esun Kim
2aa6e12979
[CI] Reformat (#3347)
* Clean-up BUILD

* Added pyproject.toml

* Format gen

* Fix

* Fix format

* Fix
2026-01-24 21:13:38 -08:00
Esun Kim
ee42e1d5b3
Format (#3346) 2026-01-24 20:06:04 -08:00
Esun Kim
233ff4715c
[CI] Windows Fixes (#3344)
* Fixes

* Exclude
2026-01-24 17:57:50 -08:00
Esun Kim
f1f920edf8
Fixes (#3343) 2026-01-24 17:36:45 -08:00
Esun Kim
718c5d21a7
[CI] Windows 2 (#3337)
* Harden script

* More
2026-01-24 12:12:48 -08:00
Esun Kim
55e836378a
More fix (#3335) 2026-01-24 11:36:17 -08:00
Esun Kim
0e7af97a6d
[CI] windows 2 (#3334)
* Fix more

* More fix to go
2026-01-24 11:08:09 -08:00
Esun Kim
ffec71d249
[CI] windows 2 (#3332)
* More fix

* Fix more
2026-01-24 10:59:35 -08:00
Esun Kim
dec1a10898
[Fix] Ci windows 2 (#3330)
* Fix

* Fix
2026-01-24 10:16:11 -08:00
Esun Kim
d6541f615b
[CI] Fix windows bazel (#3322)
* Added windows

* Removed for now

* Fix bazel script
2026-01-22 21:06:37 -08:00
Esun Kim
b1165ab722
[CI] More windows (#3321)
* Added windows

* Removed for now

* More fix
2026-01-22 16:27:27 -08:00
Esun Kim
6cad98156c
[CI] Updated armclang to the latest (#3319)
* Updated armclang to the latest

* Log
2026-01-22 15:18:25 -08:00
Esun Kim
2628483a6a
[CI] Clean-up make scripts (#3318)
* Clean-up make scripts

* Fixed
2026-01-22 14:39:41 -08:00
Esun Kim
0a8e6c54a5
[CI] Removed code from Yaml files. (#3315)
* CI no code

* Updated
2026-01-21 21:21:39 -08:00
Esun Kim
6e7d74b9e5
[CI] Better CI Loggin (#3312)
* Better readable_run

* Added set -ex
2026-01-21 15:14:15 -08:00
Esun Kim
6422e13924
Fix test_latency_log.sh (#3300) 2026-01-16 15:55:32 -08:00
Esun Kim
966bda66a6
Added UINT4 support (Sync from github.com/tensorflow/tensorflow) (#3283)
* Added UINT4 support

* Sync from upstream TF.

---------

Co-authored-by: TFLM-bot <tflm-github-bot@google.com>
2026-01-16 10:05:13 -08:00
Shlomi Regev
e028871fb6
Missing signal opts (#3264)
* 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>
2026-01-14 08:01:24 +00:00
Esun Kim
fd33340e06
Revert "[CI] Replaced tensorflow with tensorflow-cpu (#3261)" (#3290)
This reverts commit 9cbf6e0403.
2026-01-12 11:19:37 -08:00
Kunasi Ramesh
ef382bdaae
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>
2026-01-08 10:34:29 -08:00
David Davis
f5c36ef2ef
Change MicroInterpreter::SetCompressionMemory API (#3267)
* 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
2025-12-10 17:40:19 +00:00
Esun Kim
9cbf6e0403
[CI] Replaced tensorflow with tensorflow-cpu (#3261)
* Replaced tensorflow with tensorflow-cpu

* Use tensorflow-cpu for bazel targets
2025-12-03 13:43:14 -08:00
David Davis
6c1c1a89fc
Support for DECODE operator (#3213)
* 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.
2025-11-19 14:14:53 -08:00