docstr: A tensor sharded in multiple processes. Constructed from an existing torch.Tensor instance.
code: def __init__(
      self, tensor: torch.Tensor, state: TensorState = TensorState.HOLD
  ) -> None:
      r"""
      A tensor sharded in multiple processes. Constructed from an existing torch.Tensor instance.
      """
      assert tensor.requires_grad is False
      super().__init__(tensor, state)
  
      # kept the shape, numel and dtype of the init tensor.
      self._origin_shape = tensor.shape
      self._origin_numel = tensor.numel()
      self._origin_dtype = tensor.dtype
      self._is_sharded = False
  
file_path: colossalai/colossalai/legacy/zero/sharded_param/sharded_tensor.py
imports: import torch
  from colossalai.legacy.zero.gemini.stateful_tensor import StatefulTensor, TensorState
label_desc: Use image node_id 1 to create a new ShardedTensor object from inherited base classes: StatefulTensor with example: obj = ShardedTensor(tensor, state)