aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/lite/interpreter.cc
diff options
context:
space:
mode:
authorGravatar Jared Duke <jdduke@google.com>2018-08-14 11:37:01 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-08-14 11:45:51 -0700
commit425b62a344f18c875f6f024b36ae37749cb00feb (patch)
tree3e46e2b08d1f93b6cc401ae2d3567d8a62f0cee1 /tensorflow/contrib/lite/interpreter.cc
parent77fabbeabb5b9061d8c606050c1ea79aec990c03 (diff)
Provide TfLiteContext arg to all TfLiteDelegate callbacks
Note: This change may break clients who have custom TfLiteDelegate implementations; this API has been and remains experimental and subject to such changes. PiperOrigin-RevId: 208683190
Diffstat (limited to 'tensorflow/contrib/lite/interpreter.cc')
-rw-r--r--tensorflow/contrib/lite/interpreter.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/contrib/lite/interpreter.cc b/tensorflow/contrib/lite/interpreter.cc
index 7a680f5c64..362e588725 100644
--- a/tensorflow/contrib/lite/interpreter.cc
+++ b/tensorflow/contrib/lite/interpreter.cc
@@ -157,7 +157,7 @@ Interpreter::~Interpreter() {
TfLiteTensor* tensor = &context_.tensors[i];
if (tensor->buffer_handle != kTfLiteNullBufferHandle &&
tensor->delegate->FreeBufferHandle != nullptr) {
- tensor->delegate->FreeBufferHandle(tensor->delegate,
+ tensor->delegate->FreeBufferHandle(&context_, tensor->delegate,
&tensor->buffer_handle);
}
TfLiteTensorFree(tensor);
@@ -988,7 +988,7 @@ TfLiteStatus Interpreter::SetBufferHandle(int tensor_index,
tensor->delegate = delegate;
if (tensor->buffer_handle != kTfLiteNullBufferHandle) {
TF_LITE_ENSURE(&context_, tensor->delegate->FreeBufferHandle != nullptr);
- tensor->delegate->FreeBufferHandle(tensor->delegate,
+ tensor->delegate->FreeBufferHandle(&context_, tensor->delegate,
&tensor->buffer_handle);
}
tensor->buffer_handle = buffer_handle;