Skip to content

Commit

Permalink
Fix xfailed test of adding LTO-IR to a link
Browse files Browse the repository at this point in the history
  • Loading branch information
gmarkall committed Mar 18, 2024
1 parent 7205190 commit 278eb75
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions pynvjitlink/tests/test_pynvjitlink.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,6 @@ def test_complete_empty():
[
("device_functions_cubin", InputType.CUBIN),
("device_functions_fatbin", InputType.FATBIN),
# XXX: LTOIR input type needs debugging - results in
# NVJITLINK_ERROR_INTERNAL.
pytest.param(
"device_functions_ltoir", InputType.LTOIR, marks=pytest.mark.xfail
),
("device_functions_ptx", InputType.PTX),
("device_functions_object", InputType.OBJECT),
("device_functions_archive", InputType.LIBRARY),
Expand All @@ -106,6 +101,17 @@ def test_add_file(input_file, input_type, gpu_arch_flag, request):
_nvjitlinklib.destroy(handle)


# We test the LTO input case separately as it requires the `-lto` flag. The
# OBJECT input type is used because the LTO-IR container is packaged in an ELF
# object when produced by NVCC.
def test_add_file_lto(device_functions_ltoir, gpu_arch_flag):
filename, data = device_functions_ltoir

handle = _nvjitlinklib.create(gpu_arch_flag, "-lto")
_nvjitlinklib.add_data(handle, InputType.OBJECT.value, data, filename)
_nvjitlinklib.destroy(handle)


def test_get_error_log(undefined_extern_cubin, gpu_arch_flag):
handle = _nvjitlinklib.create(gpu_arch_flag)
filename, data = undefined_extern_cubin
Expand Down

0 comments on commit 278eb75

Please sign in to comment.