From 4c6743d73788131f041b8c097047b353b934d449 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Thu, 28 Aug 2025 12:00:09 -0700 Subject: [PATCH 1/4] =?UTF-8?q?Reverse=20tabulated=20names=20to=20achieve?= =?UTF-8?q?=20new=20=E2=86=92=20old=20search=20order.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cuda_pathfinder/cuda/pathfinder/_dynamic_libs/load_dl_linux.py | 3 ++- .../cuda/pathfinder/_dynamic_libs/load_dl_windows.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cuda_pathfinder/cuda/pathfinder/_dynamic_libs/load_dl_linux.py b/cuda_pathfinder/cuda/pathfinder/_dynamic_libs/load_dl_linux.py index ef7f078c9a..a7de858b73 100644 --- a/cuda_pathfinder/cuda/pathfinder/_dynamic_libs/load_dl_linux.py +++ b/cuda_pathfinder/cuda/pathfinder/_dynamic_libs/load_dl_linux.py @@ -125,7 +125,8 @@ def abs_path_for_dynamic_library(libname: str, handle: ctypes.CDLL) -> str: def get_candidate_sonames(libname: str) -> list[str]: - candidate_sonames = list(SUPPORTED_LINUX_SONAMES.get(libname, ())) + # Reverse tabulated names to achieve new → old search order. + candidate_sonames = list(reversed(SUPPORTED_LINUX_SONAMES.get(libname, ()))) candidate_sonames.append(f"lib{libname}.so") return candidate_sonames diff --git a/cuda_pathfinder/cuda/pathfinder/_dynamic_libs/load_dl_windows.py b/cuda_pathfinder/cuda/pathfinder/_dynamic_libs/load_dl_windows.py index 1a4f32cf21..5da6d9b84a 100644 --- a/cuda_pathfinder/cuda/pathfinder/_dynamic_libs/load_dl_windows.py +++ b/cuda_pathfinder/cuda/pathfinder/_dynamic_libs/load_dl_windows.py @@ -123,7 +123,8 @@ def load_with_system_search(libname: str) -> Optional[LoadedDL]: Returns: A LoadedDL object if successful, None if the library cannot be loaded """ - for dll_name in SUPPORTED_WINDOWS_DLLS.get(libname, ()): + # Reverse tabulated names to achieve new → old search order. + for dll_name in reversed(SUPPORTED_WINDOWS_DLLS.get(libname, ())): handle = kernel32.LoadLibraryExW(dll_name, None, 0) if handle: abs_path = abs_path_for_dynamic_library(libname, handle) From b967a0a6968dcd35889367949d37495cd8a1df1d Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Thu, 28 Aug 2025 12:59:41 -0700 Subject: [PATCH 2/4] =?UTF-8?q?Add=20comments=20in=20supported=5Fnvidia=5F?= =?UTF-8?q?libs.py:=20Please=20keep=20in=20old=20=E2=86=92=20new=20sort=20?= =?UTF-8?q?order.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cuda/pathfinder/_dynamic_libs/supported_nvidia_libs.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cuda_pathfinder/cuda/pathfinder/_dynamic_libs/supported_nvidia_libs.py b/cuda_pathfinder/cuda/pathfinder/_dynamic_libs/supported_nvidia_libs.py index c2c0a4b3ab..655f598459 100644 --- a/cuda_pathfinder/cuda/pathfinder/_dynamic_libs/supported_nvidia_libs.py +++ b/cuda_pathfinder/cuda/pathfinder/_dynamic_libs/supported_nvidia_libs.py @@ -108,6 +108,7 @@ # cuda_12.9.1_575.57.08_linux.run # cuda_13.0.0_580.65.06_linux.run # Generated with toolshed/build_pathfinder_sonames.py +# Please keep in old → new sort order. SUPPORTED_LINUX_SONAMES_CTK = { "cublas": ( "libcublas.so.11", @@ -265,6 +266,7 @@ # cuda_12.9.1_576.57_windows.exe # cuda_13.0.0_windows.exe # Generated with toolshed/build_pathfinder_dlls.py +# Please keep in old → new sort order. SUPPORTED_WINDOWS_DLLS_CTK = { "cublas": ( "cublas64_11.dll", From 6a75f1da79dd948410325192b48d91678444f489 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Thu, 28 Aug 2025 13:09:42 -0700 Subject: [PATCH 3/4] Bump pathfinder version to 1.2.0a0 --- cuda_pathfinder/cuda/pathfinder/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cuda_pathfinder/cuda/pathfinder/_version.py b/cuda_pathfinder/cuda/pathfinder/_version.py index b64ff95501..09b44665ab 100644 --- a/cuda_pathfinder/cuda/pathfinder/_version.py +++ b/cuda_pathfinder/cuda/pathfinder/_version.py @@ -1,4 +1,4 @@ # SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -__version__ = "1.1.1a3" +__version__ = "1.2.0a0" From 450f0a7b126349a712cd1fadf8271080f85d0c7b Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Thu, 28 Aug 2025 13:09:59 -0700 Subject: [PATCH 4/4] Update cuda_pathfinder/docs/source/release/1.X.Y-notes.rst --- cuda_pathfinder/docs/source/release/1.X.Y-notes.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cuda_pathfinder/docs/source/release/1.X.Y-notes.rst b/cuda_pathfinder/docs/source/release/1.X.Y-notes.rst index 769e6f546e..e952a87e94 100644 --- a/cuda_pathfinder/docs/source/release/1.X.Y-notes.rst +++ b/cuda_pathfinder/docs/source/release/1.X.Y-notes.rst @@ -12,6 +12,14 @@ Released on TBD Highlights ---------- +* Reverse tabulated names to achieve new → old search order (`PR #921 `_) + + - ``SUPPORTED_LINUX_SONAMES`` and ``SUPPORTED_WINDOWS_DLLS`` lists of DSOs are searched from new → old + +* Support non-CTK Nvidia libraries (`PR #864 `_) + + - Adds support for non-CTK Nvidia libraries: ``mathdx``, ``cufftMp``, ``nvshmem_host``, ``nvpl_fftw`` + * ``RTLD_DI_LINKMAP``-based new implementation of ``abs_path_for_dynamic_library()`` (`PR #834 `_) - Eliminates ``supported_nvidia_libs.EXPECTED_LIB_SYMBOLS`` entirely, providing major simplification