| 793 | }; |
| 794 | |
| 795 | void SplitDupFuseRecvTables(const GraphInfo& g_info, |
| 796 | const DupFuseRecvTable group, |
| 797 | DupFuseRecvTable* host_recvs, |
| 798 | DupFuseRecvTable* recvs) { |
| 799 | |
| 800 | auto it = group.begin(); |
| 801 | while (it != group.end()) { |
| 802 | const Edge* edge = it->second[0].edge; |
| 803 | const Node* dst = edge->dst(); |
| 804 | const int dst_port = edge->dst_input(); |
| 805 | auto dst_it = g_info.input_types.find({dst->id(), dst_port}); |
| 806 | DCHECK(dst_it != g_info.input_types.end()); |
| 807 | bool host_memory = (dst_it->second == HOST_MEMORY); |
| 808 | |
| 809 | if (host_memory) { |
| 810 | (*host_recvs)[it->first] = it->second; |
| 811 | } else { |
| 812 | (*recvs)[it->first] = it->second; |
| 813 | } |
| 814 | |
| 815 | ++it; |
| 816 | } |
| 817 | } |
| 818 | |
| 819 | void SplitByGatherInputs(const DupFuseRecvTable& full, |
| 820 | DupFuseRecvTable* gather_inputs, |