| 106 | } |
| 107 | |
| 108 | Status SliceSendOp::SendShape(OpKernelContext* ctx, |
| 109 | const FrameAndIter& frame_iter, |
| 110 | const Tensor& input_t) { |
| 111 | Rendezvous::Args args; |
| 112 | args.device_context = ctx->op_device_context(); |
| 113 | args.alloc_attrs = AllocatorAttributes(); |
| 114 | Rendezvous::ParsedKey parsed_key; |
| 115 | |
| 116 | Tensor shape_t; |
| 117 | TensorShape shape = input_t.shape(); |
| 118 | const int rank = shape.dims(); |
| 119 | TF_RETURN_IF_ERROR(ctx->allocate_temp(DT_INT64, TensorShape({rank}), |
| 120 | &shape_t)); |
| 121 | auto shape_vec = shape_t.vec<int64>(); |
| 122 | for (int i = 0; i < rank; i++) { |
| 123 | shape_vec(i) = shape.dim_size(i); |
| 124 | } |
| 125 | slice_sendrecv::GetSliceRendezvousKey(key_prefix_, |
| 126 | "_slice_transfer_shape", frame_iter, &parsed_key.buf_); |
| 127 | VLOG(2) << "SliceSend " << parsed_key.buf_; |
| 128 | TF_RETURN_IF_ERROR(Rendezvous::ParseKey(parsed_key.buf_, &parsed_key)); |
| 129 | return ctx->rendezvous()->Send(parsed_key, args, shape_t, |
| 130 | ctx->is_input_dead()); |
| 131 | } |
| 132 | |
| 133 | Status SliceSendOp::SendString(OpKernelContext* ctx, |
| 134 | const FrameAndIter& frame_iter, |
nothing calls this directly
no test coverage detected