code: def sgemm(
      A,
      B,
      dim_x=16,
      dim_y=16,
      blk_m=64,
      blk_n=64,
      blk_k=4,
      dim_xa=64,
      dim_ya=4,
      dim_xb=4,
      dim_yb=64,
  ):
      assert A.dtype == cp.float32
      assert B.dtype == cp.float32
      assert dim_x * dim_y == dim_xa * dim_ya == dim_xb * dim_yb
  
      m, k = A.shape
      k, n = B.shape
  
      # Inputs matrices need to be in Fortran order.
      A = cp.asfortranarray(A)
      B = cp.asfortranarray(B)
  
      C = cp.empty((m, n), dtype=cp.float32, order="F")
  
      config = {
          "DIM_X": dim_x,
          "DIM_Y": dim_y,
          "BLK_M": blk_m,
          "BLK_N": blk_n,
          "BLK_K": blk_k,
          "DIM_XA": dim_xa,
          "DIM_YA": dim_ya,
          "DIM_XB": dim_xb,
          "DIM_YB": dim_yb,
          "THR_M": blk_m // dim_x,
          "THR_N": blk_n // dim_y,
      }
      code = read_code(sgemm_file, params=config)
      kern = cp.RawKernel(code, "sgemm")
  
      grid = (int(math.ceil(m / blk_m)), int(math.ceil(n / blk_n)), 1)
      block = (dim_x, dim_y, 1)
      args = (m, n, k, A, B, C)
      shared_mem = blk_k * (blk_m + 1) * 4 + blk_n * (blk_k + 1) * 4
      kern(grid, block, args=args, shared_mem=shared_mem)
      return C
  
file_path: cupy/examples/gemm/sgemm.py
imports: import argparse
  import math
  import os
  import cupy
  import numpy
  from utils import benchmark
  from utils import read_code
label_desc: Use image node_id 1 for calling a global function with example usage: sgemm(A, B, dim_x, dim_y, blk_m, blk_n, blk_k, dim_xa, dim_ya, dim_xb, dim_yb) and returns: C