class_docstr: Precision plugin for DeepSpeed integration.
  
  .. warning::  This is an :ref:`experimental <versioning:Experimental API>` feature.
  
  Args:
      precision: Full precision (32-true), half precision (16-true, bf16-true) or
          mixed precision (16-mixed, bf16-mixed).
  
  Raises:
      ValueError:
          If unsupported ``precision`` is provided.
class_docstr_tok: ["Precision","plugin","for","DeepSpeed","integration",".","..","warning",":",":","This","is","an",":","ref",":","`","experimental","<","versioning",":","Experimental","API",">","`","feature",".","Args",":","precision",":","Full","precision","(","32-true",")",",","half","precision","(","16-true",",","bf16-true",")","or","mixed","precision","(","16-mixed",",","bf16-mixed",")",".","Raises",":","ValueError",":","If","unsupported","``","precision","``","is","provided","."]
docstr: Performs back-propagation using DeepSpeed's engine.
  
  Args:
      tensor: the loss tensor
      model: the model to be optimized
      optimizer: ignored for DeepSpeed
      \*args: additional positional arguments for the :meth:`deepspeed.DeepSpeedEngine.backward` call
      \**kwargs: additional keyword arguments for the :meth:`deepspeed.DeepSpeedEngine.backward` call
docstr_tok: ["Performs","back-propagation","using","DeepSpeed","'s","engine",".","Args",":","tensor",":","the","loss","tensor","model",":","the","model","to","be","optimized","optimizer",":","ignored","for","DeepSpeed","\\","*","args",":","additional","positional","arguments","for","the",":","meth",":","`","deepspeed.DeepSpeedEngine.backward","`","call","\\","*","*","kwargs",":","additional","keyword","arguments","for","the",":","meth",":","`","deepspeed.DeepSpeedEngine.backward","`","call"]
code: def backward(  # type: ignore[override]
      self,
      tensor: Tensor,
      model: "pl.LightningModule",
      optimizer: Optional[Steppable],
      *args: Any,
      **kwargs: Any,
  ) -> None:
      r"""Performs back-propagation using DeepSpeed's engine.
  
      Args:
          tensor: the loss tensor
          model: the model to be optimized
          optimizer: ignored for DeepSpeed
          \*args: additional positional arguments for the :meth:`deepspeed.DeepSpeedEngine.backward` call
          \**kwargs: additional keyword arguments for the :meth:`deepspeed.DeepSpeedEngine.backward` call
  
      """
      if is_overridden("backward", model):
          warning_cache.warn(
              "You have overridden the `LightningModule.backward` hook but it will be ignored since DeepSpeed handles"
              " the backward logic internally."
          )
      deepspeed_engine: "deepspeed.DeepSpeedEngine" = (
          model.trainer.model
      )
      deepspeed_engine.backward(tensor, *args, **kwargs)
  
imports: from contextlib import nullcontext
  from typing import TYPE_CHECKING, Any, Callable, ContextManager, Optional, Union
  import torch
  from lightning_utilities import apply_to_collection
  from torch import Tensor
  from torch.nn import Module
  from torch.optim import LBFGS, Optimizer
  from typing_extensions import get_args, override
  import lightning.pytorch
  from lightning.fabric.plugins.precision.deepspeed import _PRECISION_INPUT
  from lightning.fabric.plugins.precision.utils import _convert_fp_tensor, _DtypeContextManager
  from lightning.fabric.utilities.types import Steppable
  from lightning.pytorch.plugins.precision.precision import Precision
  from lightning.pytorch.utilities import GradClipAlgorithmType
  from lightning.pytorch.utilities.exceptions import MisconfigurationException
  from lightning.pytorch.utilities.model_helpers import is_overridden
  from lightning.pytorch.utilities.rank_zero import WarningCache
label_desc: Use image node_id 6 for calling the DeepSpeedPrecision obj's underlying member method code with example usage: obj.backward(tensor, model, optimizer) without return types