| 1003 | } |
| 1004 | |
| 1005 | Node* 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 | |
| 1026 | Node* CheckReshapeNode(Node* dynamic_stitch) { |
| 1027 | Node* reshape_node = nullptr; |
no test coverage detected