Skip to content

Fix accident in cuda_bindings/cuda/bindings/_path_finder/supported_libs.py #655

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

Merged
merged 2 commits into from
May 27, 2025
Merged
Changes from all commits
Commits
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
2 changes: 0 additions & 2 deletions cuda_bindings/cuda/bindings/_path_finder/supported_libs.py
Original file line number Diff line number Diff line change
@@ -256,8 +256,6 @@
"cufft": (
"cufft64_10.dll",
"cufft64_11.dll",
"cufftw64_10.dll",
"cufftw64_11.dll",
),
"cufftw": (
"cufftw64_10.dll",
12 changes: 12 additions & 0 deletions cuda_bindings/tests/test_path_finder_load.py
Original file line number Diff line number Diff line change
@@ -30,6 +30,18 @@ def test_all_libnames_windows_dlls_consistency():
assert tuple(sorted(ALL_LIBNAMES_WINDOWS)) == tuple(sorted(supported_libs.SUPPORTED_WINDOWS_DLLS.keys()))


@pytest.mark.parametrize("dict_name", ["SUPPORTED_LINUX_SONAMES", "SUPPORTED_WINDOWS_DLLS"])
def test_libname_dict_values_are_unique(dict_name):
libname_dict = getattr(supported_libs, dict_name)
libname_for_value = {}
for libname, values in libname_dict.items():
for value in values:
prev_libname = libname_for_value.get(value)
if prev_libname is not None:
raise RuntimeError(f"Multiple libnames for {value!r}: {prev_libname}, {libname}")
libname_for_value[value] = libname


def test_all_libnames_libnames_requiring_os_add_dll_directory_consistency():
assert not (set(supported_libs.LIBNAMES_REQUIRING_OS_ADD_DLL_DIRECTORY) - set(ALL_LIBNAMES_WINDOWS))

Loading
Oops, something went wrong.