| 540 | } |
| 541 | |
| 542 | string TensorHandle::DebugString() const { |
| 543 | VLOG(1) << "Calling TensorHandle::DebugString() on " << this; |
| 544 | |
| 545 | if (symbolic_tensor_) { |
| 546 | return absl::Substitute("TF_Output($0, $1)", symbolic_tensor_->oper, |
| 547 | symbolic_tensor_->index); |
| 548 | } |
| 549 | |
| 550 | string out; |
| 551 | strings::StrAppend(&out, "Device: ", device_ ? device_->DebugString() : "[]"); |
| 552 | // Consider supporting non-CPU tensors (when device_ is non-NULL) if needed. |
| 553 | strings::StrAppend(&out, ", Tensor: ", |
| 554 | device_ ? "?" : tensor_handle_data_->DebugString(), "\n"); |
| 555 | return out; |
| 556 | } |
| 557 | |
| 558 | } // namespace tensorflow |