Commit Graph

3 Commits

Author SHA1 Message Date
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