tilelang.contrib.nvrtc¶

Functions¶

get_nvrtc_version()

compile_cuda(code[, target_format, arch, options, verbose])

Compile cuda code with NVRTC.

Module Contents¶

tilelang.contrib.nvrtc.get_nvrtc_version()¶
Return type:

Tuple[int, int]

tilelang.contrib.nvrtc.compile_cuda(code, target_format='ptx', arch=None, options=None, verbose=False)¶

Compile cuda code with NVRTC.

Parameters:
  • code (str) – The cuda code.

  • target_format (Literal["ptx", "cubin"]) – The target format of nvrtc compiler.

  • arch (Optional[int]) – The cuda architecture code.

  • options (Optional[Union[str, List[str]]]) – The additional options.

  • verbose (bool) – Whether to print the verbose output.

Returns:

result_bytes – The bytearray of the cubin or ptx code.

Return type:

bytearray