code: def dense_pack(data, weight, bias=None, out_dtype=None):
      """The default implementation of dense_pack in topi.
  
      Parameters
      ----------
      data : tvm.te.Tensor
          2-D with shape [batch, in_dim]
  
      weight : tvm.te.Tensor
          2-D with shape [out_dim, in_dim]
  
      bias : Optional[tvm.te.Tensor]
          1-D with shape [out_dim]
  
      out_dtype : Optional[str]
          The output type. This is used for mixed precision.
  
      Returns
      -------
      output : tvm.te.Tensor
          2-D with shape [batch, out_dim]
      """
      if out_dtype is None:
          out_dtype = data.dtype
      M, K = get_const_tuple(data.shape)  # batch, in_dim
      N, _, packw_bn = get_const_tuple(weight.shape)  # out_dim
      N = N * packw_bn
  
      idxdiv = tvm.tir.indexdiv
      idxmod = tvm.tir.indexmod
      k = te.reduce_axis((0, K), name="k")
      C = te.compute(
          (M, N),
          lambda y, x: te.sum(
              data[y, k].astype(out_dtype)
              * weight[
                  idxdiv(x, packw_bn), k, idxmod(x, packw_bn)
              ].astype(out_dtype),
              axis=k,
          ),
          name="T_dense_pack",
          tag="dense_pack",
      )
      if bias is not None:
          C = te.compute(
              (M, N),
              lambda i, j: C[i, j] + bias[j].astype(out_dtype),
              tag=tag.BROADCAST,
          )
      return C
  
file_path: tvm/python/tvm/topi/nn/dense.py
imports: import tvm
  from tvm import auto_scheduler, te
  from ..None import tag, add
label_desc: Use image node_id 5 for calling a global function with example usage: dense_pack(data, weight, bias, out_dtype) and returns: C