code: def matmul(a, b, a_order, b_order):
      # checks constraints
      assert a.shape[1] == b.shape[0], "incompatible dimensions"
      M, K = a.shape
      K, N = b.shape
  
      z = torch.empty((M, N), device=a.device, dtype=torch.float16)
  
      def grid(META):
          return (
              triton.cdiv(M, META["BLOCK_SIZE_M"])
              * triton.cdiv(N, META["BLOCK_SIZE_N"]),
          )
  
      matmul_kernel[grid](
          a_ptr=a,
          b_ptr=b,
          z_ptr=z,  #
          M=M,
          N=N,
          K=K,  #
          stride_am=a.stride(0),
          stride_ak=a.stride(1),  #
          stride_bk=b.stride(0),
          stride_bn=b.stride(1),  #
          stride_zm=z.stride(0),
          stride_zn=z.stride(1),  #
          A_ORDER_0=a_order[0],
          A_ORDER_1=a_order[1],  #
          B_ORDER_0=b_order[0],
          B_ORDER_1=b_order[1],  #
      )
      return z
  
imports: import torch
  from torch.testing import assert_close
  import triton
  import triton.language
label_desc: Use image node_id 2 for calling a global function with example usage: matmul(a, b, a_order, b_order) and returns: z, unknown