code: def test_conv2d():
      N, IC, H, W = 1, 64, 56, 56
      OC, IC, FH, FW = 128, 64, 3, 3
      data_shape = (N, IC, H, W)
      weight_shape = (OC, IC, FH, FW)
      padding = (0, 0)
      strides = (1, 1)
  
      relay_mod = tvm.IRModule.from_expr(
          get_conv2d(
              data_shape,
              weight_shape,
              padding=padding,
              strides=strides,
              channels=OC,
              kernel_size=(FH, FW),
              data_layout="NCHW",
              kernel_layout="OIHW",
          )
      )
  
      data_np = np.random.randn(*data_shape).astype("float32")
      weight_np = np.random.randn(*weight_shape).astype("float32")
  
      target = "llvm"
      params = {"weight": weight_np}
  
      def schedule_fn(sch):
          if "nn_conv2d" in sch.mod.attrs["task_name"]:
              schedule_tir_conv2d_nchw_oihw(sch)
              return True
          return False
  
      with TempOpAttr("nn.conv2d", "FTVMStrategy", _tmp_strategy):
          with ms.database.ScheduleFnDatabase(
              schedule_fn
          ), tvm.transform.PassContext(
              opt_level=3,
              config={
                  "relay.backend.use_meta_schedule": True,
                  "relay.backend.tir_converter": "allow_extern",
              },
          ):
              lib = relay.build(relay_mod, target=target, params=params)
  
      dev = tvm.device(target, 0)
  
      runtime = tvm.contrib.graph_executor.GraphModule(
          lib["default"](dev)
      )
  
      runtime.set_input("data", data_np)
      runtime.run()
  
      out = runtime.get_output(0).numpy()
  
      ref = get_ref(data_np, weight_np, strides, padding)
  
      tvm.testing.assert_allclose(out, ref, atol=1e-4, rtol=1e-4)
  
file_path: tvm/tests/python/meta_schedule/test_meta_schedule_relay_tir_compute.py
imports: import numpy
  import tvm
  import tvm.testing
  import tvm.topi.testing
  from tvm import autotvm
  from tvm import meta_schedule
  from tvm import relay, te
  from tvm.relay.testing.temp_op_attr import TempOpAttr
  from tvm.script import tir
label_desc: Use image node_id 8 for calling a global function with example usage: test_conv2d() and returns: False, True