File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 99from numba .misc .findlib import find_lib
1010from numba import config
1111import 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
Original file line number Diff line number Diff line change 1919from numba .cuda .cudadrv .driver import locate_driver_and_loader , load_driver
2020from numba .cuda .cudadrv .error import CudaSupportError
2121from numba .core import config
22+ from cuda .bindings import path_finder
2223
2324
2425if sys .platform == "win32" :
3334
3435
3536def 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
You can’t perform that action at this time.
0 commit comments