| 503 | } |
| 504 | |
| 505 | int64_t TFE_TensorHandleDim(TFE_TensorHandle* h, int dim_index, |
| 506 | TF_Status* status) { |
| 507 | if (h == nullptr || h->handle == nullptr) { |
| 508 | status->status = tensorflow::errors::InvalidArgument( |
| 509 | "The passed in handle is a nullptr"); |
| 510 | return -1; |
| 511 | } |
| 512 | tensorflow::int64 result; |
| 513 | status->status = h->handle->Dim(dim_index, &result); |
| 514 | return result; |
| 515 | } |
| 516 | |
| 517 | const char* TFE_TensorHandleDeviceName(TFE_TensorHandle* h, TF_Status* status) { |
| 518 | if (h == nullptr || h->handle == nullptr) { |