code: def test_group_conv1d(shape, layout, padding, target, dev, dtype):
      (
          batch,
          in_channels,
          in_width,
          filters,
          kernel_size,
          stride,
          dilation,
          groups,
      ) = shape
      if layout == "NCW":
          in_shape = [batch, in_channels, in_width]
          kernel_shape = [filters, in_channels // groups, kernel_size]
      else:
          in_shape = [batch, in_width, in_channels]
          kernel_shape = [kernel_size, in_channels // groups, filters]
  
      # reference data
      a_np = np.random.uniform(size=in_shape).astype(dtype)
      w_np = np.random.uniform(size=kernel_shape).astype(dtype)
      if layout == "NWC":
          np_in = np.transpose(a_np, [0, 2, 1])
          np_w = np.transpose(w_np, [2, 1, 0])
      else:
          np_in = a_np
          np_w = w_np
      b_np = tvm.topi.testing.group_conv1d_ncw_python(
          np_in, np_w, stride, padding, dilation, groups
      )
      if layout == "NWC":
          b_np = np.transpose(b_np, [0, 2, 1])
  
      A = te.placeholder(in_shape, name="A", dtype=dtype)
      W = te.placeholder(kernel_shape, name="W", dtype=dtype)
  
      fcompute, fschedule = tvm.topi.testing.dispatch(
          target, _group_conv1d_implementations[layout]
      )
      with tvm.target.Target(target):
          B = fcompute(
              A, W, stride, padding, dilation, groups, "float32"
          )
          s = fschedule([B])
  
      a = tvm.nd.array(a_np, dev)
      w = tvm.nd.array(w_np, dev)
      b = tvm.nd.array(
          np.zeros(get_const_tuple(B.shape), dtype=dtype), dev
      )
      print(tvm.lower(s, [A, W, B], target))
  
      func = tvm.build(s, [A, W, B], target)
      func(a, w, b)
      tvm.testing.assert_allclose(b.numpy(), b_np, rtol=1e-5)
  
file_path: tvm/tests/python/topi/test_topi_conv1d.py
imports: import numpy
  import itertools
  import tvm
  from tvm import te
  from tvm import topi
  import tvm.testing
  import tvm.topi.testing
  from tvm.contrib.pickle_memoize import memoize
  from tvm.topi.utils import get_const_tuple
label_desc: Use image node_id 3 for calling a global function with example usage: test_group_conv1d(shape, layout, padding, target, dev, dtype) without return types