class_docstr: The DDP module that supports DataContainer.
  
  This MMDDP has some differences with the original MMDDP:
  
  - It implements a ``forward()`` method
  - It update the code in ``train_step()`` ``val_step()`` and ``_run_ddp_forward()``
  when self.device_ids is None, which means training with CPU
  
  related issues:
  - https://github.com/open-mmlab/mmcv/issues/2524
  - https://github.com/open-mmlab/mmcv/issues/2558
  When the issues above is solved by mmcv, this file can be deleted, then directly
  use the MMDDP implemented by mmcv in MMCVRayEpochRunner.
docstr: Processes inputs and runs ``self.module.forward``.
  
  Pytorch 1.12.0 performs ``self.module.forward`` in ``_run_ddp_forward``
  and deprecates using ``DistributedDataParallel.to_kwargs`` to
  process inputs, which leads to inputs cannot be processed by
  :meth:`MMDistributedDataParallel.to_kwargs` anymore. Therefore,
  ``MMDistributedDataParallel`` overrides this method to call
  :meth:`to_kwargs` explicitly.
  
  See more information in `<https://github.com/open-mmlab/mmsegmentation/issues/1742>`_.  # noqa: E501
  
  Returns:
      Any: Forward result of :attr:`module`.
docstr_tok: ["Processes","inputs","and","runs","``","self.module.forward","``",".","Pytorch","1.12.0","performs","``","self.module.forward","``","in","``","_run_ddp_forward","``","and","deprecates","using","``","DistributedDataParallel.to_kwargs","``","to","process","inputs",",","which","leads","to","inputs","can","not","be","processed","by",":","meth",":","`","MMDistributedDataParallel.to_kwargs","`","anymore",".","Therefore",",","``","MMDistributedDataParallel","``","overrides","this","method","to","call",":","meth",":","`","to_kwargs","`","explicitly",".","See","more","information","in","`","<","https",":","\/\/github.com\/open-mmlab\/mmsegmentation\/issues\/1742",">","`","_",".","#","noqa",":","E501","Returns",":","Any",":","Forward","result","of",":","attr",":","`","module","`","."]
code: def _run_ddp_forward(self, *inputs, **kwargs) -> Any:
      """Processes inputs and runs ``self.module.forward``.
  
      Pytorch 1.12.0 performs ``self.module.forward`` in ``_run_ddp_forward``
      and deprecates using ``DistributedDataParallel.to_kwargs`` to
      process inputs, which leads to inputs cannot be processed by
      :meth:`MMDistributedDataParallel.to_kwargs` anymore. Therefore,
      ``MMDistributedDataParallel`` overrides this method to call
      :meth:`to_kwargs` explicitly.
  
      See more information in `<https://github.com/open-mmlab/mmsegmentation/issues/1742>`_.  # noqa: E501
  
      Returns:
          Any: Forward result of :attr:`module`.
      """
      module_to_run = (
          self._replicated_tensor_module
          if self._use_replicated_tensor_module
          else self.module
      )
  
      device_id = self.device_ids[0] if self.device_ids else -1
      inputs, kwargs = self.to_kwargs(  # type: ignore
          inputs, kwargs, device_id
      )
      return module_to_run(*inputs[0], **kwargs[0])
  
file_path: BigDL/python/orca/src/bigdl/orca/learn/pytorch/experimential/mmcv/distributed.py
imports: from typing import Any, List, Tuple
  import torch
  from torch.nn.parallel.distributed import DistributedDataParallel, _find_tensors
  from mmcv import print_log
  from mmcv.utils import TORCH_VERSION, digit_version
  from mmcv.parallel.scatter_gather import ScatterInputs, scatter_kwargs
label_desc: Use image node_id 6 for calling the MMDistributedDataParallel obj's underlying member method code with example usage: obj._run_ddp_forward() and returns: module_to_run