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

Function HasRegularFaninNode

tensorflow/core/grappler/mutable_graph_view.cc:101–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101bool HasRegularFaninNode(const MutableGraphView& graph, const NodeDef& node,
102 absl::string_view fanin_node_name) {
103 const int num_regular_fanins =
104 graph.NumFanins(node, /*include_controlling_nodes=*/false);
105 for (int i = 0; i < num_regular_fanins; ++i) {
106 if (ParseTensorName(node.input(i)).node() == fanin_node_name) {
107 return true;
108 }
109 }
110 return false;
111}
112
113using FanoutsMap =
114 absl::flat_hash_map<MutableGraphView::OutputPort,

Callers 2

UpdateNodeMethod · 0.85
SwapNodeNamesMethod · 0.85

Calls 4

ParseTensorNameFunction · 0.85
NumFaninsMethod · 0.80
nodeMethod · 0.45
inputMethod · 0.45

Tested by

no test coverage detected