code: def test_conv2d():
      np.random.seed(0)
  
      kernel_hs = [1, 2, 3, 5]
      kernel_ws = [1, 2, 3, 5]
      pad = [(1, 1), (2, 2), (2, 1)]
      strides = [(1, 1), (2, 2)]
      dilation = [(1, 1)]
      out_channels = [1, 4, 8, 16]
      input_shapes = [(10, 10, 14), (12, 15, 16), (20, 20, 20)]
      batches = [1, 2]
      groups = [1, 2]
      bias_kind = ["none", "add_3d", "add_4d", "bias.add"]
      activation_kind = ["none", "relu", "sigmoid"]
      trials = generate_trials(
          [
              kernel_hs,
              kernel_ws,
              pad,
              strides,
              dilation,
              out_channels,
              input_shapes,
              groups,
              batches,
              bias_kind,
              activation_kind,
          ],
          3,
      )
  
      for (
          kernel_h,
          kernel_w,
          pad,
          stride,
          dilation,
          out_channels,
          input_shapes,
          group,
          batch,
          bias,
          activation,
      ) in trials:
          if out_channels % group != 0:
              continue
          func, params = _get_model(
              shape=(batch, *input_shapes),
              kernel=(kernel_h, kernel_w),
              padding=pad,
              strides=stride,
              dilation=dilation,
              groups=group,
              channels=out_channels,
              bias_type=bias,
              activation_type=activation,
          )
          compare_inference_with_ref(func, params)
  
file_path: tvm/tests/python/contrib/test_bnns/test_conv2d.py
imports: import numpy
  import pytest
  import tvm
  from tvm import relay
  from .infrastructure import skip_runtime_test, compare_inference_with_ref, generate_trials
label_desc: Use image node_id 2 for calling a global function with example usage: test_conv2d() without return types