Commit graph

6 commits

Author SHA1 Message Date
Ryan Kuester
17f5844557
fix(py runtime_test): remove test for zero-initialized output tensor (#2946)
Remove the test that incorrectly asserts the output tensor is
initially all zeros. The tensor is allocated from a shared memory
arena, and its initial state is not guaranteed to be zero. This
test eventually failed due to variations in memory allocation
during build and runtime; see the failed checks in #2945.

BUG=#2636
2024-12-02 18:14:16 +00:00
RJ Ascani
6411584e33
Revert "update the tensorflow.lite to use ai-edge-litert for all python based…" (#2705)
Reverts tensorflow/tflite-micro#2702

BUG=#2703
2024-09-27 17:44:05 +00:00
RJ Ascani
bf2ba11d93
update the tensorflow.lite to use ai-edge-litert for all python based… (#2702) 2024-09-26 09:11:38 -07:00
Steven Toribio
ad83c8cf8c
Implementation preserve_all_tensors and GetTensor features in TFLM interpreter (#2181)
`Implementation preserve_all_tensors and getTensor features in TFLM interpreter`


[Design Doc](https://docs.google.com/document/d/13CB93tffg_dDnZYy1QkY3u88yJev4PtZeRY0MLH6n_w/edit?resourcekey=0-htWqjXWneKLXcD6o2SVNJw#heading=h.x9snb54sjlu9)

* PreserveAllTensors is a flag / option being added to the TFLM interpreter that guarantees that post invocation all tensors will be available post invocation with there data untouched. 

* GetTensor() is an api being added to the interpreter that allows users to access any tensor in a model by providing the right index but this api is only available when the PreserveAllTensors flag is being used (all the data is guaranteed to be valid and untouched) 

*additionally this cl adds functionality for users to instantiate MicroAllocators with LinearMemoryPlanners vs the the default GreedyMemoryPlanner for MicroAllocator create methods that don't currently take a MemoryPlanner as an input
 
[google3 cl](https://critique.corp.google.com/cl/543518092)

BUG=[b/288141725](https://b.corp.google.com/288141725)
2023-08-28 17:49:16 +00:00
Advait Jain
69d15a0124
Remove extra space in todo. (#2059)
BUG=cleanup
2023-06-15 17:56:21 +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/tests/runtime_test.py (Browse further)