code: def test_cuda_const_float_to_half():
      # This import is required to use nvcc to perform code gen;
      # otherwise it is found that the code gen is done by nvrtc.
      from tvm import autotvm
  
      shape = (2, 3, 4)
      a = te.placeholder(shape, dtype="float16", name="a")
      b = tvm.tir.const(0.5, dtype="float16")
      c = te.compute(shape, lambda i, j, k: a[i, j, k] > b, name="c")
      s = te.create_schedule(c.op)
      axes = [axis for axis in c.op.axis]
      fused = s[c].fuse(*axes)
      bx, tx = s[c].split(fused, factor=64)
      s[c].bind(bx, te.thread_axis("blockIdx.x"))
      s[c].bind(tx, te.thread_axis("threadIdx.x"))
  
      func = tvm.build(s, [a, c], "cuda")
      dev = tvm.cuda(0)
      a_np = np.random.uniform(size=shape).astype(a.dtype)
      c_np = np.zeros(shape=shape, dtype=c.dtype)
      a = tvm.nd.array(a_np, dev)
      c = tvm.nd.array(c_np, dev)
      func(a, c)
      np.testing.assert_equal(c.numpy(), a_np > b.value)
  
imports: import os
  import re
  import tvm
  from tvm import te
  import numpy
  from tvm import topi
  from tvm.contrib.nvcc import have_fp16, have_int8, have_bf16
  from tvm.contrib import utils
  from tvm.script import tir
  import tvm.testing
  import pytest
label_desc: Use image node_id 13 for calling a global function with example usage: test_cuda_const_float_to_half() without return types