code: def schedule_batch_matmul(cfg, outs):
      """Schedule for batch_matmul
  
      Parameters
      ----------
      cfg : ConfigSpace
          AutoTVM tuning space config file.
      outs : Array of Tensor
          The computation graph description of batch_matmul
          in the format of an array of tensors.
  
      Returns
      -------
      sch: Schedule
          The computation schedule for the op.
      """
      s = te.create_schedule([x.op for x in outs])
  
      def _callback(op):
          if "batch_matmul" in op.tag:
              C = op.output(0)
              A, B = op.input_tensors
              if (
                  len(B.op.input_tensors) == 1
                  and B.op.input_tensors[0] == A
              ):
                  s[B].compute_inline()
              _, M, K = get_const_tuple(A.shape)
              _, _, N = get_const_tuple(C.shape)
  
              if op not in s.outputs:
                  s[C].compute_inline()
                  O = outs[0]
              else:
                  O = C
  
              CC = s.cache_write(C, "global")
  
              # create tuning space
              cfg.define_split("tile_y", M, num_outputs=2)
              cfg.define_split("tile_x", N, num_outputs=2)
              cfg.define_split("tile_k", K, num_outputs=2)
  
              b, y, x = s[O].op.axis
              yo, yi = cfg["tile_y"].apply(s, O, y)
              xo, xi = cfg["tile_x"].apply(s, O, x)
              s[O].reorder(b, yo, xo, yi, xi)
              bxyo = s[O].fuse(b, yo, xo)
              s[O].parallel(bxyo)
  
              s[CC].compute_at(s[O], bxyo)
              (k,) = s[CC].op.reduce_axis
              ko, ki = cfg["tile_k"].apply(s, CC, k)
  
              Crf = s.rfactor(CC, ki)
              s[Crf].compute_at(s[CC], s[CC].op.axis[0])
              _, _, y, x = s[Crf].op.axis
              s[Crf].fuse(y, x)
              s[Crf].vectorize(s[Crf].op.axis[0])
              s[O].pragma(bxyo, "auto_unroll_max_step", 16)
  
      traverse_inline(s, outs[0].op, _callback)
      return s
  
imports: import tvm
  from tvm import autotvm, te
  from tvm.autotvm.task.space import SplitEntity
  from tvm.contrib import cblas, mkl
  from tvm.target.codegen import target_has_features
  from ..None import generic, nn
  from ..transform import layout_transform
  from ..utils import get_const_tuple, get_max_power2_factor, traverse_inline
  from .dense import dense_amx_int8_schedule, dense_int8_schedule
  from .injective import schedule_injective_from_existing
label_desc: Use image node_id 5 for calling a global function with example usage: schedule_batch_matmul(cfg, outs) and returns: s