code: def test_cpu_c1d():
      # fmt: off
      @T.prim_func
      def c1d_0(inputs: T.Buffer((1, 256, 64), "float32"), weight: T.Buffer((3, 64, 128), "float32"), conv1d_nlc: T.Buffer((1, 128, 128), "float32")):
          T.func_attr({"global_symbol": "main", "tir.noalias": T.bool(True)})
          with T.block("root"):
              T.reads()
              T.writes()
              T.block_attr({"meta_schedule.parallel":288, "meta_schedule.unroll_explicit":512, "meta_schedule.vectorize":64})
              PadInput = T.alloc_buffer((1, 258, 64), dtype="float32")
              conv1d_nlc_global = T.alloc_buffer((1, 128, 128), dtype="float32")
              for i0, i1, i2 in T.grid(1, 258, 64):
                  with T.block("PadInput"):
                      v_i0, v_i1, v_i2 = T.axis.remap("SSS", [i0, i1, i2])
                      T.reads(inputs[v_i0, v_i1 - 1, v_i2])
                      T.writes(PadInput[v_i0, v_i1, v_i2])
                      PadInput[v_i0, v_i1, v_i2] = T.if_then_else(1 <= v_i1 and v_i1 < 257, inputs[v_i0, v_i1 - 1, v_i2], T.float32(0))
              for n_0, l_0, co_0, n_1, l_1, co_1 in T.grid(1, 1, 2, 1, 1, 8):
                  for rl_0, rc_0, n_2, l_2, co_2, rl_1, rc_1, n_3, l_3, co_3 in T.grid(1, 64, 1, 64, 8, 3, 1, 1, 2, 1):
                      with T.block("conv1d_nlc"):
                          v_n = T.axis.spatial(1, n_0 + n_1 + n_2 + n_3)
                          v_l = T.axis.spatial(128, l_0 * 128 + l_1 * 128 + l_2 * 2 + l_3)
                          v_co = T.axis.spatial(128, co_0 * 64 + co_1 * 8 + co_2 + co_3)
                          v_rl = T.axis.reduce(3, rl_0 * 3 + rl_1)
                          v_rc = T.axis.reduce(64, rc_0 + rc_1)
                          T.reads(PadInput[v_n, v_l * 2 + v_rl, v_co // 128 * 64 + v_rc], weight[v_rl, v_rc, v_co])
                          T.writes(conv1d_nlc_global[v_n, v_l, v_co])
                          T.block_attr({"meta_schedule.tiling_structure": "SSRSRS"})
                          with T.init():
                              conv1d_nlc_global[v_n, v_l, v_co] = T.float32(0)
                          conv1d_nlc_global[v_n, v_l, v_co] = conv1d_nlc_global[v_n, v_l, v_co] + PadInput[v_n, v_l * 2 + v_rl, v_co // 128 * 64 + v_rc] * weight[v_rl, v_rc, v_co]
                  for ax0, ax1, ax2 in T.grid(1, 128, 8):
                      with T.block("conv1d_nlc_global"):
                          v0, v1 = T.axis.remap("SS", [ax0, ax1])
                          v2 = T.axis.spatial(128, co_0 * 64 + co_1 * 8 + ax2)
                          T.reads(conv1d_nlc_global[v0, v1, v2])
                          T.writes(conv1d_nlc[v0, v1, v2])
                          conv1d_nlc[v0, v1, v2] = conv1d_nlc_global[v0, v1, v2]
      @T.prim_func
      def c1d_1(inputs: T.Buffer((1, 256, 64), "float32"), weight: T.Buffer((3, 64, 128), "float32"), conv1d_nlc: T.Buffer((1, 128, 128), "float32")) -> None:
          T.func_attr({"global_symbol": "main", "tir.noalias": T.bool(True)})
          with T.block("root"):
              T.reads()
              T.writes()
              T.block_attr({"meta_schedule.parallel": 288, "meta_schedule.unroll_explicit": 512, "meta_schedule.vectorize": 64})
              PadInput = T.alloc_buffer((1, 258, 64))
              conv1d_nlc_global = T.alloc_buffer((1, 128, 128))
              for n_0, l_0, co_0 in T.grid(1, 1, 2):
                  for n_1, l_1, co_1 in T.grid(1, 1, 8):
                      for ax0, ax1, ax2 in T.grid(1, 257, 64):
                          with T.block("PadInput"):
                              v_i0 = T.axis.spatial(1, ax0)
                              v_i1 = T.axis.spatial(258, ax1)
                              v_i2 = T.axis.spatial(64, ax2)
                              T.reads(inputs[v_i0, v_i1 - 1, v_i2])
                              T.writes(PadInput[v_i0, v_i1, v_i2])
                              PadInput[v_i0, v_i1, v_i2] = T.if_then_else(1 <= v_i1 and v_i1 < 257, inputs[v_i0, v_i1 - 1, v_i2], T.float32(0))
                      for rl_0, rc_0, n_2, l_2, co_2, rl_1, rc_1, n_3, l_3, co_3 in T.grid(1, 64, 1, 64, 8, 3, 1, 1, 2, 1):
                          with T.block("conv1d_nlc"):
                              v_n = T.axis.spatial(1, n_0 + n_1 + n_2 + n_3)
                              v_l = T.axis.spatial(128, l_0 * 128 + l_1 * 128 + l_2 * 2 + l_3)
                              v_co = T.axis.spatial(128, co_0 * 64 + co_1 * 8 + co_2 + co_3)
                              v_rl = T.axis.reduce(3, rl_0 * 3 + rl_1)
                              v_rc = T.axis.reduce(64, rc_0 + rc_1)
                              T.reads(PadInput[v_n, v_l * 2 + v_rl, v_co // 128 * 64 + v_rc], weight[v_rl, v_rc, v_co])
                              T.writes(conv1d_nlc_global[v_n, v_l, v_co])
                              T.block_attr({"meta_schedule.tiling_structure": "SSRSRS"})
                              with T.init():
                                  conv1d_nlc_global[v_n, v_l, v_co] = T.float32(0)
                              conv1d_nlc_global[v_n, v_l, v_co] = conv1d_nlc_global[v_n, v_l, v_co] + PadInput[v_n, v_l * 2 + v_rl, v_co // 128 * 64 + v_rc] * weight[v_rl, v_rc, v_co]
                  for ax0, ax1, ax2 in T.grid(1, 128, 64):
                      with T.block("conv1d_nlc_global"):
                          v0, v1 = T.axis.remap("SS", [ax0, ax1])
                          v2 = T.axis.spatial(128, co_0 * 64 + ax2)
                          T.reads(conv1d_nlc_global[v0, v1, v2])
                          T.writes(conv1d_nlc[v0, v1, v2])
                          conv1d_nlc[v0, v1, v2] = conv1d_nlc_global[v0, v1, v2]
  
      @T.prim_func
      def c1d_2(inputs: T.Buffer((1, 256, 64), "float32"), weight: T.Buffer((3, 64, 128), "float32"), conv1d_nlc: T.Buffer((1, 128, 128), "float32")) -> None:
          # function attr dict
          T.func_attr({"global_symbol": "main", "tir.noalias": True})
          with T.block("root"):
              T.reads()
              T.writes()
              T.block_attr({"meta_schedule.parallel": 288, "meta_schedule.unroll_explicit": 16, "meta_schedule.vectorize": 64})
              for n_0, l_0, co_0, n_1, l_1, co_1, rl_0, rc_0, n_2, l_2, co_2, rl_1, rc_1, n_3, l_3, co_3 in T.grid(1, 1, 2, 1, 1, 8, 1, 64, 1, 64, 8, 3, 1, 1, 2, 1):
                  with T.block("conv1d_nlc"):
                      v_n = T.axis.spatial(1, n_0 + n_1 + n_2 + n_3)
                      v_l = T.axis.spatial(128, l_0 * 128 + l_1 * 128 + l_2 * 2 + l_3)
                      v_co = T.axis.spatial(128, co_0 * 64 + co_1 * 8 + co_2 + co_3)
                      v_rl = T.axis.reduce(3, rl_0 * 3 + rl_1)
                      v_rc = T.axis.reduce(64, rc_0 + rc_1)
                      T.reads(inputs[v_n, v_l * 2 + v_rl - 1, v_co // 128 * 64 + v_rc], weight[v_rl, v_rc, v_co])
                      T.writes(conv1d_nlc[v_n, v_l, v_co])
                      T.block_attr({"meta_schedule.tiling_structure": "SSRSRS"})
                      with T.init():
                          conv1d_nlc[v_n, v_l, v_co] = T.float32(0)
                      conv1d_nlc[v_n, v_l, v_co] = conv1d_nlc[v_n, v_l, v_co] + T.if_then_else(1 <= v_l * 2 + v_rl and v_l * 2 + v_rl < 257, inputs[v_n, v_l * 2 + v_rl - 1, v_co // 128 * 64 + v_rc], T.float32(0)) * weight[v_rl, v_rc, v_co]
      # fmt: on
  
      decision_0 = [
          ("SamplePerfectTile", [1, 1, 1, 1]),
          ("SamplePerfectTile", [1, 1, 64, 2]),
          ("SamplePerfectTile", [2, 8, 8, 1]),
          ("SamplePerfectTile", [1, 3]),
          ("SamplePerfectTile", [64, 1]),
          ("SampleCategorical", 3),
          ("SampleComputeLocation", -1),
      ]
      decision_1 = [
          ("SamplePerfectTile", [1, 1, 1, 1]),
          ("SamplePerfectTile", [1, 1, 64, 2]),
          ("SamplePerfectTile", [2, 8, 8, 1]),
          ("SamplePerfectTile", [1, 3]),
          ("SamplePerfectTile", [64, 1]),
          ("SampleCategorical", 3),
          ("SampleComputeLocation", 5),
      ]
      decision_2 = [
          ("SamplePerfectTile", [1, 1, 1, 1]),
          ("SamplePerfectTile", [1, 1, 64, 2]),
          ("SamplePerfectTile", [2, 8, 8, 1]),
          ("SamplePerfectTile", [1, 3]),
          ("SamplePerfectTile", [64, 1]),
          ("SampleCategorical", 1),
          ("SampleComputeLocation", -2),
      ]
  
      mod = create_te_workload("C1D", 0)
      actual = _design_space(mod)
      check_sketches(
          mod,
          sketches=actual,
          expected_mods=[c1d_0, c1d_1, c1d_2],
          expected_decisions=[decision_0, decision_1, decision_2],
      )
  
file_path: tvm/tests/python/meta_schedule/test_meta_schedule_space_cpu.py
imports: from tvm import meta_schedule
  from tvm.meta_schedule.testing.space_generation import check_sketches, print_sketches, generate_design_space
  from tvm.meta_schedule.testing.te_workload import create_te_workload
  from tvm.script import tir
  from tvm.target import Target
label_desc: Use image node_id 3 for calling a global function with example usage: test_cpu_c1d() without return types