-
Notifications
You must be signed in to change notification settings - Fork 229
Move pathfinder to cuda-python top level
#723
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
fbdebfa
731256d
6e0ec6c
07e1385
68aa8d5
fafa998
4eff7d2
db0f540
9fea2e7
c494ef2
78b8c6d
5690d96
81b9bd9
b9be5cb
79a8019
975ba0b
3678fb4
c25184e
58b2513
050f857
1933869
50f4f8e
787236c
5b5078b
13e08ae
97f9dc8
e18cf05
b015bbe
36491c8
c6187db
346e8b9
9207966
3682f7d
7742c5c
92c8441
a5b7190
db0ea56
9a9f1d7
aac1cf7
989db08
222df6c
0b8af00
f902dc9
481f8de
fd18e1e
796bd46
06763af
b2135cf
bf48142
135a37d
48c6d63
7ab201a
9f3e9a4
00c8b6a
034286a
aaed5f2
9d8c70c
8440f90
98ae874
9686c2f
f3c0006
8f015d2
9f17cd1
db7933a
1b9a929
b69bf23
80ebbda
1c8d315
52e1369
70d1c14
342ca49
4e0033c
74ef126
5e85328
46fd972
428a2dc
4096885
5e6c7e5
d787a4c
60918d5
933a889
c0509be
eedf658
58ca181
b73f421
88c4ebc
ee19b0c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,25 +7,26 @@ | |
| # Input for this script: .txt files generated with: | ||
| # for exe in *.exe; do 7z l $exe > "${exe%.exe}.txt"; done | ||
|
|
||
| # The output of this script | ||
| # requires obvious manual edits to remove duplicates and unwanted dlls. | ||
| # TODO: filter out cudart32_*.dll, nvvm32.dll | ||
| # The output of this script is expected to be usable as-is. | ||
|
|
||
| import collections | ||
| import sys | ||
|
|
||
| # ATTENTION: Ambiguous shorter names need to appear after matching longer names | ||
| # (e.g. "cufft" after "cufftw") | ||
| LIBNAMES_IN_SCOPE_OF_CUDA_PATHFINDER = ( | ||
| "nvJitLink", | ||
| "nvrtc", | ||
| "nvvm", | ||
| "cudart", | ||
| "nvfatbin", | ||
| "cublas", | ||
| "cublasLt", | ||
| "cufft", | ||
| "cublas", | ||
| "cufftw", | ||
| "cufft", | ||
| "curand", | ||
| "cusolver", | ||
| "cusolverMg", | ||
| "cusolver", | ||
| "cusparse", | ||
| "nppc", | ||
| "nppial", | ||
|
|
@@ -39,12 +40,25 @@ | |
| "nppitc", | ||
| "npps", | ||
| "nvblas", | ||
| "cufile", | ||
| "cufile_rdma", | ||
| "nvjpeg", | ||
| ) | ||
|
|
||
|
|
||
| def is_suppressed_dll(libname, dll): | ||
| if libname == "cudart": | ||
| if dll.startswith("cudart32_"): | ||
| return True | ||
| elif libname == "nvrtc": | ||
| if dll.endswith(".alt.dll"): | ||
| return True | ||
| if dll.startswith("nvrtc-builtins"): | ||
| return True | ||
|
Comment on lines
+54
to
+55
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For NVRTC wheel to work on Windows, this DLL is needed, e.g.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe I just forget what "suppressed DLLs" means... |
||
| elif libname == "nvvm": | ||
| if dll == "nvvm32.dll": | ||
| return True | ||
| return False | ||
|
|
||
|
|
||
| def run(args): | ||
| dlls_from_files = set() | ||
| for filename in args: | ||
|
|
@@ -69,15 +83,29 @@ def run(args): | |
| print("DLLs in scope of cuda.pathfinder") | ||
| print("================================") | ||
| dlls_in_scope = set() | ||
| for libname in sorted(LIBNAMES_IN_SCOPE_OF_CUDA_PATHFINDER): | ||
| print(f'"{libname}": (') | ||
| dlls_by_libname = collections.defaultdict(list) | ||
| suppressed_dlls = set() | ||
| for libname in LIBNAMES_IN_SCOPE_OF_CUDA_PATHFINDER: | ||
| for dll in sorted(dlls_from_files): | ||
| if dll.startswith(libname): | ||
| if dll not in dlls_in_scope and dll.startswith(libname): | ||
| if is_suppressed_dll(libname, dll): | ||
| suppressed_dlls.add(dll) | ||
| else: | ||
| dlls_by_libname[libname].append(dll) | ||
| dlls_in_scope.add(dll) | ||
| print(f' "{dll}",') | ||
| for libname, dlls in sorted(dlls_by_libname.items()): | ||
| print(f'"{libname}": (') | ||
| for dll in dlls: | ||
| print(f' "{dll}",') | ||
| print("),") | ||
| print() | ||
|
|
||
| print("Suppressed DLLs") | ||
| print("===============") | ||
| for dll in sorted(suppressed_dlls): | ||
| print(dll) | ||
| print() | ||
|
|
||
| print("DLLs out of scope") | ||
| print("=================") | ||
| for dll in sorted(dlls_from_files - dlls_in_scope): | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.