| 467 | } |
| 468 | |
| 469 | void TFE_DeleteTensorHandle(TFE_TensorHandle* h) { |
| 470 | if (h == nullptr) return; |
| 471 | VLOG(1) << "Deleting tensor handle " << h << " with internal handle " |
| 472 | << h->handle; |
| 473 | if (h->handle) { |
| 474 | h->handle->Unref(); |
| 475 | } |
| 476 | delete h; |
| 477 | } |
| 478 | |
| 479 | TF_DataType TFE_TensorHandleDataType(TFE_TensorHandle* h) { |
| 480 | return static_cast<TF_DataType>(h->handle->dtype); |