code: def batch_matmul_int8_compute(cfg, x, y, *_):
      """Compute for uint8 x int8 -> int32 batch_matmul"""
      batch, m, k = x.shape
      packed_y_layout = "BNK16n4k"
      packed_y = layout_transform(y, "BNK", packed_y_layout)
      _, n_o, _, n_i, _ = packed_y.shape
      ak = te.reduce_axis((0, k), name="k")
      if target_has_features(["avx512bw", "avx512f"]):
          attrs_info = {"schedule_rule": "batch_matmul_int8"}
      else:
          attrs_info = None
  
      z = te.compute(
          (batch, m, n_o * n_i),
          lambda b, i, j: te.sum(
              x[b, i, ak].astype("int32")
              * packed_y[
                  b,
                  tvm.tir.indexdiv(j, 16),
                  tvm.tir.indexdiv(ak, 4),
                  j % 16,
                  ak % 4,
              ].astype("int32"),
              axis=ak,
          ),
          tag="batch_matmul_int8",
          attrs=attrs_info,
      )
  
      return z
  
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 1 for calling a global function with example usage: batch_matmul_int8_compute(cfg, x, y) and returns: z