code: def run_passes(func: tvm.tir.PrimFunc):
      mod = tvm.IRModule.from_expr(func)
      mod = tvm.tir.transform.StorageFlatten(64)(mod)
  
      cuda_target = tvm.target.Target("cuda", host="llvm")
  
      mod = tvm.tir.transform.Apply(
          lambda f: f.with_attr(
              {"global_symbol": "test", "target": cuda_target}
          )
      )(mod)
  
      mod = tvm.tir.transform.AnnotateDeviceRegions()(mod)
      mod = tvm.tir.transform.SplitHostDevice()(mod)
      return tvm.tir.transform.ThreadSync("shared")(mod)
  
file_path: tvm/tests/python/tir-transform/test_tir_transform_thread_sync.py
imports: import tvm
  import tvm.testing
  from tvm import te
  from tvm.script import tir
label_desc: Use image node_id 1 for calling a global function with example usage: run_passes(func) and returns: tvm