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.
class_docstr_tok: ["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_send_activations(self, buffer_id):
      if self.wall_clock_breakdown():
          self.timers(PIPE_SEND_OUTPUT_TIMER).start()
  
      outputs = self.pipe_buffers["outputs"][buffer_id]
  
      # NCCL does not like to send torch.BoolTensor types, so cast the mask to half().
      # We could do char, but with half() we can eventually flatten with other fp16
      # messages (TODO)
      if self.has_attention_mask or self.has_bool_tensors:
          outputs = list(outputs)
          outputs[-1] = outputs[-1].half()
          outputs = tuple(outputs)
  
      if self.first_output_send:
          self.first_output_send = False
          self._send_tensor_meta(outputs, self.next_stage)
  
      if isinstance(outputs, torch.Tensor):
          p2p.send(outputs, self.next_stage)
      elif isinstance(outputs, tuple):
          for idx, buffer in enumerate(outputs):
              p2p.send(buffer, self.next_stage)
      else:
          raise NotImplementedError(
              "Could not send output of type " f"{type(outputs)}"
          )
  
      # Restore the boolean tensor
      if self.has_attention_mask or self.has_bool_tensors:
          outputs = list(outputs)
          outputs[-1] = outputs[-1].bool()
          outputs = tuple(outputs)
  
      if self.wall_clock_breakdown():
          self.timers(PIPE_SEND_OUTPUT_TIMER).stop()
  
imports: from types import MethodType
  import torch
  from deepspeed import comm
  from deepspeed.utils import logger
  from deepspeed.utils.timer import ThroughputTimer
  from deepspeed.accelerator import get_accelerator
  from deepspeed.runtime.bf16_optimizer import BF16_Optimizer
  from ..engine import DeepSpeedEngine, MEMORY_OPT_ALLREDUCE_SIZE
  from deepspeed.utils.timer import FORWARD_MICRO_TIMER, FORWARD_GLOBAL_TIMER, BACKWARD_MICRO_TIMER, BACKWARD_GLOBAL_TIMER, BACKWARD_INNER_MICRO_TIMER, BACKWARD_INNER_GLOBAL_TIMER, BACKWARD_REDUCE_MICRO_TIMER, BACKWARD_REDUCE_GLOBAL_TIMER, STEP_MICRO_TIMER, STEP_GLOBAL_TIMER
  from ..utils import PartitionedTensor
  from ..dataloader import RepeatingLoader
  from ..zero.config import ZeroStageEnum
  from ..activation_checkpointing import checkpointing
  from .module import PipelineModule, PipelineError
  from .None import p2p
  from .None import schedule
label_desc: Use image node_id 29 for calling the PipelineEngine obj's underlying member method code with example usage: obj._exec_send_activations(buffer_id) without return types