code: def test_vm_parallel():
      dtype = "int64"
      n = te.size_var("n")
      Ab = tvm.tir.decl_buffer((n,), dtype)
      i = te.size_var("i")
      ib = tvm.tir.ir_builder.create()
      A = ib.buffer_ptr(Ab)
      with ib.for_range(0, n, "i", kind="parallel") as i:
          A[i] = A[i] + 1
      stmt = ib.get()
      mod = tvm.IRModule.from_expr(
          tvm.tir.PrimFunc([Ab], stmt).with_attr(
              "global_symbol", "test"
          )
      )
  
      def check(f):
          a = tvm.nd.array(np.zeros(10, dtype=dtype))
          f(a)
          np.testing.assert_equal(a.numpy(), np.ones(a.shape[0]))
  
      run_jit(mod, check)
  
file_path: tvm/tests/python/codegen/test_target_codegen_vm_basic.py
imports: import tvm
  import tvm.testing
  from tvm import te
  from tvm.script import tir, ir
  import numpy
label_desc: Use image node_id 6 for calling a global function with example usage: test_vm_parallel() without return types