[TF Lite] Provide a fast path for Interpreter::SetTensorParametersReadOnly.
authorEugene Brevdo <ebrevdo@google.com>
Thu, 8 Mar 2018 21:39:54 +0000 (13:39 -0800)
committerTensorFlower Gardener <gardener@tensorflow.org>
Thu, 8 Mar 2018 21:45:19 +0000 (13:45 -0800)
commit8c9a9b371d619ba35f7eae598a2eea045659738a
tree70ee7d729516141aea0abc693b199810143781b5
parentebf554ff77bc46bfdd9b424bc44b62f803100b33
[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
tensorflow/contrib/lite/context.c
tensorflow/contrib/lite/context.h
tensorflow/contrib/lite/interpreter.cc
tensorflow/contrib/lite/util.cc
tensorflow/contrib/lite/util.h