code: def verify_elemwise_sum(num_args, dtype):
      shape = (3, 5, 4)
  
      tvm_placeholders = []
      for i in range(num_args):
          tvm_placeholders.append(
              te.placeholder(shape, name="data" + str(i), dtype=dtype)
          )
      esum = topi.elemwise_sum(tvm_placeholders)
      s = te.create_schedule([esum.op])
  
      @memoize("topi.tests.test_topi_elemwise_sum")
      def get_ref_data():
          np_nd = [
              np.random.uniform(0, 10, size=shape).astype(dtype)
              for i in range(num_args)
          ]
          return np_nd
  
      np_nd = get_ref_data()
  
      def check_target(target):
          if not tvm.testing.device_enabled(target):
              print("Skip because %s is not enabled" % target)
              return
  
          dev = tvm.device(target, 0)
          out = tvm.nd.array(np.zeros(shape, dtype=dtype), dev)
          f = tvm.build(
              s, tvm_placeholders + [esum], target, name="elemwise_sum"
          )
          tvm_nd = [tvm.nd.array(nd, dev) for nd in np_nd] + [out]
          f(*tvm_nd)
          np_out = np.sum(np.array(np_nd), axis=0)
          tvm.testing.assert_allclose(out.numpy(), np_out, rtol=1e-5)
  
      for target in ["llvm"]:
          check_target(target)
  
file_path: tvm/tests/python/topi/test_topi_tensor.py
imports: import numpy
  import tvm
  from tvm import te
  from tvm import topi
  import tvm.topi.testing
  from tvm.contrib.pickle_memoize import memoize
  from tvm.contrib.nvcc import have_fp16
  import tvm.testing
label_desc: Use image node_id 1 for calling a global function with example usage: verify_elemwise_sum(num_args, dtype) and returns: np_nd