code: def test_conv2d_relay_auto_schedule(hexagon_launcher):
      """Test conv2d using auto schedule."""
      if hexagon_launcher.is_simulator():
          pytest.skip(msg="Tuning on simulator not supported.")
  
      i_size, o_size, h_size, w_size = 64, 64, 56, 56
      k_height_size = k_width_size = 3
  
      strides = (1, 1)
      padding = (1, 1)
  
      d_shape = (1, h_size, w_size, i_size)
      w_shape = (k_height_size, k_width_size, i_size, o_size)
      bias_shape = (1, 1, 1, w_shape[3])
      out_channel = w_shape[3]
  
      data = relay.var("data", shape=d_shape, dtype="float16")
      weight = relay.var("weight", shape=w_shape, dtype="float16")
      bias = relay.var("bias", shape=bias_shape, dtype="float16")
      conv2d = relay.nn.conv2d(
          data=data,
          weight=weight,
          kernel_size=(k_height_size, k_width_size),
          channels=out_channel,
          padding=padding,
          strides=strides,
          out_dtype="float16",
          data_layout="NHWC",
          kernel_layout="HWIO",
      )
      mod = tvm.IRModule.from_expr(conv2d + bias)
      mod = mod.with_attr(
          "executor",
          relay.backend.Executor("graph", {"link-params": True}),
      )
  
      data_np = np.random.randn(*d_shape).astype("float16")
      weight_np = np.random.randn(*w_shape).astype("float16")
      bias_np = np.random.randn(*bias_shape).astype("float16")
      params = {"weight": weight_np, "bias": bias_np}
  
      ref = (
          relay.create_executor(
              "graph", mod=mod, device=tvm.cpu(0), target="llvm"
          )
          .evaluate()(*[data_np, weight_np, bias_np])
          .numpy()
      )
  
      with tempfile.TemporaryDirectory() as work_dir:
          target = get_hexagon_target("v69")
          database = ms.relay_integration.tune_relay(
              mod=mod,
              params=params,
              target=target,
              max_trials_global=8,
              strategy="replay-trace",
              work_dir=work_dir,
              builder=get_hexagon_local_builder(),
              runner=get_hexagon_rpc_runner(
                  hexagon_launcher, number=20
              ),
          )
          lib = ms.relay_integration.compile_relay(
              database=database,
              mod=mod,
              params=params,
              target=target,
          )
  
      with hexagon_launcher.create_session() as session:
          rt_mod = session.get_executor_from_factory(lib)
  
          rt_mod.set_input("data", data_np)
  
          rt_mod.run()
  
          out = rt_mod.get_output(0).numpy()
          # Fairly loose check since fp16 results between x86 and Hexagon have
          # non-trivial difference.
          assert np.mean(np.abs(ref - out)) < 0.5
  
imports: import tempfile
  import numpy
  import pytest
  import tvm.testing
  import tvm.topi.testing
  from tvm import meta_schedule
  from tvm import relay, te
  from tvm.contrib.hexagon.meta_schedule import get_hexagon_local_builder, get_hexagon_rpc_runner
  from tvm.meta_schedule import postproc, schedule_rule
  from tvm.meta_schedule.arg_info import TensorInfo
  from tvm.meta_schedule.builder import BuilderInput
  from tvm.meta_schedule.runner import RunnerInput
  from tvm.script import tir
  from tvm.tir import FloatImm
  from tvm.tir.tensor_intrin.hexagon import VRMPY_u8u8i32_INTRIN
  from .infrastructure import get_hexagon_target
label_desc: Use image node_id 7 for calling a global function with example usage: test_conv2d_relay_auto_schedule(hexagon_launcher) without return types