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

Function CheckReshapeNode

serving/processor/framework/graph_optimizer.cc:1026–1045  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1024}
1025
1026Node* CheckReshapeNode(Node* dynamic_stitch) {
1027 Node* reshape_node = nullptr;
1028 for (const Edge* edge : dynamic_stitch->out_edges()) {
1029 if (!edge->IsControlEdge() &&
1030 edge->dst()->op_def().name() == "Reshape") {
1031 if (reshape_node) {
1032 LOG(FATAL) << "Found many reshape node edges from DynamicStitch node: "
1033 << dynamic_stitch->DebugString();
1034 }
1035 reshape_node = edge->dst();
1036 }
1037 }
1038
1039 if (!reshape_node) {
1040 LOG(FATAL) << "Can not found reshape node edges from DynamicStitch node: "
1041 << dynamic_stitch->DebugString();
1042 }
1043
1044 return reshape_node;
1045}
1046
1047Node* InternalFindUniqueNode(Node* n) {
1048 std::unordered_set<Node*> pushed;

Callers 1

Calls 5

nameMethod · 0.65
IsControlEdgeMethod · 0.45
op_defMethod · 0.45
dstMethod · 0.45
DebugStringMethod · 0.45

Tested by

no test coverage detected