| 759 | } |
| 760 | |
| 761 | Status GetInputNodesInfo(std::vector<SrcInfo>* input_info, |
| 762 | const Node* node) { |
| 763 | int edge_count = 0; |
| 764 | if (IsKvOps(node)) { |
| 765 | (*input_info).resize(node->num_inputs()); |
| 766 | for (const Edge* edge : node->in_edges()) { |
| 767 | if (edge->IsControlEdge()) { |
| 768 | (*input_info).push_back({edge->src(), edge->src_output()}); |
| 769 | } else { |
| 770 | ++edge_count; |
| 771 | (*input_info)[edge->dst_input()] = {edge->src(), edge->src_output()}; |
| 772 | } |
| 773 | } |
| 774 | |
| 775 | if (edge_count != node->num_inputs()) { |
| 776 | return tensorflow::errors::Internal( |
| 777 | "Edge count not match, node = ", node->DebugString(), |
| 778 | ", need ", std::to_string(node->num_inputs()), |
| 779 | ", got ", std::to_string(edge_count)); |
| 780 | } |
| 781 | } |
| 782 | |
| 783 | return Status::OK(); |
| 784 | } |
| 785 | |
| 786 | Status Create1DStringConstOp(const std::string& name, |
| 787 | tensorflow::DataType type, |
no test coverage detected