diff options
author | Andrew Selle <aselle@google.com> | 2018-02-13 12:24:02 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-02-13 12:27:40 -0800 |
commit | a3496e14f7ca0f77b804b5be87cd43f919a7c09f (patch) | |
tree | 8f7fe5756ceba80e15eb02e19f7fc038316d8327 /tensorflow/contrib/lite/interpreter.cc | |
parent | ca07b694fc5307b9eec6e3c449382d823b78a162 (diff) |
Fix bug in populating the execution plan sent to the delegate.
- memcpy was missing the array size.
- modified the unit test to verify that the execution plan is
trivial on first delegate invocation.
PiperOrigin-RevId: 185569606
Diffstat (limited to 'tensorflow/contrib/lite/interpreter.cc')
-rw-r--r-- | tensorflow/contrib/lite/interpreter.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/contrib/lite/interpreter.cc b/tensorflow/contrib/lite/interpreter.cc index 6dea4e5916..028449211b 100644 --- a/tensorflow/contrib/lite/interpreter.cc +++ b/tensorflow/contrib/lite/interpreter.cc @@ -166,7 +166,7 @@ TfLiteStatus Interpreter::GetExecutionPlan(TfLiteIntArray** execution_plan) { static_assert(sizeof(plan_cache_->data[0]) == sizeof(execution_plan_[0]), "TfLiteIntArray and execution_plan do not contain same type."); memcpy(plan_cache_->data, execution_plan_.data(), - sizeof(plan_cache_->data[0])); + sizeof(plan_cache_->data[0]) * execution_plan_.size()); return kTfLiteOk; } |