Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions cuda_bindings/tests/test_nvjitlink.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,13 @@ def check_nvjitlink_usable():
def get_dummy_ltoir():
def CHECK_NVRTC(err):
if err != nvrtc.nvrtcResult.NVRTC_SUCCESS:
raise RuntimeError(f"Nvrtc Error: {err}")
raise RuntimeError(repr(err))

empty_cplusplus_kernel = "__global__ void A() {}"
err, program_handle = nvrtc.nvrtcCreateProgram(empty_cplusplus_kernel.encode(), b"", 0, [], [])
CHECK_NVRTC(err)
nvrtc.nvrtcCompileProgram(program_handle, 1, [b"-dlto"])
err = nvrtc.nvrtcCompileProgram(program_handle, 1, [b"-dlto"])[0]
CHECK_NVRTC(err)
err, size = nvrtc.nvrtcGetLTOIRSize(program_handle)
CHECK_NVRTC(err)
empty_kernel_ltoir = b" " * size
Expand Down
Loading