| 312 | } |
| 313 | |
| 314 | Status FileSliceRecvOp::RecvUInt64MetaMsg(OpKernelContext* ctx, |
| 315 | const FrameAndIter& frame_iter, |
| 316 | const string& name, bool &is_dead, |
| 317 | uint64& val) { |
| 318 | Rendezvous::Args args; |
| 319 | args.device_context = ctx->op_device_context(); |
| 320 | args.alloc_attrs = AllocatorAttributes(); |
| 321 | if (ctx->is_eager()) { |
| 322 | // NOTE(fishx): Only set cancellation_manager in eager mode. Because in |
| 323 | // Tensorflow 1.x, session (or graph_mgr) will abort the underlying |
| 324 | // rendezvous if it encounters any error. |
| 325 | args.cancellation_manager = ctx->cancellation_manager(); |
| 326 | } |
| 327 | |
| 328 | Rendezvous::ParsedKey parsed_key; |
| 329 | Tensor val_t; |
| 330 | slice_sendrecv::GetSliceRendezvousKey(key_prefix_, name, frame_iter, |
| 331 | &parsed_key.buf_); |
| 332 | VLOG(2) << "FileSliceRecv " << parsed_key.buf_; |
| 333 | TF_RETURN_IF_ERROR(Rendezvous::ParseKey(parsed_key.buf_, &parsed_key)); |
| 334 | TF_RETURN_IF_ERROR( |
| 335 | ctx->rendezvous()->Recv(parsed_key, args, &val_t, &is_dead, timeout_ms_)); |
| 336 | if (!is_dead) { |
| 337 | val = val_t.scalar<uint64>()(); |
| 338 | } |
| 339 | |
| 340 | return Status::OK(); |
| 341 | } |
| 342 | |
| 343 | Status FileSliceRecvOp::RecvTotalBytes(OpKernelContext* ctx, |
| 344 | const FrameAndIter& frame_iter, |
nothing calls this directly
no test coverage detected