class_docstr: Currently only support index in dimension 0 with a 2-dimension tensor.
  The shape of indexed in1 must be same with in2. Now this kernel does not support broadcast.
  The datatype must be float32 or float16.
code: def forward(
      ctx, in1: torch.Tensor, in2: torch.Tensor, idx1: torch.Tensor
  ) -> torch.Tensor:
      assert in2.size(0) == idx1.size(0)
      if (
          in1.dtype != torch.float32 and in1.dtype != torch.half
      ) or in2.dtype != in1.dtype:
          raise RuntimeError(
              "input1'dtype and input2's dtype must be fp32 or fp16. And input type must be same"
          )
      if in1.dim() != 2 or in2.dim() != 2:
          raise RuntimeError("in1 and in2 must be 2-dimension tensor.")
      if idx1.dim() != 1:
          raise RuntimeError("idx1 must be 1-dimension tensor.")
  
      if not in1.is_contiguous():
          in1 = in1.contiguous()
      if not in2.is_contiguous():
          in2 = in2.contiguous()
      if not idx1.is_contiguous():
          idx1 = idx1.contiguous()
  
      assert in1.is_contiguous()
      assert in2.is_contiguous()
      assert idx1.is_contiguous()
  
      out = torch.empty_like(in2)
  
      if in1.dtype == torch.float32:
          fused_index_mul_2d.float_forward(out, in1, in2, idx1)
      elif in1.dtype == torch.half:
          fused_index_mul_2d.half_forward(out, in1, in2, idx1)
  
      ctx.for_backwards = (in1, in2, idx1)
      return out
  
file_path: apex/apex/contrib/index_mul_2d/index_mul_2d.py
imports: import torch
  import fused_index_mul_2d
label_desc: Use image node_id 1 for calling the IndexMul2d_ obj's underlying member method code with example usage: obj.forward(ctx, in1, in2, idx1) and returns: out