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

Method SendTotalBytes

tensorflow/core/kernels/slice_sendrecv_ops.cc:88–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88Status SliceSendOp::SendTotalBytes(OpKernelContext* ctx,
89 const FrameAndIter& frame_iter,
90 const Tensor& input_t) {
91 Rendezvous::Args args;
92 args.device_context = ctx->op_device_context();
93 args.alloc_attrs = AllocatorAttributes();
94
95 Rendezvous::ParsedKey parsed_key;
96 Tensor total_bytes_t;
97 TF_RETURN_IF_ERROR(ctx->allocate_temp(DT_UINT64, TensorShape({}),
98 &total_bytes_t));
99 total_bytes_t.scalar<uint64>()() = input_t.TotalBytes();
100 slice_sendrecv::GetSliceRendezvousKey(key_prefix_,
101 "_slice_transfer_totalbytes", frame_iter, &parsed_key.buf_);
102 VLOG(2) << "SliceSend " << parsed_key.buf_;
103 TF_RETURN_IF_ERROR(Rendezvous::ParseKey(parsed_key.buf_, &parsed_key));
104 return ctx->rendezvous()->Send(parsed_key, args, total_bytes_t,
105 ctx->is_input_dead());
106}
107
108Status SliceSendOp::SendShape(OpKernelContext* ctx,
109 const FrameAndIter& frame_iter,

Callers

nothing calls this directly

Calls 9

AllocatorAttributesClass · 0.85
GetSliceRendezvousKeyFunction · 0.85
rendezvousMethod · 0.80
is_input_deadMethod · 0.80
TensorShapeClass · 0.50
op_device_contextMethod · 0.45
allocate_tempMethod · 0.45
TotalBytesMethod · 0.45
SendMethod · 0.45

Tested by

no test coverage detected