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

Function CheckDynamicStitchNode

serving/processor/framework/graph_optimizer.cc:1005–1024  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1003}
1004
1005Node* CheckDynamicStitchNode(std::vector<Node*> gather_nodes) {
1006 Node* ds_node = nullptr;
1007 for (size_t i = 0; i < gather_nodes.size(); ++i) {
1008 Node* tmp = FindDynamicStitchNode(gather_nodes[i]);
1009 if (!ds_node) ds_node = tmp;
1010 if (!tmp) {
1011 LOG(FATAL) << "Gather node do not output to a DynamicStitch node, "
1012 << gather_nodes[i]->DebugString();
1013 }
1014 if (tmp != ds_node) {
1015 LOG(FATAL) << "Gather Node output to different DynamicStitch node"
1016 << ", gather node1: " << gather_nodes[0]->DebugString()
1017 << ", DynamicStitch node1: " << ds_node->DebugString()
1018 << ", gather node2: " << gather_nodes[i]->DebugString()
1019 << ", DynamicStitch node2: " << tmp->DebugString();
1020 }
1021 }
1022
1023 return ds_node;
1024}
1025
1026Node* CheckReshapeNode(Node* dynamic_stitch) {
1027 Node* reshape_node = nullptr;

Callers 1

Calls 3

FindDynamicStitchNodeFunction · 0.85
sizeMethod · 0.45
DebugStringMethod · 0.45

Tested by

no test coverage detected