code: def test_cuda_gmm():
      # fmt: off
      @T.prim_func
      def gmm_0(X: T.Buffer((1, 128, 128), "float32"), Y: T.Buffer((1, 128, 128), "float32"), Z: 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.unroll_explicit": 1024})
              Z_local = T.alloc_buffer((1, 128, 128), scope="local")
              X_shared = T.alloc_buffer((1, 128, 128), scope="shared")
              Y_shared = T.alloc_buffer((1, 128, 128), scope="shared")
              for b_0_i_0_j_0_fused in T.thread_binding(1, thread="blockIdx.x"):
                  for b_1_i_1_j_1_fused in T.thread_binding(32, thread="vthread.x"):
                      for b_2_i_2_j_2_fused in T.thread_binding(2, thread="threadIdx.x"):
                          for k_0 in range(1):
                              for ax0_ax1_ax2_fused in range(16384):
                                  with T.block("X_shared"):
                                      v0 = T.axis.spatial(1, 0)
                                      v1 = T.axis.spatial(128, ax0_ax1_ax2_fused // 128)
                                      v2 = T.axis.spatial(128, ax0_ax1_ax2_fused % 128)
                                      T.reads(X[v0, v1, v2])
                                      T.writes(X_shared[v0, v1, v2])
                                      T.block_attr({"meta_schedule.cooperative_fetch": 2})
                                      X_shared[v0, v1, v2] = X[v0, v1, v2]
                              for ax0_ax1_ax2_fused in range(16384):
                                  with T.block("Y_shared"):
                                      v0 = T.axis.spatial(1, 0)
                                      v1 = T.axis.spatial(128, ax0_ax1_ax2_fused // 128)
                                      v2 = T.axis.spatial(128, ax0_ax1_ax2_fused % 128)
                                      T.reads(Y[v0, v1, v2])
                                      T.writes(Y_shared[v0, v1, v2])
                                      T.block_attr({"meta_schedule.cooperative_fetch": 1})
                                      Y_shared[v0, v1, v2] = Y[v0, v1, v2]
                              for k_1, b_3, i_3, j_3, k_2, b_4, i_4, j_4 in T.grid(32, 1, 2, 64, 4, 1, 2, 1):
                                  with T.block("Z"):
                                      v_b = T.axis.spatial(1, b_3 + b_4)
                                      v_i = T.axis.spatial(128, b_1_i_1_j_1_fused * 4 + i_3 * 2 + i_4)
                                      v_j = T.axis.spatial(128, b_2_i_2_j_2_fused * 64 + j_3 + j_4)
                                      v_k = T.axis.reduce(128, k_0 * 128 + k_1 * 4 + k_2)
                                      T.reads(X_shared[v_b, v_i, v_k], Y_shared[v_b, v_k, v_j])
                                      T.writes(Z_local[v_b, v_i, v_j])
                                      T.block_attr({"meta_schedule.thread_extent_high_inclusive": 1024, "meta_schedule.thread_extent_low_inclusive": 32, "meta_schedule.tiling_structure": "SSSRRSRS"})
                                      with T.init():
                                          Z_local[v_b, v_i, v_j] = T.float32(0)
                                      Z_local[v_b, v_i, v_j] = Z_local[v_b, v_i, v_j] + X_shared[v_b, v_i, v_k] * Y_shared[v_b, v_k, v_j]
                          for ax0, ax1, ax2 in T.grid(1, 4, 64):
                              with T.block("Z_local"):
                                  v0 = T.axis.spatial(1, ax0)
                                  v1 = T.axis.spatial(128, b_1_i_1_j_1_fused * 4 + ax1)
                                  v2 = T.axis.spatial(128, b_2_i_2_j_2_fused * 64 + ax2)
                                  T.reads(Z_local[v0, v1, v2])
                                  T.writes(Z[v0, v1, v2])
                                  Z[v0, v1, v2] = Z_local[v0, v1, v2]
      # fmt: on
      decision_0 = [
          ("SamplePerfectTile", [1, 1, 1, 1, 1]),
          ("SamplePerfectTile", [1, 32, 1, 2, 2]),
          ("SamplePerfectTile", [1, 1, 2, 64, 1]),
          ("SamplePerfectTile", [1, 32, 4]),
          ("SampleCategorical", 1),
          ("SampleCategorical", 0),
          ("SampleCategorical", 4),
      ]
      mod = create_te_workload("GMM", 0)
      actual = _design_space(mod)
      check_sketches(
          mod,
          sketches=actual,
          expected_mods=[gmm_0],
          expected_decisions=[decision_0],
      )
  
file_path: tvm/tests/python/meta_schedule/test_meta_schedule_space_cuda.py
imports: from tvm import meta_schedule
  from tvm.meta_schedule.testing.space_generation import check_sketches, generate_design_space, print_sketches
  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 9 for calling a global function with example usage: test_cuda_gmm() without return types