code: def test_verify_memory_not_bind():
      n = te.var("n")
      A = te.placeholder((n,), name="A")
      B = te.compute(A.shape, lambda i: A[i] + 1.0, name="B")
  
      # B is not bound to threads.
      s = te.create_schedule(B.op)
  
      mod = tvm.lower(s, [A, B])
  
      for dev_type in gpu_devices:
          if tvm.testing.device_enabled(dev_type):
              binded_mod = tvm.tir.transform.Apply(
                  lambda f: f.with_attr(
                      "target", tvm.target.Target(dev_type)
                  )
              )(mod)
              with pytest.raises(RuntimeError):
                  tvm.tir.transform.VerifyMemory()(binded_mod)
  
      for dev_type in other_devices:
          if tvm.testing.device_enabled(dev_type):
              binded_mod = tvm.tir.transform.Apply(
                  lambda f: f.with_attr(
                      "target", tvm.target.Target(dev_type)
                  )
              )(mod)
              tvm.tir.transform.VerifyMemory()(binded_mod)
  
imports: import tvm
  import pytest
  from tvm import te
  import tvm.testing
label_desc: Use image node_id 2 for calling a global function with example usage: test_verify_memory_not_bind() without return types