MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / RecvUInt64MetaMsg

Method RecvUInt64MetaMsg

tensorflow/core/kernels/file_slice_sendrecv_ops.cc:314–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

312}
313
314Status 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
343Status FileSliceRecvOp::RecvTotalBytes(OpKernelContext* ctx,
344 const FrameAndIter& frame_iter,

Callers

nothing calls this directly

Calls 7

AllocatorAttributesClass · 0.85
GetSliceRendezvousKeyFunction · 0.85
is_eagerMethod · 0.80
rendezvousMethod · 0.80
op_device_contextMethod · 0.45
cancellation_managerMethod · 0.45
RecvMethod · 0.45

Tested by

no test coverage detected