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

Function FillInputs

tensorflow/core/graph/mkl_layout_pass.cc:2057–2069  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2055//////////////////////////////////////////////////////////////////////////
2056
2057static void FillInputs(const Node* n,
2058 gtl::InlinedVector<Node*, 4>* control_edges,
2059 gtl::InlinedVector<std::pair<Node*, int>, 4>* in) {
2060 control_edges->clear();
2061 for (const Edge* e : n->in_edges()) {
2062 if (e->IsControlEdge()) {
2063 control_edges->push_back(e->src());
2064 } else {
2065 (*in)[e->dst_input()] = std::make_pair(e->src(), e->src_output());
2066 }
2067 }
2068 std::sort(control_edges->begin(), control_edges->end());
2069}
2070
2071void MklLayoutRewritePass::GetNodesProducingTFTensorList(
2072 const gtl::InlinedVector<std::pair<Node*, int>, 4>& inputs, int* input_idx,

Calls 9

sortFunction · 0.85
clearMethod · 0.45
IsControlEdgeMethod · 0.45
push_backMethod · 0.45
srcMethod · 0.45
dst_inputMethod · 0.45
src_outputMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected