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

Function SplitDupFuseRecvTables

tensorflow/core/graph/graph_partition.cc:795–817  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

793};
794
795void 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
819void SplitByGatherInputs(const DupFuseRecvTable& full,
820 DupFuseRecvTable* gather_inputs,

Callers 1

HandleFuseRecvGroupFunction · 0.85

Calls 6

beginMethod · 0.45
endMethod · 0.45
dstMethod · 0.45
dst_inputMethod · 0.45
findMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected