| 86 | } // namespace |
| 87 | |
| 88 | bool HasForwardedRefInput(const Node& node) { |
| 89 | if (AlwaysForwardsRefInput(node)) { |
| 90 | for (const Edge* incoming_edge : node.in_edges()) { |
| 91 | if (incoming_edge->IsControlEdge()) { |
| 92 | continue; |
| 93 | } |
| 94 | |
| 95 | Node* incoming_node = incoming_edge->src(); |
| 96 | if (IsRefType(incoming_node->output_type(incoming_edge->src_output()))) { |
| 97 | VLOG(2) << "Node " << node.def().ShortDebugString() << " has ref input " |
| 98 | << incoming_node->name() << " " << incoming_node->type_string(); |
| 99 | return true; |
| 100 | } |
| 101 | } |
| 102 | } |
| 103 | return false; |
| 104 | } |
| 105 | |
| 106 | xla::StatusOr<bool> CreateCycleDetectionGraph(const Graph* graph, |
| 107 | GraphCycles* cycles) { |
no test coverage detected