code: def render_cast(ins, inp, out):
      if inp.dtype == dtypes.bool and (
          dtypes.is_float(out.dtype) or dtypes.is_int(out.dtype)
      ):
          ins.append(
              f"selp.{dtype_to_nvtype[out.dtype]} {out}, {'0f3F800000, 0f00000000' if dtypes.is_float(out.dtype) else '1, 0'}, {inp};"
          )
      elif out.dtype == dtypes.bool:
          if inp.dtype == dtypes.bool:
              ins.append(f"mov.pred {out}, {inp};")
          else:
              ins.append(
                  f"setp.ne.{dtype_to_nvtype[inp.dtype]} {out}, {'0f00000000' if dtypes.is_float(inp.dtype) else '0'}, {inp};"
              )
      else:
          round_mod = (
              ".rzi"
              if dtypes.is_int(out.dtype) and dtypes.is_float(inp.dtype)
              else ".rz"
              if dtypes.is_float(out.dtype)
              and (
                  dtypes.is_int(inp.dtype)
                  or dtypes.is_float(inp.dtype)
                  and inp.dtype.itemsize > out.dtype.itemsize
              )
              else ""
          )
          ins.append(
              f"cvt{round_mod}.{dtype_to_nvtype[out.dtype]}.{dtype_to_nvtype[inp.dtype]} {out}, {inp};"
          )
  
file_path: tinygrad/extra/assembly/assembly_ptx.py
imports: from typing import List
  import struct
  from tinygrad.codegen.assembly import uops_to_asmstyle, AssemblyLanguage
  from tinygrad.codegen.linearizer import UOps, UOp
  from tinygrad import dtypes
  from tinygrad.ops import BinaryOps, UnaryOps, TernaryOps
  from tinygrad.runtime.ops_cuda import arch
label_desc: Use image node_id 3 for calling a global function with example usage: render_cast(ins, inp, out) without return types