code: def qdense_compute(
      tensor_a,
      tensor_b,
      zero_a,
      scale_a,
      zero_b,
      scale_b,
      zero_out=None,
      scale_out=None,
      bias=None,
      q_dtype=None,
  ):
      """Hexagon's implementation of a sliced dense operator in Topi.
      Uses matmul.
  
      Parameters
      ----------
      tensor_a : tvm.te.Tensor
          data 2-D with shape [batch, in_dim]
  
      tensor_b : tvm.te.Tensor
          weight 2-D with shape [in_dim, out_dim]
  
      zero_a : integer
          quantization zero point for tensor a.
  
      scale_a : float
          quantization scale for tensor a.
  
      zero_b : integer
          quantization zero point for tensor b.
  
      scale_b : float
          quantization scale for tensor b.
  
      zero_out : Optional[integer]
          quantization zero point for output.
  
      scale_out : Optional[float]
          quantization scale for output.
  
      bias : Optional[tvm.te.Tensor]
          1-D with shape [out_dim]
  
      q_dtype : Optional[str]
          The output type.
  
      Returns
      -------
      mat : tvm.te.Tensor
          2-D with shape [batch, out_dim]
  
      """
      if bias is not None:
          assert len(bias.shape) == 1
      if q_dtype is None:
          q_dtype = tensor_a.dtype
  
      batch, in_dim = tensor_a.shape
      out_dim, red_dim = tensor_b.shape
  
      # cmp should be done by values
      assert int(in_dim) == int(red_dim)
  
      k = te.reduce_axis((0, in_dim), name="k")
      compute_lambda = lambda n, m: te.sum(
          scale_a
          * (tensor_a[n, k].astype("float32") - zero_a)
          * scale_b
          * (tensor_b[k, m].astype("float32") - zero_b),
          axis=k,
      )
      compute_name = "qmatmul_sliced"
  
      out = te.compute(
          (batch, out_dim),
          compute_lambda,
          name=compute_name,
          attrs={"layout_free_placeholders": [tensor_b]},
      )
  
      if bias is not None:
          out = te.compute(
              (batch, out_dim),
              lambda i, j: out[i, j] + bias[j],
              tag=tag.BROADCAST,
              name="bias",
          )
  
      # Requantization of dense
      if scale_out is not None:
          out = te.compute(
              (batch, out_dim),
              lambda *i: (out[i] / scale_out + zero_out).astype(
                  q_dtype
              ),
              name="requantize",
          )
  
      return out
  
imports: from tvm import te, tir
  from tvm.topi import tag
  from ..utils import get_layout_transform_fn
label_desc: Use image node_id 1 for calling a global function with example usage: qdense_compute(tensor_a, tensor_b, zero_a, scale_a, zero_b, scale_b, zero_out, scale_out, bias, q_dtype) and returns: out