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

Function CheckUniqueNode

serving/processor/framework/graph_optimizer.cc:1072–1093  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1070}
1071
1072Node* CheckUniqueNode(std::vector<Node*> gather_nodes) {
1073 Node* unique_node = nullptr;
1074
1075 for (size_t i = 0; i < gather_nodes.size(); ++i) {
1076 Node* tmp_node = InternalFindUniqueNode(gather_nodes[i]);
1077 if (!tmp_node) {
1078 LOG(FATAL) << "Can not found unique node from current gather node: "
1079 << gather_nodes[i]->DebugString();
1080 }
1081 if (!unique_node) unique_node = tmp_node;
1082
1083 if (tmp_node != unique_node) {
1084 LOG(FATAL) << "Found different unique nodes from two gather node "
1085 << ", gather node1: " << gather_nodes[0]->DebugString()
1086 << ", unique node1: " << unique_node->DebugString()
1087 << ", gather node2: " << gather_nodes[i]->DebugString()
1088 << ", unique node2: " << tmp_node->DebugString();
1089 }
1090 }
1091
1092 return unique_node;
1093}
1094
1095Status ModifySharedNameAttr(Node* new_var_op, int curr_partition_id) {
1096 std::string shared_name;

Callers 1

Calls 3

InternalFindUniqueNodeFunction · 0.85
sizeMethod · 0.45
DebugStringMethod · 0.45

Tested by

no test coverage detected