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

Function EnqueueSend

tensorflow/compiler/xrt/client/xrt_tf_client.cc:486–503  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

484}
485
486void EnqueueSend(XrtTfContext* context, const XrtTensorHandle& tensor,
487 DataType dtype, int recv_device_id, std::string wire_id,
488 bool host_memory,
489 std::shared_ptr<XrtRecvTensorFuture> future) {
490 protobuf::Map<std::string, AttrValue> attrs;
491 const DeviceAttributes& device = context->devices().at(tensor.device_id());
492 attrs["tensor_name"] = MakeAttrValue(wire_id);
493 attrs["send_device"] = MakeAttrValue(device.name());
494 attrs["send_device_incarnation"] = MakeAttrValue(device.incarnation());
495 attrs["recv_device"] =
496 MakeAttrValue(GetReceiverDevice(context, recv_device_id));
497 attrs["client_terminated"] = MakeBoolAttrValue(false);
498 attrs["T"] = MakeAttrValue(dtype);
499
500 context->EnqueueOp(host_memory ? "_HostSend" : "_Send", {&tensor},
501 /*output_arity=*/0, std::move(attrs), tensor.device_id(),
502 future);
503}
504
505XrtTensorHandle EnqueueRecv(XrtTfContext* context, DataType dtype,
506 int send_device_id, int recv_device_id,

Callers 3

CompileMethod · 0.85
SendTensorMethod · 0.85
RecvTensorMethod · 0.85

Calls 9

MakeAttrValueFunction · 0.85
GetReceiverDeviceFunction · 0.85
MakeBoolAttrValueFunction · 0.85
incarnationMethod · 0.80
nameMethod · 0.65
atMethod · 0.45
devicesMethod · 0.45
device_idMethod · 0.45
EnqueueOpMethod · 0.45

Tested by

no test coverage detected