class_docstr: Launch collectives on one replica.
class_docstr_tok: ["Launch","collectives","on","one","replica","."]
docstr: All-gather a dense tensor.
  
  Args:
    input_tensor: a dense tensor. It must have the same shape on all replicas.
    options: an optional tf.distribute.experimental.CommunicationOptions. If
      provided, it overrides the default options.
  
  Returns:
    The reduced tensor.
docstr_tok: ["All-gather","a","dense","tensor",".","Args",":","input_tensor",":","a","dense","tensor",".","It","must","have","the","same","shape","on","all","replicas",".","options",":","an","optional","tf.distribute.experimental.CommunicationOptions",".","If","provided",",","it","overrides","the","default","options",".","Returns",":","The","reduced","tensor","."]
code: def _all_gather(
      self,
      input_tensor: core.TensorLike,
      options: Optional[collective_util.Options],
  ) -> core.Tensor:
      """All-gather a dense tensor.
  
      Args:
        input_tensor: a dense tensor. It must have the same shape on all replicas.
        options: an optional tf.distribute.experimental.CommunicationOptions. If
          provided, it overrides the default options.
  
      Returns:
        The reduced tensor.
      """
      instance_key = self._next_instance_key()
      options = self._options.merge(options)
      ordering_token = self._get_ordering_token()
      with ops.device(self._device):
          return collective_ops.all_gather_v2(
              input_tensor,
              self._group_size,
              self._group_key,
              instance_key,
              communication_hint=options.implementation.value,
              timeout=options.timeout_seconds,
              ordering_token=ordering_token,
          )
  
imports: import copy
  import threading
  from typing import Callable, List, Optional, Union
  from tensorflow.python.distribute import collective_util
  from tensorflow.python.distribute import values
  from tensorflow.python.eager import backprop_util
  from tensorflow.python.eager import context
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import indexed_slices
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import collective_ops
  from tensorflow.python.ops import cond
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nccl_ops
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.types import core
label_desc: Use image node_id 9 for calling the CollectiveReplicaLauncher obj's underlying member method code with example usage: obj._all_gather(input_tensor, options) and returns: collective_ops