tensorflow/core/tpu/graph_rewrite/tpu_embedding_software_deduplication_rewrite_pass.cc
// Gets the src node names for the incoming control edges of the node_def.
Gets the src node names for the incoming control edges of the node_def.
Gets the src node names for the incoming control edges of the node_def .
std::vector<std::string> GetControlInputs(const NodeDef& node_def) {
  std::vector<std::string> control_inputs;
  for (const std::string& input : node_def.input()) {
    const TensorId tensor_id = ParseTensorName(input);
    if (tensor_id.index() == Graph::kControlSlot &&
        tensor_id.first != "RecvTPUEmbeddingActivations") {
      control_inputs.emplace_back(tensor_id.node());
    }
  }
  return control_inputs;
}
std :: vector < std :: string > GetControlInputs ( const NodeDef & node_def ) { std :: vector < std :: string > control_inputs ; for ( const std :: string & input : node_def . input ( ) ) { const TensorId tensor_id = ParseTensorName ( input ) ; if ( tensor_id . index ( ) == Graph :: kControlSlot && tensor_id . first != " " ) { control_inputs . emplace_back ( tensor_id . node ( ) ) ; } } return control_inputs ; }
Gets the src node names for the incoming control edges of the node_def.
Gets the src node names for the incoming control edges of the node_def .
// TF2 inserts additional control dependencies within a tf.function. // Filter out RecvTPUEmbeddingActivations so that we do not create a cycle.