class_docstr: A training engine hybrid pipeline, data, and model parallel training.
  
  This engine is created by ``deepspeed.initialize()`` when a :class:`PipelineModule`
  is provided.
code: def _exec_reduce_grads(self):
      self._force_grad_boundary = True
      if self.pipeline_enable_backward_allreduce:
          if self.bfloat16_enabled():
              if self.zero_optimization_stage() == 0:
                  self._bf16_reduce_grads()
              else:
                  assert (
                      self.zero_optimization_stage() == 1
                  ), "only bf16 + z1 are supported"
                  raise NotImplementedError()
          else:
              self.allreduce_gradients(
                  bucket_size=MEMORY_OPT_ALLREDUCE_SIZE
              )
      self._force_grad_boundary = False
  
imports: from types import MethodType
  import torch
  from deepspeed import comm
  from deepspeed.utils import logger
  from deepspeed.utils.timer import ThroughputTimer
  from ..engine import DeepSpeedEngine, MEMORY_OPT_ALLREDUCE_SIZE
  from ..utils import PartitionedTensor
  from ..dataloader import RepeatingLoader
  from .module import PipelineModule, PipelineError
  from .None import p2p
  from .None import schedule
label_desc: Use image node_id 5 for calling the PipelineEngine obj's underlying member method code with example usage: obj._exec_reduce_grads() without return types