Returns true if the node has no inputs and produces outputs that are consumed by a single node. TODO(vrv): Currently this handles only nodes with one output, but this could be extended to handle the case where a node has many outputs that are connected to nodes in the same colocation group.
| 43 | // this could be extended to handle the case where a node has many |
| 44 | // outputs that are connected to nodes in the same colocation group. |
| 45 | bool IsGeneratorNode(const Node* node) { |
| 46 | return node->num_inputs() == 0 && node->num_outputs() == 1 && |
| 47 | !IsRefType(node->output_type(0)); |
| 48 | } |
| 49 | |
| 50 | void LogDeviceAssignment(const Node* node, bool log_device_placement) { |
| 51 | // Log placement if log_device_placement is set. |
no test coverage detected