code: def forward(
      self,
      input: torch.Tensor,
      residual: torch.Tensor,
      weight_interm: torch.Tensor,
      weight_out: torch.Tensor,
      input_bias: Optional[torch.Tensor] = None,
      bias: Optional[torch.Tensor] = None,
      gamma: Optional[torch.Tensor] = None,
      beta: Optional[torch.Tensor] = None,
  ):
      if self.config.norm_type == NormType.LayerNorm:
          output, residual_add = self.mlp_gemm_func(
              input,
              residual,
              input_bias,
              weight_interm,
              weight_out,
              bias,
              gamma,
              beta,
              self.config.epsilon,
              self.config.pre_layer_norm,
              self.config.mlp_after_attn,
              weight_interm.scale if hasattr(weight_interm, "scale") else torch.empty(1),  # type: ignore
              weight_out.scale if hasattr(weight_out, "scale") else torch.empty(1),  # type: ignore
              self.config.dtype == torch.int8,
              self.config.mlp_act_func_type,
              self.config.transposed_mode,
          )
      else:
          if input_bias is not None:
              input += input_bias
          output, residual_add = self.mlp_gemm_func(
              input,
              residual,
              weight_interm,
              weight_out,
              gamma,
              self.config.epsilon,
              weight_interm.scale if hasattr(weight_interm, "scale") else torch.empty(1),  # type: ignore
              weight_out.scale if hasattr(weight_out, "scale") else torch.empty(1),  # type: ignore
              self.config.dtype == torch.int8,
              self.config.mlp_act_func_type,
              self.config.transposed_mode,
          )
      return output, residual_add
  
file_path: DeepSpeed/deepspeed/ops/transformer/inference/op_binding/mlp_gemm.py
imports: from typing import Optional
  import os
  import torch
  import torch.nn.functional
  from ..config import DeepSpeedInferenceConfig
  from .base import BaseOp
  from deepspeed.utils.types import NormType
label_desc: Use image node_id 4 for calling the MLPGemmOp obj's underlying member method code with example usage: obj.forward(input, residual, weight_interm, weight_out, input_bias, bias, gamma, beta) and returns: output,  residual_add