class_docstr: ZeRO DDP.
  Warning: Nested GeminiDDP is not supported now.
  It is designed to be used with ChunkManager and GeminiManager.
  For more details, see the API reference of ``ChunkManager`` and ``GeminiManager``.
  
  Args:
      module (torch.nn.Module): Module to apply ZeRO-DP.
      gemini_manager (GeminiManager): Manages the chunk manager and heterogeneous memory space.
          For more details, see the API reference of ``GeminiManager``.
      pin_memory (bool): Chunks on CPU Memory use pin-memory.
      force_outputs_fp32 (bool): If set to True, outputs will be fp32. Otherwise, outputs will be fp16.
          Defaults to False.
      strict_ddp_mode (bool): If set to True, there is no tensor sharding, each tensor is replicated.
          Defaults to False. Users can set it to True, when they clearly know that they only need DDP.
      scatter_after_inference (bool): If set to True, the model will be scattered after inference. This will save memory but slow down the consecutive inference.
      mixed_precision (torch.dtype): If set to torch.float16, the model will be trained in fp16. Otherwise, the model will be trained in bf16. Defaults to torch.float16.
code: def zero_grad(self, set_to_none: bool = False) -> None:
      self.module.zero_grad(set_to_none=True)
  
imports: import itertools
  from collections import OrderedDict
  from contextlib import nullcontext
  from functools import partial
  from typing import Dict, Iterable, Iterator, List, Optional, Set, Tuple, Union
  import torch
  import torch.distributed
  import torch.nn
  from torch.distributed import ProcessGroup
  from torch.distributed.distributed_c10d import _get_default_group
  from colossalai.checkpoint_io.utils import StateDictSharder, gather_distributed_param
  from colossalai.interface import ModelWrapper
  from colossalai.lazy import LazyTensor
  from colossalai.logging import get_dist_logger
  from colossalai.tensor.colo_parameter import ColoParameter
  from colossalai.tensor.d_tensor import distribute_tensor, distribute_tensor_with_customization, get_device_mesh, get_global_shape, get_sharding_spec, init_as_dtensor, init_tensor_as_customization_distributed, is_customized_distributed_tensor, is_distributed_tensor
  from colossalai.tensor.param_op_hook import ColoParamOpHookManager
  from colossalai.utils import _cast_float, free_storage, get_current_device, is_ddp_ignored
  from .chunk import Chunk, ChunkManager, TensorState, init_chunk_manager
  from .gemini_hook import GeminiZeROHook
  from .gemini_mgr import GeminiManager
  from .memory_tracer import MemStats, OrderedParamGenerator
  from .utils import get_temp_total_chunk_on_cuda
label_desc: Use image node_id 18 for calling the GeminiDDP obj's underlying member method code with example usage: obj.zero_grad(set_to_none) without return types