| 484 | } |
| 485 | |
| 486 | void 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 | |
| 505 | XrtTensorHandle EnqueueRecv(XrtTfContext* context, DataType dtype, |
| 506 | int send_device_id, int recv_device_id, |
no test coverage detected