code: def test_verify_memory_partially_bind():
      n = te.var("n")
      A = te.placeholder((n,), name="A")
      B = te.compute(A.shape, lambda i: A[i] + 1.0, name="B")
      C = te.compute(B.shape, lambda i: B[i] + 2.0, name="C")
      D = te.compute(C.shape, lambda i: C[i] + 2.0, name="D")
  
      # C is bound to threads, but B and D are not.
      s = te.create_schedule([B.op, C.op, D.op])
      bx, tx = s[C].split(C.op.axis[0], factor=64)
      s[C].bind(bx, te.thread_axis("blockIdx.x"))
      s[C].bind(tx, te.thread_axis("threadIdx.x"))
  
      mod = tvm.lower(s, [A, B, C, D])
  
      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 3 for calling a global function with example usage: test_verify_memory_partially_bind() without return types