code: def test_round():
      nn = 1024
      n = tvm.runtime.convert(nn)
      A = te.placeholder((n,), name="A", dtype="float32")
      B = te.compute(
          A.shape,
          lambda *i: tvm.tir.call_intrin("float32", "tir.round", A(*i)),
          name="B",
      )
      s = te.create_schedule(B.op)
  
      def check_c():
          mhost = tvm.build(s, [A, B], "c", name="test_round")
          temp = utils.tempdir()
          path_dso = temp.relpath("temp.so")
          mhost.export_library(path_dso)
          m = tvm.runtime.load_module(path_dso)
          fround = m["test_round"]
          dev = tvm.cpu(0)
          n = nn
          a = tvm.nd.array(np.random.rand(n).astype(A.dtype), dev)
          b = tvm.nd.array(np.zeros(n, dtype=B.dtype), dev)
          fround(a, b)
          tvm.testing.assert_allclose(
              b.numpy(), (np.round(a.numpy()).view("float32"))
          )
  
      check_c()
  
file_path: tvm/tests/python/codegen/test_target_codegen_c_host.py
imports: import tvm
  import tvm.testing
  from tvm import te
  from tvm.contrib import utils
  from tvm.script import tir, ir
  import numpy
label_desc: Use image node_id 6 for calling a global function with example usage: test_round() without return types