| 47 | } |
| 48 | |
| 49 | Node* Recv(Graph* g, const string& tensor, const string& type, |
| 50 | const string& sender, const uint64 sender_incarnation, |
| 51 | const string& receiver) { |
| 52 | Node* ret; |
| 53 | DataType dtype; |
| 54 | CHECK(DataTypeFromString(type, &dtype)); |
| 55 | TF_CHECK_OK(NodeBuilder(g->NewName("n"), "_Recv") |
| 56 | .Attr("tensor_type", dtype) |
| 57 | .Attr("tensor_name", tensor) |
| 58 | .Attr("send_device", sender) |
| 59 | .Attr("send_device_incarnation", |
| 60 | static_cast<int64>(sender_incarnation)) |
| 61 | .Attr("recv_device", receiver) |
| 62 | .Finalize(g, &ret)); |
| 63 | return ret; |
| 64 | } |
| 65 | |
| 66 | Node* Constant(Graph* g, const Tensor& tensor) { |
| 67 | Node* ret; |
no test coverage detected