code: def test_3d_convolution_cudnn_nchw(
      self,
      op_type,
      batch_size,
      stride,
      size,
      kernel,
      dilation,
      pad,
      use_bias,
      force_algo_fwd,
      force_algo_dgrad,
      force_algo_wgrad,
      gc,
      dc,
  ):
      input_channels = 1
      output_channels = 1
      n = 3
      dkernel = dilation * (kernel - 1) + 1
      order = "NCHW"
  
      op = core.CreateOperator(
          op_type,
          ["X", "w", "b"] if use_bias else ["X", "w"],
          ["Y"],
          strides=[stride] * n,
          kernels=[kernel] * n,
          dilations=[dilation] * n,
          pads=[pad] * n * 2,
          order=order,
          engine="CUDNN",
          force_algo_fwd=force_algo_fwd,
          force_algo_dgrad=force_algo_dgrad,
          force_algo_wgrad=force_algo_wgrad,
      )
  
      input_dims = [batch_size, input_channels]
      input_dims.extend([size] * n)
      filter_dims = [output_channels, input_channels]
      filter_dims.extend([kernel] * n)
      X = np.random.rand(*input_dims).astype(np.float32) - 0.5
      w = np.random.rand(*filter_dims).astype(np.float32) - 0.5
      b = np.random.rand(output_channels).astype(np.float32) - 0.5
  
      inputs = [X, w, b] if use_bias else [X, w]
  
      if size + pad + pad < dkernel or size + pad + pad < dkernel:
          with self.assertRaises(RuntimeError):
              self.assertDeviceChecks(dc, op, inputs, [0])
          return
  
      try:
          self.assertDeviceChecks(dc, op, inputs, [0])
      except RuntimeError as e:
          es = str(e)
          # CUDNN_CONVOLUTION_FWD_ALGO_IMPLICIT_GEMM should always have
          # implementation
          if (
              "status == CUDNN_STATUS_SUCCESS" not in es
              or "CUDNN_STATUS_NOT_SUPPORTED" not in es
              or force_algo_fwd == 0
          ):
              raise e
  
      for i in range(len(inputs)):
          try:
              self.assertGradientChecks(gc, op, inputs, i, [0])
          except RuntimeError as e:
              es = str(e)
              if (
                  "status == CUDNN_STATUS_SUCCESS" not in es
                  or "CUDNN_STATUS_NOT_SUPPORTED" not in es
              ):
                  raise e
  
imports: import collections
  import functools
  import unittest
  import caffe2.python._import_c_extension
  import caffe2.python.hip_test_util
  import caffe2.python.hypothesis_test_util
  import caffe2.python.serialized_test.serialized_test_util
  import hypothesis.strategies
  import numpy
  from caffe2.proto import caffe2_pb2
  from caffe2.python import brew, core, utils, workspace
  from caffe2.python.model_helper import ModelHelper
  from hypothesis import assume, given, settings
label_desc: Use image node_id 7 for calling the TestConvolution obj's underlying member method code with example usage: obj.test_3d_convolution_cudnn_nchw(op_type, batch_size, stride, size, kernel, dilation, pad, use_bias, force_algo_fwd, force_algo_dgrad, force_algo_wgrad, gc, dc) without return types