This commit is contained in:
Anthony Platanios 2017-08-28 17:11:58 -04:00 committed by Martin Wicke
parent 0d1f2d0bcc
commit bfdffb2adb

View File

@ -537,14 +537,7 @@ void TFE_ContextAddFunctionDef(TFE_Context* ctx,
} // extern "C" } // extern "C"
TFE_TensorHandle* TFE_NewTensorHandle(const tensorflow::Tensor& t) { TFE_TensorHandle* TFE_NewTensorHandle(const tensorflow::Tensor& t) {
TF_Status* status = TF_NewStatus(); return new TFE_TensorHandle(t, nullptr);
TFE_TensorHandle* tensor = TFE_NewTensorHandle(t, status);
if (TF_GetCode(status) != TF_OK) {
TF_DeleteStatus(status);
return nullptr;
}
TF_DeleteStatus(status);
return tensor;
} }
const tensorflow::Tensor* TFE_TensorHandleUnderlyingTensorInHostMemory( const tensorflow::Tensor* TFE_TensorHandleUnderlyingTensorInHostMemory(