Fix failure to allocate objects when reuse_internal_objects is set to false.

PiperOrigin-RevId: 350786502
Change-Id: Ia25c77b1479814063e31f75e7920ffeceb89d565
This commit is contained in:
A. Unique TensorFlower 2021-01-08 10:11:45 -08:00 committed by TensorFlower Gardener
parent 16407535d1
commit c584ef0ee7

View File

@ -384,9 +384,10 @@ absl::Status Runtime::PrepareForExecution() {
RETURN_IF_ERROR(AllocateInternalObject(object)); RETURN_IF_ERROR(AllocateInternalObject(object));
RETURN_IF_ERROR( RETURN_IF_ERROR(
MakeBindingFunc(object, ref, &internal_objects_, &binding)); MakeBindingFunc(object, ref, &internal_objects_, &binding));
} } else {
return status; return status;
} }
}
program.bindings.push_back(std::move(binding)); program.bindings.push_back(std::move(binding));
} }
program.refs.clear(); program.refs.clear();