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

Function GetInputNodesInfo

serving/processor/framework/graph_optimizer.cc:761–784  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

759}
760
761Status 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
786Status Create1DStringConstOp(const std::string& name,
787 tensorflow::DataType type,

Callers 4

ConvertKVOpsMethod · 0.85
ConvertToHashTableOpsMethod · 0.85
CreateIncrRestoreOpMethod · 0.85

Calls 11

IsKvOpsFunction · 0.85
InternalFunction · 0.85
to_stringFunction · 0.85
resizeMethod · 0.45
num_inputsMethod · 0.45
IsControlEdgeMethod · 0.45
push_backMethod · 0.45
srcMethod · 0.45
src_outputMethod · 0.45
dst_inputMethod · 0.45
DebugStringMethod · 0.45

Tested by

no test coverage detected