code: def test_cuda_vectorize_add():
      num_thread = 8
  
      def check_cuda(dtype, n, lanes):
          if dtype == "float16" and not have_fp16(
              tvm.cuda(0).compute_version
          ):
              print("Skip because gpu does not have fp16 support")
              return
          if dtype == "int8" and not have_int8(
              tvm.cuda(0).compute_version
          ):
              print("skip because gpu does not support int8")
              return
          A = te.placeholder(
              (n,), name="A", dtype="%sx%d" % (dtype, lanes)
          )
          B = te.compute(
              (n,), lambda i: A[i] + tvm.tir.const(1, A.dtype), name="B"
          )
          s = te.create_schedule(B.op)
          xo, xi = s[B].split(B.op.axis[0], factor=num_thread)
          s[B].bind(xo, bx)
          s[B].bind(xi, tx)
          fun = tvm.build(s, [A, B], "cuda")
          dev = tvm.cuda(0)
          a = tvm.nd.empty((n,), A.dtype, dev).copyfrom(
              np.random.uniform(size=(n, lanes))
          )
          c = tvm.nd.empty((n,), B.dtype, dev)
          fun(a, c)
          tvm.testing.assert_allclose(c.numpy(), a.numpy() + 1)
  
      check_cuda("float32", 64, 2)
      check_cuda("float32", 64, 3)
      check_cuda("float32", 64, 4)
      check_cuda("int8", 64, 2)
      check_cuda("int8", 64, 3)
      check_cuda("int8", 64, 4)
      check_cuda("uint8", 64, 2)
      check_cuda("uint8", 64, 3)
      check_cuda("uint8", 64, 4)
      check_cuda("float16", 64, 2)
      check_cuda("float16", 64, 4)
      check_cuda("float16", 64, 6)
      check_cuda("float16", 64, 8)
  
imports: import os
  import re
  import tvm
  from tvm import te
  import numpy
  from tvm import topi
  from tvm.contrib.nvcc import have_fp16, have_int8, have_bf16
  from tvm.contrib import utils
  from tvm.script import tir
  import tvm.testing
  import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: test_cuda_vectorize_add() without return types