Skip to content

Commit

Permalink
skip nvJitLink binding tests if the library is not usable
Browse files Browse the repository at this point in the history
  • Loading branch information
leofang committed Dec 16, 2024
1 parent 36f4771 commit 8ee415d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
13 changes: 13 additions & 0 deletions cuda_bindings/tests/test_nvjitlink.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,19 @@ def ptx_header(version, arch):
]


def check_nvjitlink_usable():
from cuda.bindings._internal import nvjitlink as inner_nvjitlink

if inner_nvjitlink._inspect_function_pointer("__nvJitLinkVersion") == 0:
return False
return True


pytestmark = pytest.mark.skipif(
not check_nvjitlink_usable(), reason="nvJitLink not usable, maybe not installed or too old (<12.3)"
)


# create a valid LTOIR input for testing
@pytest.fixture
def get_dummy_ltoir():
Expand Down
4 changes: 3 additions & 1 deletion cuda_core/docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,11 @@


section_titles = ["Returns"]


def autodoc_process_docstring(app, what, name, obj, options, lines):
if name.startswith("cuda.core.experimental.system"):
# patch the docstring (in lines) *in-place*. Should docstrings include section titles other than "Returns",
# patch the docstring (in lines) *in-place*. Should docstrings include section titles other than "Returns",
# this will need to be modified to handle them.
attr = name.split(".")[-1]
from cuda.core.experimental._system import System
Expand Down

0 comments on commit 8ee415d

Please sign in to comment.