class_docstr: Strategy for training with multiple processes in parallel.
docstr: Perform a all_gather on all processes.
docstr_tok: ["Perform","a","all_gather","on","all","processes","."]
code: def all_gather(
      self,
      tensor: Tensor,
      group: Optional[Any] = None,
      sync_grads: bool = False,
  ) -> Tensor:
      """Perform a all_gather on all processes."""
      return _all_gather_ddp_if_available(
          tensor, group=group, sync_grads=sync_grads
      )
  
imports: from abc import ABC, abstractmethod
  from contextlib import contextmanager
  from typing import Any, Dict, Generator, List, Optional
  import torch
  from torch import Tensor
  from typing_extensions import override
  import lightning.pytorch
  from lightning.fabric.plugins import CheckpointIO, ClusterEnvironment
  from lightning.fabric.utilities.distributed import ReduceOp, _all_gather_ddp_if_available
  from lightning.pytorch.plugins import LayerSync
  from lightning.pytorch.plugins.precision import Precision
  from lightning.pytorch.strategies.strategy import Strategy
label_desc: Use image node_id 11 for calling the ParallelStrategy obj's underlying member method code with example usage: obj.all_gather(tensor, group, sync_grads) and returns: _all_gather_ddp_if_available