Skip to content

Commit 9003ff1

Browse files
committed
refresh
1 parent 5c5024c commit 9003ff1

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

cuda_bindings/cuda/bindings/utils/_nvvm_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def check_nvvm_compiler_options(options: Sequence[str]) -> bool:
3636
3737
Parameters
3838
----------
39-
options : Sequence[bytes]
39+
options : Sequence[str]
4040
List of compiler options as strings (e.g., ["-arch=compute_90", "-g"]).
4141
4242
Returns
@@ -46,7 +46,7 @@ def check_nvvm_compiler_options(options: Sequence[str]) -> bool:
4646
4747
Examples
4848
--------
49-
>>> from cuda.bindings.utils import check_nvvm_options
49+
>>> from cuda.bindings.utils import check_nvvm_compiler_options
5050
>>> check_nvvm_options(["-arch=compute_90", "-g"])
5151
True
5252
"""

cuda_bindings/tests/test_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222

2323

2424
def _is_libnvvm_available() -> bool:
25+
from cuda.bindings._internal.nvvm import _inspect_function_pointer
26+
from cuda.pathfinder import DynamicLibNotFoundError
2527
try:
26-
from cuda.bindings._internal.nvvm import _inspect_function_pointer
27-
2828
return _inspect_function_pointer("__nvvmCreateProgram") != 0
29-
except Exception:
29+
except DynamicLibNotFoundError:
3030
return False
3131

3232

cuda_core/tests/test_program.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,10 @@ def _has_nvrtc_pch_apis_for_tests():
7272

7373
def _has_check_nvvm_compiler_options():
7474
try:
75-
from cuda.bindings.utils import check_nvvm_compiler_options # noqa: F401
76-
77-
return True
78-
except ImportError:
75+
import cuda.bindings.utils as utils
76+
except ModuleNotFoundError:
7977
return False
78+
return hasattr(utils, "check_nvvm_compiler_options")
8079

8180

8281
has_nvvm_option_checker = pytest.mark.skipif(

0 commit comments

Comments
 (0)