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

Function EnqueueRecv

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

Source from the content-addressed store, hash-verified

503}
504
505XrtTensorHandle EnqueueRecv(XrtTfContext* context, DataType dtype,
506 int send_device_id, int recv_device_id,
507 std::string wire_id, bool host_memory) {
508 protobuf::Map<std::string, AttrValue> attrs;
509 const DeviceAttributes& send_device = context->devices().at(send_device_id);
510 const DeviceAttributes& recv_device = context->devices().at(recv_device_id);
511 attrs["tensor_name"] = MakeAttrValue(wire_id);
512 attrs["send_device"] = MakeAttrValue(send_device.name());
513 attrs["send_device_incarnation"] = MakeAttrValue(send_device.incarnation());
514 attrs["recv_device"] = MakeAttrValue(recv_device.name());
515 attrs["client_terminated"] = MakeBoolAttrValue(false);
516 attrs["tensor_type"] = MakeAttrValue(dtype);
517
518 return std::move(context->EnqueueOp(host_memory ? "_HostRecv" : "_Recv",
519 /*inputs=*/{},
520 /*output_arity=*/1, std::move(attrs),
521 recv_device_id)[0]);
522}
523
524XrtTensorHandle EnqueueConst(XrtTfContext* context, int device_id,
525 TensorProto value, bool host_memory) {

Callers 2

CompileMethod · 0.85
SendTensorMethod · 0.85

Calls 7

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

Tested by

no test coverage detected