code: def forward(ctx, expert_tokens, logits, mask, dest_idx, ec):
      assert logits.dtype == torch.float32
  
      s = logits.size(0)
      e = logits.size(1)
      c = ec // e
      h = expert_tokens.size(-1)
      dtype = expert_tokens.dtype
  
      if expert_tokens.dtype != torch.float32:
          expert_tokens = expert_tokens.to(torch.float32)
      if MOE_KERNEL is None:
          load_moe()
      output = MOE_KERNEL.combine_forward(
          s, e, c, h, expert_tokens, logits, mask, dest_idx
      )
      if output.dtype != dtype:
          output = output.to(dtype)
  
      ctx.save_for_backward(expert_tokens, logits, mask, dest_idx)
      ctx.s = s
      ctx.e = e
      ctx.c = c
      ctx.h = h
      ctx.dtype = dtype
  
      return output
  
imports: from typing import Any, Optional, Tuple
  import torch
  import torch.distributed
  from torch import Tensor
  from torch.cuda.amp import custom_bwd, custom_fwd
  from torch.distributed import ProcessGroup
label_desc: Use image node_id 1 for calling the MoeCombine obj's underlying member method code with example usage: obj.forward(ctx, expert_tokens, logits, mask, dest_idx, ec) and returns: output