Commit graph

17 commits

Author SHA1 Message Date
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
Kunasi Ramesh
62cbc8e3eb
Porting Dynamic_Update_Slice operator from TFLite (#3246)
* 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

---------

Co-authored-by: Esun Kim <veblush@google.com>
2025-11-10 09:22:59 -08:00
David Davis
d96fe663df
Support for DECODE operator (#3132)
* Support for DECODE operator

@tensorflow/micro

Add initial support for DECODE operator.
Add reference implementation.
Add LUT decompression support.
Update op resolvers.
Update Makefiles and Bazel BUILD files.
Add kernel unit test.

bug=fixes #3131

* update copyright

* Don't use constructors with global objects (bluepill will not call them).

Cleanup unit test.

* return error if DecodeState cannot be created.

* Address review issues.

---------

Co-authored-by: Esun Kim <veblush@google.com>
2025-10-17 09:36:56 -07:00
David Davis
3d4cdc19fb
Add REDUCE_MIN to reduce kernel (#3113)
@tensorflow/micro

Add the REDUCE_MiN operator to the reduce kernel.
Refactor reduce kernel to decrease number of methods in tflite namespace. Add REDUCE_MIN unit tests.
Fix unit test axis data to match tensor shape.
Make Xtensa reduce kernel use reference common code for REDUCE_MIN.
Update all op resolvers.

bug=fixes #3108
2025-08-05 22:11:17 +00:00
Kunasi Ramesh
41a9c8a6c3
Porting Reverse_V2 operator from TFLite (#3123)
* Sync files related to Reverse_V2 from TFLite

#3110

* Added Reverse_V2 changes

BUG=fixes #3110

* Using stable_sort instead of sort & format fixes

* Replace std::stable_sort with qsort

* fix format issues

* fix format issues

* fix format issues

* Updated the changes as per the review

---------

Co-authored-by: suleshahid <110432064+suleshahid@users.noreply.github.com>
2025-07-10 15:47:37 -04:00
RJ Ascani
85e19ddd45
Add missing ops to OpResolvers (#2386)
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
2024-01-10 02:50:40 +00:00
Steven Toribio
e01fdf05a9
PCAN C++ (#2180)
`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)
2023-08-23 21:16:59 +00:00
suleshahid
e2cdefd520
Python extensions for filter bank and stacker Signal Ops. (#2143)
Functionality to use the rest of the Signal Library OPs directly from python.

Test with `bazel run python/tflite_micro/signal:stacker_op_test` and `bazel run python/tflite_micro/signal:filter_bank_ops_test`

BUG=[287346710](http://b/287346710)
2023-07-25 15:11:22 +00:00
suleshahid
55037d2d5e
Adds IRFFT Op to Signal Library (#2137)
Inverse-RFFT as part of Signal library ops.
Testing via current FFT Op tests.

BUG=[287346710](http://b/287346710)
2023-07-20 01:17:26 +00:00
suleshahid
70aed11c95
Adds FFT Auto Scale Op (#2134)
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)
2023-07-19 00:08:47 +00:00
Steven Toribio
8ee06dcbac
Energy op (#2121)
`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)
2023-07-13 19:27:06 +00:00
Steven Toribio
296b818583
Stacker Op (#2118)
`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)
2023-07-12 22:46:54 +00:00
Steven Toribio
7781c4979c
Delay Op (#2117)
`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)
2023-07-12 20:35:09 +00:00
Steven Toribio
597ccf786c
Overlapp_add (#2116)
`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)
2023-07-11 23:32:40 +00:00
Steven Toribio
29d8dbfd4e
port c++ framer op to open source in tflm_signal (#2104)
`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)
2023-07-11 17:03:45 +00:00
suleshahid
f22888af65
Adds Signal Library RFFT OP (#2056)
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)
2023-06-21 20:36:55 +00:00
Ryan Kuester
b5da836410
refactor(python): move runtime to package-friendly directory structure (#2051)
To package the module `runtime` as `tflite_micro.runtime`, put `runtime` under
a directory representing the Python namespace package `tflite_micro`. For
organization's sake, move it all to the top-level directory `python/`. Adjust
tests and docs to match.

Some code outside of the Python extension module has come to depend on
`python/tflite_micro:python_ops_resolver` as a replacement for
`all_ops_resolver` (e.g.:`t/l/m/integration_tests/seanet/add/integration_tests.cc`).
`python_ops_resolver` is intended to be a private implementation detail of the
Python extension module. For now, grandfather in the dependent code by updating
its references to the resolver's location; however, soon the dependent code
should be migrated away to a different resolver. (#2033,
https://issuetracker.google.com/286508251)

BUG=part of #1484
2023-06-15 06:25:19 +00:00
Renamed from tensorflow/lite/micro/python/interpreter/src/python_ops_resolver.cc (Browse further)