code: def test_fused_convolution(
      seed,
      kernel,
      pad,
      stride,
      dilation,
      group,
      channel_last,
      decay_rate,
      eps,
      nonlinearity,
      nonlinearity_args,
      pad_mode,
      constant_value,
      with_bias,
      bn,
      add2,
      ctx,
      func_name,
  ):
      rng = np.random.RandomState(seed)
      inputs = list(
          create_inputs(
              rng,
              kernel,
              pad,
              stride,
              dilation,
              group,
              with_bias,
              bn,
              add2,
              channel_last,
          )
      )
      base_axis = 1
      batch_stat = True if bn is None else bn
      bn_backward = [None, None, None, None]
      if bn is True:
          bn_backward = [True, True, False, False]
      elif bn is False:
          bn_backward = [True, True, True, True]
  
      func_args = [
          base_axis,
          (*pad, *pad),
          (stride, stride),
          (dilation, dilation),
          group,
          channel_last,
          decay_rate,
          eps,
          batch_stat,
          nonlinearity,
          nonlinearity_args,
          pad_mode,
          constant_value,
      ]
      backward = (
          [True, True, True if with_bias else None]
          + bn_backward
          + [True if add2 else None]
      )
  
      # Run float test
      cpu_ctx_float = nn.Context(["cpu:float"])
      run_test(
          func_name,
          ctx,
          cpu_ctx_float,
          rng,
          inputs,
          func_args,
          backward,
          atol_b=1e-6,
          atol_accum=1e-6,
      )
  
      # Run half test
      # Compare cpp half implementation with python reference.
      cpu_ctx_half = nn.Context(["cpu:half"])
      ext, dtype = ctx.backend[0].split(":")
      assert dtype == "float"
      ctx_half = ext_utils.get_extension_context(
          ext, type_config="half"
      )
      ctx_half.device_id = ctx.device_id
  
      run_test(
          func_name,
          ctx_half,
          cpu_ctx_half,
          rng,
          inputs,
          func_args,
          backward,
          atol_b=5e-2,
          atol_accum=5e-2,
      )
  
file_path: nnabla/python/test/function/test_fused_convolution.py
imports: import pytest
  import numpy
  import nnabla
  import nnabla.functions
  import nnabla.ext_utils
  from nbla_test_utils import list_context
label_desc: Use image node_id 6 for calling a global function with example usage: test_fused_convolution(seed, kernel, pad, stride, dilation, group, channel_last, decay_rate, eps, nonlinearity, nonlinearity_args, pad_mode, constant_value, with_bias, bn, add2, ctx, func_name) without return types