code: def test_conv_ones(backend_default, ones_convargs, deltas_buffer):
      dtypeu = np.float32
      indim, nifm, fshape, nofm, batch_size, stride, pad = ones_convargs
      if isinstance(
          NervanaObject.be, NervanaGPU
      ) and NervanaObject.be.compute_capability < (5, 0):
          if nifm % 4 != 0:
              pytest.skip(
                  msg="C dim must be a multiple of 4 for Kepler bprop kernel"
              )
  
      NervanaObject.be.bsz = batch_size
  
      # weights set to one
      init_unif = Uniform(low=1.0, high=1.0)
  
      inshape = (nifm, indim, indim)
      insize = np.prod(inshape)
  
      neon_layer = Convolution(
          fshape=(fshape, fshape, nofm),
          strides=stride,
          padding=pad,
          init=init_unif,
      )
      inp = neon_layer.be.array(np.ones((insize, batch_size)))
      inp.lshape = inshape
      neon_layer.configure(inshape)
      neon_layer.prev_layer = True
      neon_layer.allocate()
  
      neon_layer.allocate_deltas(deltas_buffer)
      deltas_buffer.allocate_buffers()
      neon_layer.set_deltas(deltas_buffer)
  
      # run fprop
      out = neon_layer.fprop(inp).get()
  
      # generate the reference layer
      ref_layer = ConvLayerRef(
          1,
          batch_size,
          identity,
          inshape[0],
          inshape[1:3],
          (fshape, fshape),
          nofm,
          stride,
          dtypeu,
          padding=pad,
      )
      # init weights to ones
      ref_layer.weights = np.ones(neon_layer.W.shape).T.astype(dtypeu)
      ref_layer.fprop(inp.get().T)
      out_exp = ref_layer.y.copy()
      assert allclose_with_out(out_exp.T, out, atol=0.0, rtol=0.0)
  
      # generate err array
      err = np.ones(out.shape).astype(np.float32)
  
      # run bprop
      neon_layer.bprop(neon_layer.be.array(err))
      dw = neon_layer.dW.get()
  
      # run bprop
      ref_layer.bprop(err.T.astype(dtypeu), 1.0)
  
      # expected output for updates is uniform matrix with
      # all elements == ofmsize*batch_size
      updates_exp = ref_layer.updates.T
  
      # check dw from neon layer
      assert allclose_with_out(dw, updates_exp, atol=0.0, rtol=0.0)
  
      # the deltas are more complicated since the matricies are not
      # uniform, going to use the reference code directly here
      # no tolerance here should be exact
      dd = np.abs(ref_layer.berror_nopad.T - neon_layer.deltas.get())
      try:
          assert np.max(dd) == 0.0
      except AssertionError:
          if ones_convargs in (
              (32, 32, 3, 32, 64, 2, 0),
              (32, 32, 3, 16, 64, 2, 0),
              (32, 32, 3, 64, 64, 2, 0),
          ):
              pytest.xfail(
                  reason="xfail before mkl update. issue: #1020"
              )
          else:
              assert np.max(dd) == 0.0
  
      return
  
imports: import itertools
  import numpy
  import pytest
  from neon import NervanaObject
  from neon.layers.layer import Convolution
  from neon.initializers.initializer import Uniform
  from utils import allclose_with_out
label_desc: Use image node_id 3 for calling a global function with example usage: test_conv_ones(backend_default, ones_convargs, deltas_buffer) without return types