code: def test_vulkan_stress(target, dev):
      """
      Launch a randomized test with multiple kernels per stream, multiple uses of
      kernels per stream, over multiple threads.
      """
  
      n = 1024
      num_thread = 64
  
      def run_stress():
          def worker():
              A = te.placeholder((n,), name="A", dtype="float32")
              B = te.placeholder((n,), name="B", dtype="float32")
              functions = [
                  (
                      lambda: te.compute(
                          (n,), lambda i: 2 * A[i] + 3 * B[i]
                      ),
                      lambda a, b: 2 * a + 3 * b,
                  ),
                  (
                      lambda: te.compute((n,), lambda i: A[i] + B[i]),
                      lambda a, b: a + b,
                  ),
                  (
                      lambda: te.compute(
                          (n,), lambda i: A[i] + 2 * B[i]
                      ),
                      lambda a, b: a + 2 * b,
                  ),
              ]
  
              def build_f(f_ref):
                  (C_f, ref) = f_ref
                  C = C_f()
                  s = te.create_schedule(C.op)
                  xo, xi = s[C].split(C.op.axis[0], factor=num_thread)
                  s[C].bind(xo, te.thread_axis("blockIdx.x"))
                  s[C].bind(xi, te.thread_axis("threadIdx.x"))
                  fun = tvm.build(s, [A, B, C], target)
                  return (fun, ref)
  
              fs = [
                  build_f(random.choice(functions))
                  for _ in range(np.random.randint(low=1, high=10))
              ]
              a = tvm.nd.empty((n,), A.dtype, dev).copyfrom(
                  np.random.uniform(size=(n,))
              )
              b = tvm.nd.empty((n,), B.dtype, dev).copyfrom(
                  np.random.uniform(size=(n,))
              )
              cs = [tvm.nd.empty((n,), A.dtype, dev) for _ in fs]
              for (f, _), c in zip(fs, cs):
                  f(a, b, c)
  
              for (_, ref), c in zip(fs, cs):
                  tvm.testing.assert_allclose(
                      c.numpy(), ref(a.numpy(), b.numpy())
                  )
  
          ts = [
              threading.Thread(target=worker)
              for _ in range(np.random.randint(1, 10))
          ]
          for t in ts:
              t.start()
          for t in ts:
              t.join()
  
      run_stress()
  
imports: import os
  from posixpath import split
  import random
  import re
  import threading
  import numpy
  import pytest
  import tvm
  import tvm.testing
  from tvm import relay, te
  from tvm.topi.math import cast
  from tvm.script import tir, ir
  from tvm.tir import TensorIntrin, IntImm, Cast, Schedule
  from tvm.tir.tensor_intrin.cuda import WMMA_LOAD_16x16x16_F16_A_INTRIN, WMMA_LOAD_16x16x16_F16_B_INTRIN, WMMA_SYNC_16x16x16_f16f16f32_INTRIN, WMMA_FILL_16x16x16_F32_INTRIN, WMMA_STORE_16x16x16_F32_GLOBAL_INTRIN, WMMA_SYNC_16x16x16_f16f16f16_INTRIN, WMMA_FILL_16x16x16_F16_INTRIN, WMMA_STORE_16x16x16_F16_GLOBAL_INTRIN
label_desc: Use image node_id 4 for calling a global function with example usage: test_vulkan_stress(target, dev) and returns: fun,  ref