| 503 | } |
| 504 | |
| 505 | XrtTensorHandle 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 | |
| 524 | XrtTensorHandle EnqueueConst(XrtTfContext* context, int device_id, |
| 525 | TensorProto value, bool host_memory) { |
no test coverage detected