Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
fbdebfa
Move files WITHOUT trying to make anything work.
rwgk Jun 22, 2025
731256d
First pass changing imports from cuda.bindings → cuda.path_finder WIT…
rwgk Jun 22, 2025
6e0ec6c
Move README.md one level up.
rwgk Jun 22, 2025
07e1385
Move find_sub_dirs.py → ../_utils/find_sub_dirs.py
rwgk Jun 22, 2025
68aa8d5
Move files from cuda_bindings/tests to cuda_path_finder/tests WITHOUT…
rwgk Jun 22, 2025
fafa998
First VERY ROUGH version of pyproject.toml
rwgk Jun 22, 2025
4eff7d2
Change imports in tests/ WITHOUT trying to make anything work.
rwgk Jun 22, 2025
db0f540
Clean up pyproject.toml (with the help of ChatGPT) WITHOUT trying to …
rwgk Jun 22, 2025
9fea2e7
ruff automatic fix: Replace deprecated typing.Sequence with collectio…
rwgk Jun 22, 2025
c494ef2
Add `dynamic = ["version"]` in pyproject.toml and cuda/path_finder/__…
rwgk Jun 23, 2025
78b8c6d
Modernize `[project] license` line.
rwgk Jun 23, 2025
5690d96
Change dir/file names: path_finder → pathfinder
rwgk Jun 23, 2025
81b9bd9
Change imports: path_finder → pathfinder
rwgk Jun 23, 2025
b9be5cb
Fix up broken imports.
rwgk Jun 23, 2025
79a8019
add [project.optional-dependencies] test
rwgk Jun 23, 2025
975ba0b
Adopt cuda_core license.
rwgk Jun 25, 2025
3678fb4
cuda.pathfinder.nvidia_dynamic_libs.load_lib → cuda.pathfinder.load_n…
rwgk Jun 25, 2025
c25184e
Merge branch 'main' into move_path_finder_to_top
rwgk Jul 1, 2025
58b2513
Revert "cuda.pathfinder.nvidia_dynamic_libs.load_lib → cuda.pathfinde…
rwgk Jul 1, 2025
050f857
Simple name changes for consistency: library -> lib
rwgk Jul 1, 2025
1933869
Implement consensus API
rwgk Jul 1, 2025
50f4f8e
Use suggested version number 0.1.0
rwgk Jul 1, 2025
787236c
Fix oversight: `license =` line in pyproject.toml
rwgk Jul 1, 2025
5b5078b
Simplify `description =` line in pyproject.toml
rwgk Jul 1, 2025
13e08ae
Remove Maintenance Requirements from main README. Add the list of "Li…
rwgk Jul 1, 2025
97f9dc8
Adjust cuda_bindings/cuda/bindings/path_finder.py to changes in cuda_…
rwgk Jul 1, 2025
e18cf05
First guess at what changes are needed to include cuda_pathfinder in …
rwgk Jul 1, 2025
b015bbe
Merge branch 'main' into move_path_finder_to_top
rwgk Jul 2, 2025
36491c8
git mv nvidia_dynamic_libs.py __init__.py
rwgk Jul 2, 2025
c6187db
Do not use `cibuildwheel` for a `noarch` package (`cuda-pathfinder`).…
rwgk Jul 2, 2025
346e8b9
twine cleanup
rwgk Jul 2, 2025
9207966
Hard-wire cuda-pathfinder artifact name and path for simplicity, simi…
rwgk Jul 2, 2025
3682f7d
Change to __version__ = "1.0.0"
rwgk Jul 2, 2025
7742c5c
Import __version__ in cuda/pathfinder/__init__.py
rwgk Jul 2, 2025
92c8441
Add missing line in step `name: List the cuda.pathfinder artifacts di…
rwgk Jul 2, 2025
a5b7190
`Install cuda.pathfinder` before ` Build cuda.bindings Cython tests`
rwgk Jul 2, 2025
db0ea56
Add missing line in step `name: Check cuda.pathfinder wheel`
rwgk Jul 3, 2025
9a9f1d7
fix build workflow
leofang Jul 3, 2025
aac1cf7
Merge branch 'main' into move_path_finder_to_top
rwgk Jul 3, 2025
989db08
Remove `__all__` in cuda/pathfinder/__init__.py
rwgk Jul 3, 2025
222df6c
Fix `Check if the script was called with exactly 1 argument` implemen…
rwgk Jul 3, 2025
0b8af00
Add pathfinder install & test into ci/tools/run-tests
rwgk Jul 3, 2025
f902dc9
Add Download cuda-pathfinder, Run cuda.pathfinder tests in test-whee…
rwgk Jul 3, 2025
481f8de
Download cuda-pathfinder-wheel into `./cuda_pathfinder` (not `.`)
rwgk Jul 3, 2025
fd18e1e
Run cuda.pathfinder tests only after cuda.bindings tests, so that all…
rwgk Jul 3, 2025
796bd46
Drive-by fix: test_find_or_load → test_load
rwgk Jul 3, 2025
06763af
Introduce CUDA_PATHFINDER_TEST_LOAD_NVIDIA_DYNAMIC_LIB_STRICTNESS env…
rwgk Jul 3, 2025
b2135cf
CUDA_PATHFINDER_TEST_LOAD_NVIDIA_DYNAMIC_LIB_STRICTNESS=supported_mus…
rwgk Jul 3, 2025
bf48142
Add cuda-pathfinder in .github/workflows/build-docs.yml
rwgk Jul 3, 2025
135a37d
Remove 32-bit DLLs from SUPPORTED_WINDOWS_DLLS
rwgk Jul 5, 2025
48c6d63
Add guard: RuntimeError: cuda.pathfinder.load_nvidia_dynamic_lib() r…
rwgk Jul 5, 2025
7ab201a
is_suppressed_dll_file(): return path_basename.startswith(("cudart32_…
rwgk Jul 5, 2025
9f3e9a4
Add nvidia_wheels_cu12 to [project.optional-dependencies] in cuda_pat…
rwgk Jul 5, 2025
00c8b6a
Install cuda.pathfinder nvidia_wheels_cu12 and run-tests pathfinder a…
rwgk Jul 5, 2025
034286a
ci/tools/run-tests: use bash `-v` instead of `-z` to test if CUDA_PAT…
rwgk Jul 6, 2025
aaed5f2
Add missing `shell: bash` line in test-wheel-windows.yml
rwgk Jul 6, 2025
9d8c70c
test_load_nvidia_dynamic_lib: increase timeout to 120 seconds for Win…
rwgk Jul 6, 2025
8440f90
Add test_load_nvidia_dynamic_lib::test_runtime_error_on_non_64bit_python
rwgk Jul 6, 2025
98ae874
Add DynamicLibNotFound exception type in load_dl_common.py and simpli…
rwgk Jul 6, 2025
9686c2f
Run cuda.pathfinder tests with see_what_works before running any othe…
rwgk Jul 6, 2025
f3c0006
Use `if: startsWith(matrix.CUDA_VER, 12.)` to guard pathfinder tests …
rwgk Jul 6, 2025
8f015d2
Get rid of "partially supported" concept.
rwgk Jul 6, 2025
9f17cd1
Consistently use `IS_WINDOWS` (instead of `sys.platform == "win32"`).
rwgk Jul 6, 2025
db7933a
Rename toolshed/build_pathfinder*.py scripts (no functional changes).
rwgk Jul 6, 2025
1b9a929
Rename toolshed/run_cuda_pathfinder.py
rwgk Jul 6, 2025
b69bf23
Make output of toolshed/build_pathfinder_dlls.py usable as-is.
rwgk Jul 6, 2025
80ebbda
Add DynamicLibNotFound to cuda/pathfinder/__init__.py
rwgk Jul 7, 2025
1c8d315
Merge branch 'move_path_finder_to_top' of https://github.com/rwgk/cud…
rwgk Jul 7, 2025
52e1369
Fix accident in previous commit (DynamicLibNotFound)
rwgk Jul 7, 2025
70d1c14
Update README.md
rwgk Jul 7, 2025
342ca49
mypy cleanup
rwgk Jul 7, 2025
4e0033c
Run mypy from pre-commit
rwgk Jul 7, 2025
74ef126
Use SHA for mypy version in .pre-commit-config.yaml (generated with `…
rwgk Jul 7, 2025
5e85328
cuda_bindings/pyproject.toml: constrain "cuda-pathfinder ~= 1.0"
rwgk Jul 7, 2025
46fd972
Make LoadedDL.handle an unsigned integer also for Windows. (cuda_path…
rwgk Jul 9, 2025
428a2dc
Rename LoadedDL.handle → LoadedDL._handle_uint
rwgk Jul 9, 2025
4096885
Move `_handle_uint` last in `LoadedDL`, to emphasize that this is pri…
rwgk Jul 9, 2025
5e6c7e5
Implement TEMPORARY BACKWARD COMPATIBILITY in /cuda/bindings/path_fin…
rwgk Jul 9, 2025
d787a4c
Fix oversight discovered via local Windows testing.
rwgk Jul 9, 2025
60918d5
Merge branch 'main' into move_path_finder_to_top
rwgk Jul 9, 2025
933a889
Merge branch 'main' into move_path_finder_to_top
rwgk Jul 11, 2025
c0509be
Put the changes from https://github.com/NVIDIA/cuda-python/pull/751 o…
rwgk Jul 11, 2025
eedf658
Add `cuda-pathfinder` to `options` in .github/workflows/release.yml
rwgk Jul 11, 2025
58ca181
Move temporary backward compatibility code to _path_finder/temporary_…
rwgk Jul 12, 2025
b73f421
Consolidate mypy configuration into pyproject.toml
rwgk Jul 14, 2025
88c4ebc
Change "slated" to "deprecated and slated ... in the next ... major v…
rwgk Jul 14, 2025
ee19b0c
Remove mention of LoadedDL handle in README.md (it was an oversight t…
rwgk Jul 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 40 additions & 12 deletions toolshed/build_pathfinder_dlls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The 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:
Expand All @@ -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):
Expand Down
3 changes: 1 addition & 2 deletions toolshed/build_pathfinder_sonames.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
# Input for this script:
# output of toolshed/find_sonames.sh

# The output of this script
# is expected to be usable as-is.
# The output of this script is expected to be usable as-is.

import sys

Expand Down
Loading