code: def core_test_convolution_forward_backward(
      inshape,
      kernel,
      outmaps,
      pad,
      stride,
      dilation,
      group,
      channel_last,
      with_bias,
      base_axis,
      seed,
      ctx,
      func_name,
  ):
      from nbla_test_utils import function_tester
  
      if func_name == "ConvolutionCuda":
          pytest.skip(
              "CUDA Convolution N-D is only supported in CUDNN extension"
          )
      if channel_last and not func_name.endswith("Cudnn"):
          pytest.skip(
              "channel_last=True is only supported in CUDNN backend so far."
          )
      if (
          channel_last
          and func_name.endswith("Cudnn")
          and (np.any(np.asarray(dilation) > 1) or group > 1)
      ):
          import nnabla_ext.cuda as nc
  
          major, minor, revision = map(
              int, nc.__cudnn_version__.split(".")
          )
          version = major * 1000 + minor * 100
          if version < 7200:
              pytest.skip(
                  "channel_last dilated convolution not work in CUDNN {}.".format(
                      version
                  )
              )
  
      inmaps = inshape[base_axis]
      if channel_last:
          t = refs.ChannelLastToFirstTranspose(
              len(inshape), len(kernel)
          )
          inshape = tuple(inshape[i] for i in t.inv_axes)
      rng = np.random.RandomState(seed)
      i = rng.randn(*inshape).astype(np.float32)
      kshape = (outmaps,) + (inmaps // group,) + kernel
      if channel_last:
          t = refs.ChannelLastToFirstTranspose(len(kshape), len(kernel))
          kshape = tuple(kshape[i] for i in t.inv_axes)
      k = rng.randn(*kshape).astype(np.float32)
      b = None
      if with_bias:
          b = rng.randn(outmaps).astype(np.float32)
      inputs = [i, k, b]
      atol_half = 1.0 if inmaps > 64 else 1e-1
      function_tester(
          rng,
          F.convolution,
          ref_convolution,
          inputs,
          func_args=[
              base_axis,
              pad,
              stride,
              dilation,
              group,
              channel_last,
          ],
          atol_f=1e-4,
          atol_b=1e-2,
          atol_accum=1e-5,
          dstep=1e-2,
          ctx=ctx,
          func_name=func_name,
          atol_half=atol_half,
      )
  
file_path: nnabla/python/test/function/test_convolution.py
imports: from __future__ import division
  import pytest
  import numpy
  import nnabla.functions
  import refs
  from nbla_test_utils import list_context
label_desc: Use image node_id 2 for calling a global function with example usage: core_test_convolution_forward_backward(inshape, kernel, outmaps, pad, stride, dilation, group, channel_last, with_bias, base_axis, seed, ctx, func_name) without return types