STT-tensorflow/tensorflow/lite
Terry Heo 9b87db80e0 tflite: Prevent from reallocation of persistent tensors
After ResetAllocationsAfter() is called, CalculateAllocations() could be called
again for nodes which have persistent temporary tensors. The logic should
prevent from reallocation of these tensors since they're not going to be
initialized again.

This issue could be reproduced easily with hybrid quantized models since some
hybrid kernels are using persistent temporary tensors.

This PR resolves GitHub issue #44520.

PiperOrigin-RevId: 345569003
Change-Id: I1b9777b33a664ebd0f09df8d3236c7ece0118b1a
2020-12-04 11:51:44 +09:00
..
c Promote cumsum as a builtin op. 2020-10-19 19:04:06 -07:00
core Internal change on comments. 2020-10-20 22:58:14 -07:00
delegates Rename exec_tools to tools 2020-11-23 15:41:54 -08:00
examples Update cmake support of TFLite minimal example 2020-11-24 09:32:21 +09:00
experimental Fix linking failure of Flex delegate in Archive mode 2020-11-28 15:52:59 +09:00
g3doc nit: remove extra comma to make colab shown correct. 2020-10-21 19:15:06 -07:00
java Restore setAllowFp16PrecisionForFp32 test 2020-10-13 11:09:08 -07:00
kernels Implement unidirectional_sequence_lstm runtime by a separate branch of EvalInteger8x8_16. 2020-10-20 09:36:06 -07:00
lib_package Clean up Makefile based build scripts for TFLite iOS 2020-06-21 21:15:25 -07:00
micro Merge pull request #44196 from advaitjain:fix-macos-build 2020-10-21 17:54:34 -07:00
nnapi Added dlerror() error message to log. 2020-10-08 16:26:53 -07:00
profiling [tflite]: Insert nullptr checks when obtaining tensors. 2020-09-18 13:53:51 -07:00
python Merge pull request #41790 from lgeiger:fix-matmul-fusion 2020-11-06 13:01:02 +00:00
schema Promote cumsum as a builtin op. 2020-10-19 19:04:06 -07:00
testdata Register Unidirectional_sequence_lstm logging op in calibrator. 2020-10-16 10:26:16 -07:00
testing Modify model input/output in a separate utility for all quantized TF1/TF2 models. 2020-10-20 14:11:08 -07:00
toco Update the remaining unchanged spots, which read builtin code 2020-10-20 19:30:01 -07:00
tools cmake: Build release build by default 2020-11-24 11:08:14 +09:00
tutorials BUILD file cleanup 2020-09-30 16:03:47 -07:00
allocation.cc Merge pull request #27347 from ANSHUMAN87:allocation-comments 2020-02-14 15:24:19 -08:00
allocation.h [tf.lite] Documentation fixes: 2020-07-17 10:45:33 -07:00
arena_planner_test.cc tflite: Prevent from reallocation of persistent tensors 2020-12-04 11:51:44 +09:00
arena_planner.cc tflite: Prevent from reallocation of persistent tensors 2020-12-04 11:51:44 +09:00
arena_planner.h Shift memory allocation parameters to lite/util. Also make specifying these parameters explicit in runtime code. 2020-07-09 12:53:38 -07:00
BUILD Make op_resolver public. 2020-10-14 21:11:06 -07:00
build_def.bzl Rename exec_tools to tools 2020-11-23 15:41:54 -08:00
builtin_op_data.h Migrate TensorFlow Lite out of tensorflow/contrib 2018-10-31 14:20:28 -07:00
builtin_ops.h Promote cumsum as a builtin op. 2020-10-19 19:04:06 -07:00
CMakeLists.txt cmake: Fix Android build error on missing MaybeCreateATraceProfiler() 2020-11-24 11:40:16 +09:00
context_util.h Rename lite/c/c_api_internal.h to lite/c/common.h 2019-11-25 21:49:25 -08:00
context.h Rename lite/c/c_api_internal.h to lite/c/common.h 2019-11-25 21:49:25 -08:00
error_reporter.h Migrate TensorFlow Lite out of tensorflow/contrib 2018-10-31 14:20:28 -07:00
external_cpu_backend_context.cc Make TfLiteInternalBackendContext as a interface-only abstract class. 2019-07-22 19:34:07 -07:00
external_cpu_backend_context.h Permit runtime opt-in for caching of prepacked matrices in GEMMs. 2020-06-04 17:10:17 -07:00
graph_info_test.cc Fix partitioning bug for multiple-delegate cases 2020-09-11 11:28:05 -07:00
graph_info.cc Fix partitioning bug for multiple-delegate cases 2020-09-11 11:28:05 -07:00
graph_info.h Fix partitioning bug for multiple-delegate cases 2020-09-11 11:28:05 -07:00
interpreter_builder.cc Fix linking error of Flex delegate for iOS 2020-10-30 22:21:30 +09:00
interpreter_builder.h Internal change 2020-09-17 19:14:22 -07:00
interpreter_test.cc 1. Return a TfLiteApplicationError instead of TfLiteError when trying to apply a delegate that doesn't allow dynamic tensors on a graph with dynamic tensors. 2020-10-19 00:35:55 -07:00
interpreter.cc Internal change 2020-09-17 19:14:22 -07:00
interpreter.h 1. Return a TfLiteApplicationError instead of TfLiteError when trying to apply a delegate that doesn't allow dynamic tensors on a graph with dynamic tensors. 2020-10-19 00:35:55 -07:00
memory_planner.h Add MemoryPlanner::ResetAllocationsAfter() 2020-01-27 18:01:53 -08:00
minimal_logging_android.cc Add console log hooks for TFLite delegates 2019-04-01 15:43:18 -07:00
minimal_logging_default.cc Fix minor clang warnings for tflite, for toolchains with pickier configurations. 2019-04-03 14:47:43 -07:00
minimal_logging_ios.cc Add console log hooks for TFLite delegates 2019-04-01 15:43:18 -07:00
minimal_logging_test.cc Only prod log interpreter creation on mobile platforms 2019-08-15 17:49:46 -07:00
minimal_logging.cc Fix minor clang warnings for tflite, for toolchains with pickier configurations. 2019-04-03 14:47:43 -07:00
minimal_logging.h Only prod log interpreter creation on mobile platforms 2019-08-15 17:49:46 -07:00
mmap_allocation_disabled.cc Automated rollback of commit 19f417d905 2019-07-02 17:43:32 -07:00
mmap_allocation.cc Automated rollback of commit 19f417d905 2019-07-02 17:43:32 -07:00
model_builder.cc Force enabling TFLite tracing with TFLITE_ENABLE_DEFAULT_PROFILER define. 2020-08-31 16:19:06 -07:00
model_builder.h Internal change 2020-10-08 10:22:02 -07:00
model_flex_test.cc Migrate TensorFlow Lite out of tensorflow/contrib 2018-10-31 14:20:28 -07:00
model_test.cc [tflite] Ensure input tensors don't have nullptr buffers. 2020-09-18 14:34:47 -07:00
model_xnnpack_test.cc Use BuiltinOpResolver as a way to apply the xnnpack delegate by default in TfLite interpreter. Also, provide another builtin-op resolver to disallow applying the delegate by default. 2020-08-18 23:22:25 -07:00
model.h Internal change 2020-09-17 19:14:22 -07:00
mutable_op_resolver_test.cc Add single-parameter versions of AddBuiltin and AddCustom functions. 2020-03-16 17:22:39 -07:00
mutable_op_resolver.cc Add single-parameter versions of AddBuiltin and AddCustom functions. 2020-03-16 17:22:39 -07:00
mutable_op_resolver.h [tf.lite] Documentation fixes: 2020-07-17 10:45:33 -07:00
op_resolver.h Migrate TensorFlow Lite out of tensorflow/contrib 2018-10-31 14:20:28 -07:00
optional_debug_tools.cc Adds API for users to provide custom allocations for TFLite tensors 2020-08-07 14:46:40 -07:00
optional_debug_tools.h [tf.lite] Documentation fixes: 2020-07-17 10:45:33 -07:00
portable_type_to_tflitetype.h Avoid inclusion of C++ string header in Micro to help with platform porting 2020-08-14 16:57:26 -07:00
README.md Migrate TensorFlow Lite out of tensorflow/contrib 2018-10-31 14:20:28 -07:00
shared_library.h Fix cmake build on mingw compiler 2020-09-07 17:41:52 +09:00
simple_memory_arena_test.cc Fix BufferAndPlanClearingTest 2020-05-20 13:28:42 -07:00
simple_memory_arena.cc Fix BufferAndPlanClearingTest 2020-05-20 13:28:42 -07:00
simple_memory_arena.h Use std::vector instead of std:list for ArenaAllocWithUsageInterval container 2020-03-26 01:07:03 -07:00
special_rules.bzl Fix linking error of Flex delegate for iOS 2020-10-30 22:21:30 +09:00
stateful_error_reporter.h Add StatefulErrorReporter and make error_reporter() public from Interpreter API. 2020-10-05 14:59:44 -07:00
stderr_reporter_test.cc [lite] Add unit test for stderr_reporter. 2020-10-14 10:33:42 -07:00
stderr_reporter.cc Add console log hooks for TFLite delegates 2019-04-01 15:43:18 -07:00
stderr_reporter.h Rename lite/c/c_api_internal.h to lite/c/common.h 2019-11-25 21:49:25 -08:00
string_type.h Add Mbed CI testing support 2019-09-05 13:53:45 -07:00
string_util_test.cc Adds support for string separators to AddJoinedString 2020-07-27 16:15:52 -07:00
string_util.cc Adds support for string separators to AddJoinedString 2020-07-27 16:15:52 -07:00
string_util.h Fix off-by-one error in the documentation of the string tensor representation: 2020-08-21 10:31:36 -07:00
tflite_exported_symbols.lds Add libtensorflowlite.so target 2019-02-04 17:25:07 -08:00
tflite_version_script.lds Add libtensorflowlite.so target 2019-02-04 17:25:07 -08:00
tflite_with_xnnpack_optional.cc Add a compile flag (i.e. adding "--define tflite_with_xnnpack=true" when using bazel to build, which corresponds to defining macro TFLITE_BUILD_WITH_XNNPACK_DELEGATE) to apply XNNPACK delegate in TFLite runtime. 2020-05-17 21:10:25 -07:00
tflite_with_xnnpack_optional.h Add a compile flag (i.e. adding "--define tflite_with_xnnpack=true" when using bazel to build, which corresponds to defining macro TFLITE_BUILD_WITH_XNNPACK_DELEGATE) to apply XNNPACK delegate in TFLite runtime. 2020-05-17 21:10:25 -07:00
tflite_with_xnnpack.cc Fixed reference names. 2020-04-01 01:48:15 -07:00
type_to_tflitetype_test.cc Create the reverse mapping of TfLiteType -> cpp types. 2020-07-17 12:59:35 -07:00
type_to_tflitetype.h Avoid inclusion of C++ string header in Micro to help with platform porting 2020-08-14 16:57:26 -07:00
util_test.cc Improve GPU delegate graph partitioning logic 2020-03-13 23:28:48 -07:00
util.cc Add complex<double> tensor support in TFLite 2020-07-13 18:19:24 -07:00
util.h Shift memory allocation parameters to lite/util. Also make specifying these parameters explicit in runtime code. 2020-07-09 12:53:38 -07:00
version.h Add TensorFlow Lite runtime version 2019-03-18 12:35:50 -07:00

TensorFlow Lite

TensorFlow Lite is TensorFlow's lightweight solution for mobile and embedded devices. It enables low-latency inference of on-device machine learning models with a small binary size and fast performance supporting hardware acceleration.

See the documentation: https://www.tensorflow.org/lite/ Documentation edits can be made here: tensorflow/lite/g3doc