class_docstr: Pipelined module class.
class_docstr_tok: ["Pipelined","module","class","."]
code: def main(
      p0_buffer: T.Buffer((1, 1, 230, 230, 4), "uint8"),
      p1_buffer: T.Buffer((2, 1, 7, 7, 1, 32, 4), "int8"),
      t_cast: T.Buffer((1, 2, 112, 112, 32), "int32"),
  ) -> None:
      # pylint: disable=missing-function-docstring
      # function attr dict
      T.func_attr({"tir.noalias": True, "global_symbol": "main"})
      # body
      # with T.block("root")
      conv2d_nchwc_int8 = T.alloc_buffer(
          [1, 2, 112, 112, 32], dtype="int32", scope="global.vtcm"
      )
      p0_global_vtcm = T.alloc_buffer(
          [1, 1, 230, 230, 4], dtype="uint8", scope="global.vtcm"
      )
      p1_global_vtcm = T.alloc_buffer(
          [2, 1, 7, 7, 1, 32, 4], dtype="int8", scope="global.vtcm"
      )
      for ax0, ax1, ax2, ax3, ax4, ax5, ax6 in T.grid(
          2, 1, 7, 7, 1, 32, 4
      ):
          with T.block("p1_global.vtcm"):
              (
                  v0_ind,
                  v1_ind,
                  v2_ind,
                  v3_ind,
                  v4_ind,
                  v5_ind,
                  v6_ind,
              ) = T.axis.remap(
                  "SSSSSSS", [ax0, ax1, ax2, ax3, ax4, ax5, ax6]
              )
              T.reads(
                  p1_buffer[
                      v0_ind,
                      v1_ind,
                      v2_ind,
                      v3_ind,
                      v4_ind,
                      v5_ind,
                      v6_ind,
                  ]
              )
              T.writes(
                  p1_global_vtcm[
                      v0_ind,
                      v1_ind,
                      v2_ind,
                      v3_ind,
                      v4_ind,
                      v5_ind,
                      v6_ind,
                  ]
              )
              p1_global_vtcm[
                  v0_ind, v1_ind, v2_ind, v3_ind, v4_ind, v5_ind, v6_ind
              ] = p1_buffer[
                  v0_ind, v1_ind, v2_ind, v3_ind, v4_ind, v5_ind, v6_ind
              ]
      for p_outer in T.serial(4):
          for index_0 in T.serial(55876):
              with T.block("p0_global.vtcm"):
                  v0_ind = T.axis.spatial(1, 0)
                  v1_ind = T.axis.spatial(1, 0)
                  v2_ind = T.axis.spatial(
                      230, p_outer * 56 + index_0 // 916
                  )
                  v3_ind = T.axis.spatial(230, index_0 % 916 // 4)
                  v4_ind = T.axis.spatial(4, index_0 % 4)
                  T.reads(
                      p0_buffer[v0_ind, v1_ind, v2_ind, v3_ind, v4_ind]
                  )
                  T.writes(
                      p0_global_vtcm[
                          v0_ind, v1_ind, v2_ind, v3_ind, v4_ind
                      ]
                  )
                  p0_global_vtcm[
                      v0_ind, v1_ind, v2_ind, v3_ind, v4_ind
                  ] = p0_buffer[v0_ind, v1_ind, v2_ind, v3_ind, v4_ind]
          for index_0 in T.parallel(28):
              for index_1, index_2, index_3 in T.grid(2, 14, 8):
                  with T.block("conv2d_NCHWc_int8_o_init"):
                      n = T.axis.spatial(1, 0)
                      oc_chunk = T.axis.spatial(2, index_1)
                      o_height = T.axis.spatial(
                          112,
                          (p_outer * 28 + index_0) // 14 * 14 + index_2,
                      )
                      o_width = T.axis.spatial(
                          112,
                          (p_outer * 28 + index_0) % 14 * 8 + index_3,
                      )
                      oc_block_o = T.axis.spatial(
                          1, 0
                      )  # pylint: disable=unused-variable
                      T.reads()
                      T.writes(
                          conv2d_nchwc_int8[
                              n, oc_chunk, o_height, o_width, 0:32
                          ]
                      )
                      for i4_1 in T.vectorized(32):
                          with T.block("conv2d_NCHWc_int8_init"):
                              oc_block_i_init = T.axis.spatial(32, i4_1)
                              T.reads()
                              T.writes(
                                  conv2d_nchwc_int8[
                                      n,
                                      oc_chunk,
                                      o_height,
                                      o_width,
                                      oc_block_i_init,
                                  ]
                              )
                              conv2d_nchwc_int8[
                                  n,
                                  oc_chunk,
                                  o_height,
                                  o_width,
                                  oc_block_i_init,
                              ] = 0
              for i1_1, i5_1, i6_1, i2_2, i3_2 in T.grid(
                  2, 7, 7, 14, 8
              ):
                  with T.block("conv2d_NCHWc_int8_o_update"):
                      n = T.axis.spatial(1, 0)
                      oc_chunk = T.axis.spatial(2, i1_1)
                      o_height = T.axis.spatial(
                          112,
                          (p_outer * 28 + index_0) // 14 * 14 + i2_2,
                      )
                      o_width = T.axis.spatial(
                          112, (p_outer * 28 + index_0) % 14 * 8 + i3_2
                      )
                      oc_block_o = T.axis.spatial(
                          1, 0
                      )  # pylint: disable=unused-variable
                      k_height = T.axis.reduce(7, i5_1)
                      k_width = T.axis.reduce(7, i6_1)
                      ic_outer = T.axis.reduce(1, 0)
                      ic_f_inner = T.axis.reduce(1, 0)
                      ic_s_inner_o = T.axis.reduce(
                          1, 0
                      )  # pylint: disable=unused-variable
                      T.reads(
                          conv2d_nchwc_int8[
                              n, oc_chunk, o_height, o_width, 0:32
                          ],
                          p0_global_vtcm[
                              n,
                              ic_outer,
                              o_height * 2 + k_height,
                              o_width * 2 + k_width,
                              ic_f_inner * 4 : ic_f_inner * 4 + 4,
                          ],
                          p1_global_vtcm[
                              oc_chunk,
                              ic_outer,
                              k_height,
                              k_width,
                              ic_f_inner,
                              0:32,
                              0:4,
                          ],
                      )
                      T.writes(
                          conv2d_nchwc_int8[
                              n, oc_chunk, o_height, o_width, 0:32
                          ]
                      )
                      a_buffer = T.match_buffer(
                          p0_global_vtcm[
                              n,
                              ic_outer,
                              o_height * 2 + k_height,
                              o_width * 2 + k_width,
                              ic_f_inner * 4 : ic_f_inner * 4 + 4,
                          ],
                          [4],
                          dtype="uint8",
                          offset_factor=1,
                          scope="global.vtcm",
                      )
                      b_buffer = T.match_buffer(
                          p1_global_vtcm[
                              oc_chunk,
                              ic_outer,
                              k_height,
                              k_width,
                              ic_f_inner,
                              0:32,
                              0:4,
                          ],
                          [32, 4],
                          dtype="int8",
                          offset_factor=1,
                          scope="global.vtcm",
                      )
                      c_buffer = T.match_buffer(
                          conv2d_nchwc_int8[
                              n, oc_chunk, o_height, o_width, 0:32
                          ],
                          [32],
                          dtype="int32",
                          offset_factor=1,
                          scope="global.vtcm",
                      )
                      a_u8x4: T.uint8x4 = a_buffer[0:4]
                      a_i32: T.int32 = T.reinterpret(
                          a_u8x4, dtype="int32"
                      )
                      b_i8x128 = b_buffer[0, 0:128]
                      b_i32x32: T.int32x32 = T.reinterpret(
                          b_i8x128, dtype="int32x32"
                      )
                      c_buffer[0:32] = T.call_llvm_pure_intrin(
                          T.llvm_lookup_intrinsic_id(
                              "llvm.hexagon.V6.vrmpyubv.acc.128B"
                          ),
                          T.uint32(3),
                          c_buffer[0:32],
                          T.broadcast(a_i32, 32),
                          b_i32x32,
                          dtype="int32x32",
                      )
          for index_0 in T.serial(200704):
              with T.block("conv2d_nchwc_int8.vtcm"):
                  ax0_1 = T.axis.spatial(1, 0)
                  ax1_1 = T.axis.spatial(2, index_0 % 7168 // 3584)
                  ax2_1 = T.axis.spatial(
                      112,
                      (p_outer * 28 + index_0 // 7168) // 14 * 14
                      + index_0 % 3584 // 256,
                  )
                  ax3_1 = T.axis.spatial(
                      112,
                      (p_outer * 28 + index_0 // 7168) % 14 * 8
                      + index_0 % 256 // 32,
                  )
                  ax4 = T.axis.spatial(32, index_0 % 32)
                  T.reads(
                      conv2d_nchwc_int8[ax0_1, ax1_1, ax2_1, ax3_1, ax4]
                  )
                  T.writes(t_cast[ax0_1, ax1_1, ax2_1, ax3_1, ax4])
                  t_cast[
                      ax0_1, ax1_1, ax2_1, ax3_1, ax4
                  ] = conv2d_nchwc_int8[ax0_1, ax1_1, ax2_1, ax3_1, ax4]
  
file_path: tvm/tests/python/contrib/test_hexagon/test_async_dma_pipeline.py
imports: import numpy
  import pytest
  import tvm
  from tvm.script import tir
label_desc: Use image node_id 1 for calling the ModulePipelined obj's underlying member method code with example usage: obj.main(p0_buffer, p1_buffer, t_cast) without return types