Skip to content

Commit c2f7611

Browse files
other needed cuda components
1 parent 7f56f01 commit c2f7611

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

numba_cuda/numba/cuda/cuda_paths.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from numba.misc.findlib import find_lib
1010
from numba import config
1111
import ctypes
12+
import warnings
1213

1314
_env_path_tuple = namedtuple("_env_path_tuple", ["by", "info"])
1415

@@ -417,6 +418,11 @@ def get_cuda_paths():
417418
418419
Note: The result of the function is cached.
419420
"""
421+
warnings.warn(
422+
"get_cuda_paths() is deprecated, use `cuda.bindings.path_finder`.",
423+
DeprecationWarning,
424+
stacklevel=2,
425+
)
420426
# Check cache
421427
if hasattr(get_cuda_paths, "_cached_result"):
422428
return get_cuda_paths._cached_result

numba_cuda/numba/cuda/cudadrv/libs.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from numba.cuda.cudadrv.driver import locate_driver_and_loader, load_driver
2020
from numba.cuda.cudadrv.error import CudaSupportError
2121
from numba.core import config
22+
from cuda.bindings import path_finder
2223

2324

2425
if sys.platform == "win32":
@@ -33,6 +34,7 @@
3334

3435

3536
def get_libdevice():
37+
# libdevice
3638
d = get_cuda_paths()
3739
paths = d["libdevice"].info
3840
return paths
@@ -51,10 +53,9 @@ def get_cudalib(lib, static=False):
5153
loader's search mechanism.
5254
"""
5355
if lib in {"nvrtc", "nvvm"}:
54-
from cuda.bindings import path_finder
55-
5656
return path_finder._load_nvidia_dynamic_library(lib).abs_path
5757
else:
58+
# cudart, cudadevrt
5859
dir_type = "static_cudalib_dir" if static else "cudalib_dir"
5960
libdir = get_cuda_paths()[dir_type].info
6061

@@ -69,7 +70,7 @@ def get_cuda_include_dir():
6970
Note that this does not list the `CUDA_INCLUDE_PATH` entry in user
7071
configuration.
7172
"""
72-
73+
# CUDA headers
7374
return get_cuda_paths()["include_dir"].info
7475

7576

0 commit comments

Comments
 (0)