class_docstr: CUTLASS implementation of MoE GEMM.
code: def __init__(
      self, fp_dtype: DtypeEnum, act_fn: ActivationType
  ) -> None:
      if not isinstance(fp_dtype, DtypeEnum):
          fp_dtype = DtypeEnum(fp_dtype)
  
      if fp_dtype not in MoEGEMM.supported_dtypes:
          raise ValueError(
              "Unsupported data type: {}, supported_dtypes are {}".format(
                  fp_dtype, MoEGEMM.supported_dtypes
              )
          )
  
      if act_fn not in MoEGEMM.supported_act_fns:
          raise ValueError(
              "Unsupported activation function: {}, supported_act_fns are {}".format(
                  act_fn, MoEGEMM.supported_act_fns
              )
          )
  
      inf_module = InferenceCutlassBuilder().load()
      self.kernel = inf_module.moe_gemm
      self.act_fn = act_fn
  
file_path: deepspeed/deepspeed/inference/v2/kernels/cutlass_ops/moe_gemm/moe_gemm.py
imports: import torch
  from ...None import DSKernelBase
  from ....inference_utils import ActivationType, DtypeEnum
  from deepspeed.ops.op_builder import InferenceCutlassBuilder
  from typing import Optional
label_desc: Use image node_id 1 to create a new MoEGEMM object from inherited base classes: DSKernelBase with example: obj = MoEGEMM(fp_dtype, act_fn)