| 250 | } |
| 251 | |
| 252 | string RingAlg::TensorDebugString(const Tensor& tensor) { |
| 253 | const DeviceBase::GpuDeviceInfo* gpu_device_info = |
| 254 | col_ctx_->op_ctx->device()->tensorflow_gpu_device_info(); |
| 255 | if (gpu_device_info) { |
| 256 | Tensor cpu_tensor(tensor.dtype(), tensor.shape()); |
| 257 | Notification note; |
| 258 | gpu_device_info->default_context->CopyDeviceTensorToCPU( |
| 259 | &tensor, "" /*tensor_name*/, col_ctx_->device, &cpu_tensor, |
| 260 | [¬e](const Status& s) { |
| 261 | DCHECK(s.ok()); |
| 262 | note.Notify(); |
| 263 | }); |
| 264 | note.WaitForNotification(); |
| 265 | return cpu_tensor.SummarizeValue(64); |
| 266 | } else { |
| 267 | return tensor.SummarizeValue(64); |
| 268 | } |
| 269 | } |
| 270 | |
| 271 | void RingAlg::StartAbort(const Status& s) { |
| 272 | // In abort mode we stop issuing additional ProvideBuf |
nothing calls this directly
no test coverage detected