| 99 | } |
| 100 | |
| 101 | bool 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 | |
| 113 | using FanoutsMap = |
| 114 | absl::flat_hash_map<MutableGraphView::OutputPort, |
no test coverage detected