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

Function IsGeneratorNode

tensorflow/core/common_runtime/placer.cc:45–48  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

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.
45bool IsGeneratorNode(const Node* node) {
46 return node->num_inputs() == 0 && node->num_outputs() == 1 &&
47 !IsRefType(node->output_type(0));
48}
49
50void LogDeviceAssignment(const Node* node, bool log_device_placement) {
51 // Log placement if log_device_placement is set.

Callers 1

RunMethod · 0.85

Calls 4

IsRefTypeFunction · 0.85
num_inputsMethod · 0.45
num_outputsMethod · 0.45
output_typeMethod · 0.45

Tested by

no test coverage detected