File tree Expand file tree Collapse file tree 3 files changed +61
-8
lines changed Expand file tree Collapse file tree 3 files changed +61
-8
lines changed Original file line number Diff line number Diff line change 3434 "get_nvidia_nvvm_ctk" ,
3535 "get_nvidia_static_cudalib_ctk" ,
3636 "get_system_ctk" ,
37+ "SUPPORTED_LIBNAMES" ,
3738]
39+
40+ SUPPORTED_LIBNAMES = (
41+ # Core CUDA Runtime and Compiler
42+ "cudart" ,
43+ "nvfatbin" ,
44+ "nvJitLink" ,
45+ "nvrtc" ,
46+ "nvvm" ,
47+ # Math Libraries
48+ "cublas" ,
49+ "cufft" ,
50+ "curand" ,
51+ "cusolver" ,
52+ "cusparse" ,
53+ "nppc" ,
54+ "nppial" ,
55+ "nppicc" ,
56+ "nppidei" ,
57+ "nppif" ,
58+ "nppig" ,
59+ "nppim" ,
60+ "nppist" ,
61+ "nppisu" ,
62+ "nppitc" ,
63+ "npps" ,
64+ "nvblas" ,
65+ # Profiling and Developer Tools
66+ "cupti" ,
67+ "nvperf_host" ,
68+ "nvperf_target" ,
69+ "nvToolsExt" ,
70+ # Debugging and Introspection
71+ "accinj64" ,
72+ "cuinj64" ,
73+ "checkpoint" ,
74+ # Miscellaneous
75+ "OpenCL" ,
76+ )
Original file line number Diff line number Diff line change 66 print (f"{ k } : { v } " , flush = True )
77print ()
88
9- libnames = ("nvJitLink" , "nvrtc" , "nvvm" )
10-
11- for libname in libnames :
12- print (path_finder .find_nvidia_dynamic_library (libname ))
13- print ()
14-
15- for libname in libnames :
9+ for libname in path_finder .SUPPORTED_LIBNAMES :
1610 print (libname )
17- print (path_finder .load_nvidia_dynamic_library (libname ))
11+ for fun in (path_finder .find_nvidia_dynamic_library , path_finder .load_nvidia_dynamic_library ):
12+ try :
13+ out = fun (libname )
14+ except Exception as e :
15+ out = f"EXCEPTION: { type (e )} { str (e )} "
16+ print (out )
1817 print ()
Original file line number Diff line number Diff line change 1+ import pytest
2+
3+ from cuda .bindings import path_finder
4+
5+
6+ @pytest .mark .parametrize ("libname" , path_finder .SUPPORTED_LIBNAMES )
7+ def test_find_and_load (libname ):
8+ print (f"\n { libname } " )
9+ for fun in (path_finder .find_nvidia_dynamic_library , path_finder .load_nvidia_dynamic_library ):
10+ try :
11+ out = fun (libname )
12+ except Exception as e :
13+ out = f"EXCEPTION: { type (e )} { str (e )} "
14+ print (out )
15+ print ()
You can’t perform that action at this time.
0 commit comments