Skip to content

Commit 8ee415d

Browse files
committed
skip nvJitLink binding tests if the library is not usable
1 parent 36f4771 commit 8ee415d

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

cuda_bindings/tests/test_nvjitlink.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,19 @@ def ptx_header(version, arch):
5252
]
5353

5454

55+
def check_nvjitlink_usable():
56+
from cuda.bindings._internal import nvjitlink as inner_nvjitlink
57+
58+
if inner_nvjitlink._inspect_function_pointer("__nvJitLinkVersion") == 0:
59+
return False
60+
return True
61+
62+
63+
pytestmark = pytest.mark.skipif(
64+
not check_nvjitlink_usable(), reason="nvJitLink not usable, maybe not installed or too old (<12.3)"
65+
)
66+
67+
5568
# create a valid LTOIR input for testing
5669
@pytest.fixture
5770
def get_dummy_ltoir():

cuda_core/docs/source/conf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,11 @@
9494

9595

9696
section_titles = ["Returns"]
97+
98+
9799
def autodoc_process_docstring(app, what, name, obj, options, lines):
98100
if name.startswith("cuda.core.experimental.system"):
99-
# patch the docstring (in lines) *in-place*. Should docstrings include section titles other than "Returns",
101+
# patch the docstring (in lines) *in-place*. Should docstrings include section titles other than "Returns",
100102
# this will need to be modified to handle them.
101103
attr = name.split(".")[-1]
102104
from cuda.core.experimental._system import System

0 commit comments

Comments
 (0)