class_docstr: Strategy that handles communication on a single device.
class_docstr_tok: ["Strategy","that","handles","communication","on","a","single","device","."]
docstr: Perform a ``all_gather`` on all processes.
docstr_tok: ["Perform","a","``","all_gather","``","on","all","processes","."]
code: def all_gather(
      self,
      tensor: torch.Tensor,
      group: Any | None = None,
      sync_grads: bool = False,
  ) -> torch.Tensor:
      """Perform a ``all_gather`` on all processes."""
      return tensor
  
imports: from __future__ import annotations
  from typing import Any
  import torch
  from torch.nn import Module
  from typing_extensions import override
  from lightning.fabric.accelerators import Accelerator
  from lightning.fabric.plugins.io.checkpoint_io import CheckpointIO
  from lightning.fabric.plugins.precision import Precision
  from lightning.fabric.strategies.strategy import Strategy, TBroadcast
  from lightning.fabric.utilities.types import _DEVICE
label_desc: Use image node_id 6 for calling the SingleDeviceStrategy obj's underlying member method code with example usage: obj.all_gather(tensor, group, sync_grads) and returns: tensor