diff options
author | Eugene Brevdo <ebrevdo@google.com> | 2018-03-08 13:39:54 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-03-08 13:45:19 -0800 |
commit | 8c9a9b371d619ba35f7eae598a2eea045659738a (patch) | |
tree | 70ee7d729516141aea0abc693b199810143781b5 /tensorflow/contrib/lite/context.h | |
parent | ebf554ff77bc46bfdd9b424bc44b62f803100b33 (diff) |
[TF Lite] Provide a fast path for Interpreter::SetTensorParametersReadOnly.
The fast path kicks in if shape matches tensor.dims and type matches
tensor.type.
In this case, the interpreter is not invalidated and AllocateTensors need not
be called after a call to SetTensorParametersReadOnly.
PiperOrigin-RevId: 188380596
Diffstat (limited to 'tensorflow/contrib/lite/context.h')
-rw-r--r-- | tensorflow/contrib/lite/context.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tensorflow/contrib/lite/context.h b/tensorflow/contrib/lite/context.h index c6521e2fbf..23946dd26e 100644 --- a/tensorflow/contrib/lite/context.h +++ b/tensorflow/contrib/lite/context.h @@ -223,6 +223,9 @@ typedef struct { bool data_is_stale; } TfLiteTensor; +// Free data memory of tensor `t`; +void TfLiteTensorDataFree(TfLiteTensor* t); + // Free memory of tensor `t`; void TfLiteTensorFree(TfLiteTensor* t); |