code: def test_convert_single_conv(target_precision):
      """Conv is a green listed operation meaning it will always use fp16 workload.
  
      By default it accumulates to fp32 and outputs fp16.
      """
      data_shape = (1, 3, 32, 32)
      weight_shape = (5, 3, 3, 3)
      data = relay.var("data", shape=data_shape, dtype="float32")
      weight = relay.var("weight", shape=weight_shape, dtype="float32")
      conv = relay.nn.conv2d(
          data,
          weight,
          strides=(1, 1),
          padding=(1, 1),
          out_dtype="float32",
      )
      mod = tvm.IRModule.from_expr(conv)
      mod = tvm.relay.transform.InferType()(mod)
  
      mod_params = {
          "data": np.random.uniform(-1, 1, size=data_shape).astype(
              "float32"
          ),
          "weight": np.random.uniform(-1, 1, size=weight_shape).astype(
              "float32"
          ),
      }
      amp_mod = verify_mixed_precision_output_close(
          mod,
          mod_params,
          mixed_precision_dtype=target_precision,
          atol=0.01,
          rtol=1e-3,
          keep_orig_output_dtype=True,
      )
  
      expected_mod = tvm.IRModule.from_expr(
          relay.cast(
              relay.nn.conv2d(
                  relay.cast(data, target_precision),
                  relay.cast(weight, target_precision),
                  strides=(1, 1),
                  padding=(1, 1),
                  out_dtype=target_precision,
              ),
              "float32",
          )
      )
      expected_mod = tvm.relay.transform.InferType()(expected_mod)
  
      assert not tvm.ir.structural_equal(amp_mod, mod)
      assert tvm.ir.structural_equal(amp_mod, expected_mod)
  
imports: from typing import Any, Dict, List
  import numpy
  import pytest
  import tvm
  from tvm import relay
  from tvm.relay.testing import lstm
  from tvm.relay.transform import InferType, ToMixedPrecision, mixed_precision
label_desc: Use image node_id 5 for calling a global function with example usage: test_convert_single_conv(target_precision) without return types