code: def main(
      p0: T.Buffer((1, 32, 7, 7, 16), "uint8"),
      p1: T.Buffer((128, 32, 1, 1, 4, 16, 4), "int8"),
      p2: T.Buffer((1, 128, 1, 1, 16), "int32"),
      p3: T.Buffer((1, 128, 1, 1, 16), "float32"),
      p4: T.Buffer(1, "float32"),
      p5: T.Buffer((1, 128, 7, 7, 16), "uint8"),
      T_cast: T.Buffer((1, 128, 7, 7, 16), "int32"),
  ) -> None:
      # function attr dict
      T.func_attr({"global_symbol": "main", "tir.noalias": True})
      # body
      # with T.block("root")
      compile_engine_const = T.alloc_buffer([], dtype="float32")
      conv2d_NCHWc_int8 = T.alloc_buffer(
          [1, 128, 7, 7, 16], dtype="int32"
      )
      T_add = T.alloc_buffer([1, 128, 7, 7, 16], dtype="int32")
      T_cast_1 = T.alloc_buffer([1, 128, 7, 7, 16], dtype="float32")
      T_multiply = T.alloc_buffer([1, 128, 7, 7, 16], dtype="float32")
      compile_engine_const_1 = T.alloc_buffer([], dtype="float32")
      T_add_1 = T.alloc_buffer([1, 128, 7, 7, 16], dtype="float32")
      T_floor = T.alloc_buffer([1, 128, 7, 7, 16], dtype="float32")
      T_cast_2 = T.alloc_buffer([1, 128, 7, 7, 16], dtype="int32")
      compute = T.alloc_buffer([1, 128, 7, 7, 16], dtype="int32")
      T_cast_3 = T.alloc_buffer([1, 128, 7, 7, 16], dtype="uint8")
      T_cast_4 = T.alloc_buffer([1, 128, 7, 7, 16], dtype="float32")
      T_subtract = T.alloc_buffer([1, 128, 7, 7, 16], dtype="float32")
      T_multiply_1 = T.alloc_buffer([1, 128, 7, 7, 16], dtype="float32")
      compile_engine_const_2 = T.alloc_buffer([], dtype="float32")
      T_add_2 = T.alloc_buffer([1, 128, 7, 7, 16], dtype="float32")
      T_floor_1 = T.alloc_buffer([1, 128, 7, 7, 16], dtype="float32")
      T_cast_5 = T.alloc_buffer([1, 128, 7, 7, 16], dtype="int32")
      compile_engine_const_3 = T.alloc_buffer([], dtype="float32")
      T_cast_6 = T.alloc_buffer([1, 128, 7, 7, 16], dtype="float32")
      T_multiply_2 = T.alloc_buffer([1, 128, 7, 7, 16], dtype="float32")
      compile_engine_const_4 = T.alloc_buffer([], dtype="float32")
      T_add_3 = T.alloc_buffer([1, 128, 7, 7, 16], dtype="float32")
      T_floor_2 = T.alloc_buffer([1, 128, 7, 7, 16], dtype="float32")
      T_cast_7 = T.alloc_buffer([1, 128, 7, 7, 16], dtype="int32")
      T_add_4 = T.alloc_buffer([1, 128, 7, 7, 16], dtype="int32")
      compute_1 = T.alloc_buffer([1, 128, 7, 7, 16], dtype="int32")
      T_cast_8 = T.alloc_buffer([1, 128, 7, 7, 16], dtype="uint8")
      compute_2 = T.alloc_buffer([1, 128, 7, 7, 16], dtype="uint8")
      with T.block("compile_engine_const"):
          vi = T.axis.spatial(1, 0)
          T.reads()
          T.writes(compile_engine_const[()])
          compile_engine_const[()] = T.float32(0.95489668846130371)
      for i0, i1, i2, i3, i4, i5, i6, i7, i8, i9 in T.grid(
          1, 128, 7, 7, 16, 1, 1, 32, 4, 4
      ):
          with T.block("conv2d_NCHWc_int8"):
              (
                  n,
                  oc_chunk,
                  oh,
                  ow,
                  oc_block,
                  kh,
                  kw,
                  ic_outer,
                  ic_f_inner,
                  ic_s_inner,
              ) = T.axis.remap(
                  "SSSSSRRRRR", [i0, i1, i2, i3, i4, i5, i6, i7, i8, i9]
              )
              T.reads(
                  p0[
                      n,
                      ic_outer,
                      oh + kh,
                      ow + kw,
                      ic_f_inner * 4 + ic_s_inner,
                  ],
                  p1[
                      oc_chunk,
                      ic_outer,
                      kh,
                      kw,
                      ic_f_inner,
                      oc_block,
                      ic_s_inner,
                  ],
              )
              T.writes(conv2d_NCHWc_int8[n, oc_chunk, oh, ow, oc_block])
              T.block_attr(
                  {
                      "schedule_rule": "meta_schedule.conv2d_NCHWc_int8",
                      "workload": [
                          "conv2d_NCHWc_int8.x86",
                          ["TENSOR", [1, 32, 7, 7, 16], "uint8"],
                          ["TENSOR", [128, 32, 1, 1, 4, 16, 4], "int8"],
                          [1, 1],
                          [0, 0, 0, 0],
                          [1, 1],
                          "NCHW16c",
                          "NCHW16c",
                          "int32",
                      ],
                  }
              )
              with T.init():
                  conv2d_NCHWc_int8[n, oc_chunk, oh, ow, oc_block] = 0
              conv2d_NCHWc_int8[
                  n, oc_chunk, oh, ow, oc_block
              ] = conv2d_NCHWc_int8[
                  n, oc_chunk, oh, ow, oc_block
              ] + T.cast(
                  p0[
                      n,
                      ic_outer,
                      oh + kh,
                      ow + kw,
                      ic_f_inner * 4 + ic_s_inner,
                  ],
                  "int32",
              ) * T.cast(
                  p1[
                      oc_chunk,
                      ic_outer,
                      kh,
                      kw,
                      ic_f_inner,
                      oc_block,
                      ic_s_inner,
                  ],
                  "int32",
              )
      for i0, i1, i2, i3, i4 in T.grid(1, 128, 7, 7, 16):
          with T.block("T_add"):
              ax0, ax1, ax2, ax3, ax4 = T.axis.remap(
                  "SSSSS", [i0, i1, i2, i3, i4]
              )
              T.reads(
                  conv2d_NCHWc_int8[ax0, ax1, ax2, ax3, ax4],
                  p2[ax0, ax1, 0, 0, ax4],
              )
              T.writes(T_add[ax0, ax1, ax2, ax3, ax4])
              T_add[ax0, ax1, ax2, ax3, ax4] = (
                  conv2d_NCHWc_int8[ax0, ax1, ax2, ax3, ax4]
                  + p2[ax0, ax1, 0, 0, ax4]
              )
      for i0, i1, i2, i3, i4 in T.grid(1, 128, 7, 7, 16):
          with T.block("T_cast"):
              ax0, ax1, ax2, ax3, ax4 = T.axis.remap(
                  "SSSSS", [i0, i1, i2, i3, i4]
              )
              T.reads(T_add[ax0, ax1, ax2, ax3, ax4])
              T.writes(T_cast_1[ax0, ax1, ax2, ax3, ax4])
              T_cast_1[ax0, ax1, ax2, ax3, ax4] = T.cast(
                  T_add[ax0, ax1, ax2, ax3, ax4], "float32"
              )
      for i0, i1, i2, i3, i4 in T.grid(1, 128, 7, 7, 16):
          with T.block("T_multiply"):
              ax0, ax1, ax2, ax3, ax4 = T.axis.remap(
                  "SSSSS", [i0, i1, i2, i3, i4]
              )
              T.reads(
                  T_cast_1[ax0, ax1, ax2, ax3, ax4],
                  p3[ax0, ax1, 0, 0, ax4],
              )
              T.writes(T_multiply[ax0, ax1, ax2, ax3, ax4])
              T_multiply[ax0, ax1, ax2, ax3, ax4] = (
                  T_cast_1[ax0, ax1, ax2, ax3, ax4]
                  * p3[ax0, ax1, 0, 0, ax4]
              )
      with T.block("compile_engine_const_1"):
          vi = T.axis.spatial(1, 0)
          T.reads()
          T.writes(compile_engine_const_1[()])
          compile_engine_const_1[()] = T.float32(65.5)
      for i0, i1, i2, i3, i4 in T.grid(1, 128, 7, 7, 16):
          with T.block("T_add_1"):
              ax0, ax1, ax2, ax3, ax4 = T.axis.remap(
                  "SSSSS", [i0, i1, i2, i3, i4]
              )
              T.reads(
                  T_multiply[ax0, ax1, ax2, ax3, ax4],
                  compile_engine_const_1[()],
              )
              T.writes(T_add_1[ax0, ax1, ax2, ax3, ax4])
              T_add_1[ax0, ax1, ax2, ax3, ax4] = (
                  T_multiply[ax0, ax1, ax2, ax3, ax4]
                  + compile_engine_const_1[()]
              )
      for i0, i1, i2, i3, i4 in T.grid(1, 128, 7, 7, 16):
          with T.block("T_floor"):
              ax0, ax1, ax2, ax3, ax4 = T.axis.remap(
                  "SSSSS", [i0, i1, i2, i3, i4]
              )
              T.reads(T_add_1[ax0, ax1, ax2, ax3, ax4])
              T.writes(T_floor[ax0, ax1, ax2, ax3, ax4])
              T_floor[ax0, ax1, ax2, ax3, ax4] = T.floor(
                  T_add_1[ax0, ax1, ax2, ax3, ax4], dtype="float32"
              )
      for i0, i1, i2, i3, i4 in T.grid(1, 128, 7, 7, 16):
          with T.block("T_cast_1"):
              ax0, ax1, ax2, ax3, ax4 = T.axis.remap(
                  "SSSSS", [i0, i1, i2, i3, i4]
              )
              T.reads(T_floor[ax0, ax1, ax2, ax3, ax4])
              T.writes(T_cast_2[ax0, ax1, ax2, ax3, ax4])
              T_cast_2[ax0, ax1, ax2, ax3, ax4] = T.cast(
                  T_floor[ax0, ax1, ax2, ax3, ax4], "int32"
              )
      for i0, i1, i2, i3, i4 in T.grid(1, 128, 7, 7, 16):
          with T.block("compute"):
              i0_1, i1_1, i2_1, i3_1, i4_1 = T.axis.remap(
                  "SSSSS", [i0, i1, i2, i3, i4]
              )
              T.reads(T_cast_2[i0_1, i1_1, i2_1, i3_1, i4_1])
              T.writes(compute[i0_1, i1_1, i2_1, i3_1, i4_1])
              compute[i0_1, i1_1, i2_1, i3_1, i4_1] = T.max(
                  T.min(T_cast_2[i0_1, i1_1, i2_1, i3_1, i4_1], 255), 0
              )
      for i0, i1, i2, i3, i4 in T.grid(1, 128, 7, 7, 16):
          with T.block("T_cast_2"):
              ax0, ax1, ax2, ax3, ax4 = T.axis.remap(
                  "SSSSS", [i0, i1, i2, i3, i4]
              )
              T.reads(compute[ax0, ax1, ax2, ax3, ax4])
              T.writes(T_cast_3[ax0, ax1, ax2, ax3, ax4])
              T_cast_3[ax0, ax1, ax2, ax3, ax4] = T.cast(
                  compute[ax0, ax1, ax2, ax3, ax4], "uint8"
              )
      for i0, i1, i2, i3, i4 in T.grid(1, 128, 7, 7, 16):
          with T.block("T_cast_3"):
              ax0, ax1, ax2, ax3, ax4 = T.axis.remap(
                  "SSSSS", [i0, i1, i2, i3, i4]
              )
              T.reads(T_cast_3[ax0, ax1, ax2, ax3, ax4])
              T.writes(T_cast_4[ax0, ax1, ax2, ax3, ax4])
              T_cast_4[ax0, ax1, ax2, ax3, ax4] = T.cast(
                  T_cast_3[ax0, ax1, ax2, ax3, ax4], "float32"
              )
      for i0, i1, i2, i3, i4 in T.grid(1, 128, 7, 7, 16):
          with T.block("T_subtract"):
              ax0, ax1, ax2, ax3, ax4 = T.axis.remap(
                  "SSSSS", [i0, i1, i2, i3, i4]
              )
              T.reads(T_cast_4[ax0, ax1, ax2, ax3, ax4], p4[0])
              T.writes(T_subtract[ax0, ax1, ax2, ax3, ax4])
              T_subtract[ax0, ax1, ax2, ax3, ax4] = (
                  T_cast_4[ax0, ax1, ax2, ax3, ax4] - p4[0]
              )
      for i0, i1, i2, i3, i4 in T.grid(1, 128, 7, 7, 16):
          with T.block("T_multiply_1"):
              ax0, ax1, ax2, ax3, ax4 = T.axis.remap(
                  "SSSSS", [i0, i1, i2, i3, i4]
              )
              T.reads(
                  compile_engine_const[()],
                  T_subtract[ax0, ax1, ax2, ax3, ax4],
              )
              T.writes(T_multiply_1[ax0, ax1, ax2, ax3, ax4])
              T_multiply_1[ax0, ax1, ax2, ax3, ax4] = (
                  compile_engine_const[()]
                  * T_subtract[ax0, ax1, ax2, ax3, ax4]
              )
      with T.block("compile_engine_const_2"):
          vi = T.axis.spatial(1, 0)
          T.reads()
          T.writes(compile_engine_const_2[()])
          compile_engine_const_2[()] = T.float32(0.5)
      for i0, i1, i2, i3, i4 in T.grid(1, 128, 7, 7, 16):
          with T.block("T_add_2"):
              ax0, ax1, ax2, ax3, ax4 = T.axis.remap(
                  "SSSSS", [i0, i1, i2, i3, i4]
              )
              T.reads(
                  T_multiply_1[ax0, ax1, ax2, ax3, ax4],
                  compile_engine_const_2[()],
              )
              T.writes(T_add_2[ax0, ax1, ax2, ax3, ax4])
              T_add_2[ax0, ax1, ax2, ax3, ax4] = (
                  T_multiply_1[ax0, ax1, ax2, ax3, ax4]
                  + compile_engine_const_2[()]
              )
      for i0, i1, i2, i3, i4 in T.grid(1, 128, 7, 7, 16):
          with T.block("T_floor_1"):
              ax0, ax1, ax2, ax3, ax4 = T.axis.remap(
                  "SSSSS", [i0, i1, i2, i3, i4]
              )
              T.reads(T_add_2[ax0, ax1, ax2, ax3, ax4])
              T.writes(T_floor_1[ax0, ax1, ax2, ax3, ax4])
              T_floor_1[ax0, ax1, ax2, ax3, ax4] = T.floor(
                  T_add_2[ax0, ax1, ax2, ax3, ax4], dtype="float32"
              )
      for i0, i1, i2, i3, i4 in T.grid(1, 128, 7, 7, 16):
          with T.block("T_cast_4"):
              ax0, ax1, ax2, ax3, ax4 = T.axis.remap(
                  "SSSSS", [i0, i1, i2, i3, i4]
              )
              T.reads(T_floor_1[ax0, ax1, ax2, ax3, ax4])
              T.writes(T_cast_5[ax0, ax1, ax2, ax3, ax4])
              T_cast_5[ax0, ax1, ax2, ax3, ax4] = T.cast(
                  T_floor_1[ax0, ax1, ax2, ax3, ax4], "int32"
              )
      with T.block("compile_engine_const_3"):
          vi = T.axis.spatial(1, 0)
          T.reads()
          T.writes(compile_engine_const_3[()])
          compile_engine_const_3[()] = T.float32(0.71245479583740234)
      for i0, i1, i2, i3, i4 in T.grid(1, 128, 7, 7, 16):
          with T.block("T_cast_5"):
              ax0, ax1, ax2, ax3, ax4 = T.axis.remap(
                  "SSSSS", [i0, i1, i2, i3, i4]
              )
              T.reads(p5[ax0, ax1, ax2, ax3, ax4])
              T.writes(T_cast_6[ax0, ax1, ax2, ax3, ax4])
              T_cast_6[ax0, ax1, ax2, ax3, ax4] = T.cast(
                  p5[ax0, ax1, ax2, ax3, ax4], "float32"
              )
      for i0, i1, i2, i3, i4 in T.grid(1, 128, 7, 7, 16):
          with T.block("T_multiply_2"):
              ax0, ax1, ax2, ax3, ax4 = T.axis.remap(
                  "SSSSS", [i0, i1, i2, i3, i4]
              )
              T.reads(
                  compile_engine_const_3[()],
                  T_cast_6[ax0, ax1, ax2, ax3, ax4],
              )
              T.writes(T_multiply_2[ax0, ax1, ax2, ax3, ax4])
              T_multiply_2[ax0, ax1, ax2, ax3, ax4] = (
                  compile_engine_const_3[()]
                  * T_cast_6[ax0, ax1, ax2, ax3, ax4]
              )
      with T.block("compile_engine_const_4"):
          vi = T.axis.spatial(1, 0)
          T.reads()
          T.writes(compile_engine_const_4[()])
          compile_engine_const_4[()] = T.float32(0.5)
      for i0, i1, i2, i3, i4 in T.grid(1, 128, 7, 7, 16):
          with T.block("T_add_3"):
              ax0, ax1, ax2, ax3, ax4 = T.axis.remap(
                  "SSSSS", [i0, i1, i2, i3, i4]
              )
              T.reads(
                  T_multiply_2[ax0, ax1, ax2, ax3, ax4],
                  compile_engine_const_4[()],
              )
              T.writes(T_add_3[ax0, ax1, ax2, ax3, ax4])
              T_add_3[ax0, ax1, ax2, ax3, ax4] = (
                  T_multiply_2[ax0, ax1, ax2, ax3, ax4]
                  + compile_engine_const_4[()]
              )
      for i0, i1, i2, i3, i4 in T.grid(1, 128, 7, 7, 16):
          with T.block("T_floor_2"):
              ax0, ax1, ax2, ax3, ax4 = T.axis.remap(
                  "SSSSS", [i0, i1, i2, i3, i4]
              )
              T.reads(T_add_3[ax0, ax1, ax2, ax3, ax4])
              T.writes(T_floor_2[ax0, ax1, ax2, ax3, ax4])
              T_floor_2[ax0, ax1, ax2, ax3, ax4] = T.floor(
                  T_add_3[ax0, ax1, ax2, ax3, ax4], dtype="float32"
              )
      for i0, i1, i2, i3, i4 in T.grid(1, 128, 7, 7, 16):
          with T.block("T_cast_6"):
              ax0, ax1, ax2, ax3, ax4 = T.axis.remap(
                  "SSSSS", [i0, i1, i2, i3, i4]
              )
              T.reads(T_floor_2[ax0, ax1, ax2, ax3, ax4])
              T.writes(T_cast_7[ax0, ax1, ax2, ax3, ax4])
              T_cast_7[ax0, ax1, ax2, ax3, ax4] = T.cast(
                  T_floor_2[ax0, ax1, ax2, ax3, ax4], "int32"
              )
      for i0, i1, i2, i3, i4 in T.grid(1, 128, 7, 7, 16):
          with T.block("T_add_4"):
              ax0, ax1, ax2, ax3, ax4 = T.axis.remap(
                  "SSSSS", [i0, i1, i2, i3, i4]
              )
              T.reads(
                  T_cast_5[ax0, ax1, ax2, ax3, ax4],
                  T_cast_7[ax0, ax1, ax2, ax3, ax4],
              )
              T.writes(T_add_4[ax0, ax1, ax2, ax3, ax4])
              T_add_4[ax0, ax1, ax2, ax3, ax4] = (
                  T_cast_5[ax0, ax1, ax2, ax3, ax4]
                  + T_cast_7[ax0, ax1, ax2, ax3, ax4]
              )
      for i0, i1, i2, i3, i4 in T.grid(1, 128, 7, 7, 16):
          with T.block("compute_1"):
              i0_2, i1_2, i2_2, i3_2, i4_2 = T.axis.remap(
                  "SSSSS", [i0, i1, i2, i3, i4]
              )
              T.reads(T_add_4[i0_2, i1_2, i2_2, i3_2, i4_2])
              T.writes(compute_1[i0_2, i1_2, i2_2, i3_2, i4_2])
              compute_1[i0_2, i1_2, i2_2, i3_2, i4_2] = T.max(
                  T.min(T_add_4[i0_2, i1_2, i2_2, i3_2, i4_2], 255), 0
              )
      for i0_3, i1_3, i2_3, i3_3, i4_3 in T.grid(1, 128, 7, 7, 16):
          with T.block("T_cast_7"):
              ax0, ax1, ax2, ax3, ax4 = T.axis.remap(
                  "SSSSS", [i0_3, i1_3, i2_3, i3_3, i4_3]
              )
              T.reads(compute_1[ax0, ax1, ax2, ax3, ax4])
              T.writes(T_cast_8[ax0, ax1, ax2, ax3, ax4])
              T_cast_8[ax0, ax1, ax2, ax3, ax4] = T.cast(
                  compute_1[ax0, ax1, ax2, ax3, ax4], "uint8"
              )
      for i0_4, i1_4, i2_4, i3_4, i4_4 in T.grid(1, 128, 7, 7, 16):
          with T.block("compute_2"):
              i0_5, i1_5, i2_5, i3_5, i4_5 = T.axis.remap(
                  "SSSSS", [i0_4, i1_4, i2_4, i3_4, i4_4]
              )
              T.reads(T_cast_8[i0_5, i1_5, i2_5, i3_5, i4_5])
              T.writes(compute_2[i0_5, i1_5, i2_5, i3_5, i4_5])
              compute_2[i0_5, i1_5, i2_5, i3_5, i4_5] = T.max(
                  T.min(
                      T_cast_8[i0_5, i1_5, i2_5, i3_5, i4_5],
                      T.uint8(255),
                  ),
                  T.uint8(0),
              )
      for i0_6, i1_6, i2_6, i3_6, i4_6 in T.grid(1, 128, 7, 7, 16):
          with T.block("T_cast_8"):
              ax0, ax1, ax2, ax3, ax4 = T.axis.remap(
                  "SSSSS", [i0_6, i1_6, i2_6, i3_6, i4_6]
              )
              T.reads(compute_2[ax0, ax1, ax2, ax3, ax4])
              T.writes(T_cast[ax0, ax1, ax2, ax3, ax4])
              T_cast[ax0, ax1, ax2, ax3, ax4] = T.cast(
                  compute_2[ax0, ax1, ax2, ax3, ax4], "int32"
              )
  
imports: import pytest
  import tvm
  import tvm.meta_schedule
  import tvm.testing
  from tvm.script import tir
  from tvm.target import Target
  from tvm.target.codegen import llvm_lookup_intrinsic_id
  from tvm.tir import Schedule, floordiv, floormod
  from tvm.tir.tensor_intrin.cuda import *
  from tvm.tir.tensor_intrin.x86 import VNNI_DOT_16x4_INTRIN
label_desc: Use image node_id 1 for calling the Conv2dInt8_NCHWc_target obj's underlying member method code with example usage: obj.main(p0, p1, p2, p3, p4, p5, T_cast) without return types