From c584ef0ee758ded21a67196c8572057df650f29c Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Fri, 8 Jan 2021 10:11:45 -0800 Subject: [PATCH] Fix failure to allocate objects when reuse_internal_objects is set to false. PiperOrigin-RevId: 350786502 Change-Id: Ia25c77b1479814063e31f75e7920ffeceb89d565 --- tensorflow/lite/delegates/gpu/gl/runtime.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tensorflow/lite/delegates/gpu/gl/runtime.cc b/tensorflow/lite/delegates/gpu/gl/runtime.cc index 6a75973f4a2..ce029efad68 100644 --- a/tensorflow/lite/delegates/gpu/gl/runtime.cc +++ b/tensorflow/lite/delegates/gpu/gl/runtime.cc @@ -384,8 +384,9 @@ absl::Status Runtime::PrepareForExecution() { RETURN_IF_ERROR(AllocateInternalObject(object)); RETURN_IF_ERROR( MakeBindingFunc(object, ref, &internal_objects_, &binding)); + } else { + return status; } - return status; } program.bindings.push_back(std::move(binding)); }