From 42293bc86139c0e6672c94c4bef25ffb0225953f Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 24 Mar 2026 13:32:04 -0700 Subject: [PATCH 1/7] Add nvidia-libmathdx-cu13 in cuda_pathfinder/pyproject.toml --- cuda_pathfinder/pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/cuda_pathfinder/pyproject.toml b/cuda_pathfinder/pyproject.toml index 872d30eb4d..1977ef8587 100644 --- a/cuda_pathfinder/pyproject.toml +++ b/cuda_pathfinder/pyproject.toml @@ -38,6 +38,7 @@ cu13 = [ "nvidia-cudss-cu13", "nvidia-cufftmp-cu13; sys_platform != 'win32'", "nvidia-cusparselt-cu13", + "nvidia-libmathdx-cu13", "nvidia-nccl-cu13; sys_platform != 'win32'", "nvidia-nvshmem-cu13; sys_platform != 'win32'", ] From 16427f8c3c1cba85e897a9f5bf648f951a0a3ba6 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 24 Mar 2026 13:42:04 -0700 Subject: [PATCH 2/7] Remove cufftMp, mathdx from _is_expected_load_nvidia_dynamic_lib_failure cufftMp should have been removed in PR #1315 (cuda-bindings v13.1.0 release), but this was overlooked. --- cuda_pathfinder/tests/test_load_nvidia_dynamic_lib.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cuda_pathfinder/tests/test_load_nvidia_dynamic_lib.py b/cuda_pathfinder/tests/test_load_nvidia_dynamic_lib.py index 016acfd25d..50c30ec1c6 100644 --- a/cuda_pathfinder/tests/test_load_nvidia_dynamic_lib.py +++ b/cuda_pathfinder/tests/test_load_nvidia_dynamic_lib.py @@ -89,10 +89,7 @@ def test_known_but_platform_unavailable_libname_raises_dynamic_lib_not_available load_nvidia_dynamic_lib("known_but_unavailable") -IMPORTLIB_METADATA_DISTRIBUTIONS_NAMES = { - "cufftMp": r"^nvidia-cufftmp-.*$", - "mathdx": r"^nvidia-libmathdx-.*$", -} +IMPORTLIB_METADATA_DISTRIBUTIONS_NAMES = {} def _is_expected_load_nvidia_dynamic_lib_failure(libname): From 8a1dffea12bb1f88f824de206eb9f5b0c885343a Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 24 Mar 2026 14:06:46 -0700 Subject: [PATCH 3/7] Add HeaderDescriptorSpec for mathdx --- .../cuda/pathfinder/_headers/header_descriptor_catalog.py | 8 ++++++++ cuda_pathfinder/tests/test_find_nvidia_headers.py | 1 + 2 files changed, 9 insertions(+) diff --git a/cuda_pathfinder/cuda/pathfinder/_headers/header_descriptor_catalog.py b/cuda_pathfinder/cuda/pathfinder/_headers/header_descriptor_catalog.py index a46830e4ed..bb91a58cc7 100644 --- a/cuda_pathfinder/cuda/pathfinder/_headers/header_descriptor_catalog.py +++ b/cuda_pathfinder/cuda/pathfinder/_headers/header_descriptor_catalog.py @@ -153,6 +153,14 @@ class HeaderDescriptorSpec: conda_targets_layout=False, use_ctk_root_canary=False, ), + HeaderDescriptorSpec( + name="mathdx", + packaged_with="other", + header_basename="libmathdx.h", + site_packages_dirs=("nvidia/cu13/include", "nvidia/cu12/include"), + conda_targets_layout=False, + use_ctk_root_canary=False, + ), HeaderDescriptorSpec( name="nvshmem", packaged_with="other", diff --git a/cuda_pathfinder/tests/test_find_nvidia_headers.py b/cuda_pathfinder/tests/test_find_nvidia_headers.py index a47a235b2d..5ed098c9b0 100644 --- a/cuda_pathfinder/tests/test_find_nvidia_headers.py +++ b/cuda_pathfinder/tests/test_find_nvidia_headers.py @@ -42,6 +42,7 @@ NON_CTK_IMPORTLIB_METADATA_DISTRIBUTIONS_NAMES = { "cusparseLt": r"^nvidia-cusparselt-.*$", "cutensor": r"^cutensor-.*$", + "mathdx": r"^nvidia-libmathdx-.*$", "nvshmem": r"^nvidia-nvshmem-.*$", } From f40304d4eed2a2ad6cb6b837e48389685103ba6d Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 24 Mar 2026 14:38:04 -0700 Subject: [PATCH 4/7] Add HeaderDescriptorSpec entries for cute, cutlass --- .../_headers/header_descriptor_catalog.py | 16 ++++++++++++++++ cuda_pathfinder/pyproject.toml | 1 + .../tests/test_find_nvidia_headers.py | 2 ++ 3 files changed, 19 insertions(+) diff --git a/cuda_pathfinder/cuda/pathfinder/_headers/header_descriptor_catalog.py b/cuda_pathfinder/cuda/pathfinder/_headers/header_descriptor_catalog.py index bb91a58cc7..df1e52eb0f 100644 --- a/cuda_pathfinder/cuda/pathfinder/_headers/header_descriptor_catalog.py +++ b/cuda_pathfinder/cuda/pathfinder/_headers/header_descriptor_catalog.py @@ -145,6 +145,14 @@ class HeaderDescriptorSpec: conda_targets_layout=False, use_ctk_root_canary=False, ), + HeaderDescriptorSpec( + name="cute", + packaged_with="other", + header_basename="cute/tensor.hpp", + site_packages_dirs=("cutlass_library/source/include",), + conda_targets_layout=False, + use_ctk_root_canary=False, + ), HeaderDescriptorSpec( name="cutensor", packaged_with="other", @@ -153,6 +161,14 @@ class HeaderDescriptorSpec: conda_targets_layout=False, use_ctk_root_canary=False, ), + HeaderDescriptorSpec( + name="cutlass", + packaged_with="other", + header_basename="cutlass/cutlass.h", + site_packages_dirs=("cutlass_library/source/include",), + conda_targets_layout=False, + use_ctk_root_canary=False, + ), HeaderDescriptorSpec( name="mathdx", packaged_with="other", diff --git a/cuda_pathfinder/pyproject.toml b/cuda_pathfinder/pyproject.toml index 1977ef8587..2ccc253ac8 100644 --- a/cuda_pathfinder/pyproject.toml +++ b/cuda_pathfinder/pyproject.toml @@ -43,6 +43,7 @@ cu13 = [ "nvidia-nvshmem-cu13; sys_platform != 'win32'", ] host = [ + "nvidia-cutlass", "nvpl-fft; platform_system == 'Linux' and platform_machine == 'aarch64'", ] diff --git a/cuda_pathfinder/tests/test_find_nvidia_headers.py b/cuda_pathfinder/tests/test_find_nvidia_headers.py index 5ed098c9b0..a7b95e167b 100644 --- a/cuda_pathfinder/tests/test_find_nvidia_headers.py +++ b/cuda_pathfinder/tests/test_find_nvidia_headers.py @@ -41,7 +41,9 @@ NON_CTK_IMPORTLIB_METADATA_DISTRIBUTIONS_NAMES = { "cusparseLt": r"^nvidia-cusparselt-.*$", + "cute": r"^nvidia-cutlass$", "cutensor": r"^cutensor-.*$", + "cutlass": r"^nvidia-cutlass$", "mathdx": r"^nvidia-libmathdx-.*$", "nvshmem": r"^nvidia-nvshmem-.*$", } From d437399fa1ba16ba25e8ed9da3f3481bad19b4d8 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 24 Mar 2026 22:20:37 -0700 Subject: [PATCH 5/7] Restore mathdx in IMPORTLIB_METADATA_DISTRIBUTIONS_NAMES The cu13 Windows CI jobs do not run `pip install --group test-cu13`, so nvidia-libmathdx is not installed when the all_must_work pathfinder test run executes. Without the distribution-presence check the test fails unconditionally. Restore the entry so the test treats a missing mathdx wheel as an expected failure under all_must_work strictness. Made-with: Cursor --- cuda_pathfinder/tests/test_load_nvidia_dynamic_lib.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cuda_pathfinder/tests/test_load_nvidia_dynamic_lib.py b/cuda_pathfinder/tests/test_load_nvidia_dynamic_lib.py index 50c30ec1c6..36487bd58e 100644 --- a/cuda_pathfinder/tests/test_load_nvidia_dynamic_lib.py +++ b/cuda_pathfinder/tests/test_load_nvidia_dynamic_lib.py @@ -89,7 +89,9 @@ def test_known_but_platform_unavailable_libname_raises_dynamic_lib_not_available load_nvidia_dynamic_lib("known_but_unavailable") -IMPORTLIB_METADATA_DISTRIBUTIONS_NAMES = {} +IMPORTLIB_METADATA_DISTRIBUTIONS_NAMES = { + "mathdx": r"^nvidia-libmathdx-.*$", +} def _is_expected_load_nvidia_dynamic_lib_failure(libname): From bc67561162c71c02f4dc55f0cecccf0d2e729bfb Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 24 Mar 2026 22:20:47 -0700 Subject: [PATCH 6/7] Skip all_must_work pathfinder tests for free-threaded Python on Windows (#1820) The nvidia-cutlass wheel contains paths that exceed the 260-char Windows MAX_PATH limit when installed under the longer x64-freethreaded site-packages prefix. Skip the pip --group install and the all_must_work test run for free-threaded builds until the CI runners enable LongPathsEnabled. Made-with: Cursor --- .github/workflows/test-wheel-windows.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test-wheel-windows.yml b/.github/workflows/test-wheel-windows.yml index 478826c525..9022be4def 100644 --- a/.github/workflows/test-wheel-windows.yml +++ b/.github/workflows/test-wheel-windows.yml @@ -263,6 +263,7 @@ jobs: } - name: Install cuda.pathfinder extra wheels for testing + if: ${{ !endsWith(matrix.PY_VER, 't') }} # see issue #1820 shell: bash --noprofile --norc -xeuo pipefail {0} run: | pushd cuda_pathfinder @@ -271,6 +272,7 @@ jobs: popd - name: Run cuda.pathfinder tests with all_must_work + if: ${{ !endsWith(matrix.PY_VER, 't') }} # see issue #1820 env: CUDA_PATHFINDER_TEST_LOAD_NVIDIA_DYNAMIC_LIB_STRICTNESS: all_must_work CUDA_PATHFINDER_TEST_FIND_NVIDIA_HEADERS_STRICTNESS: all_must_work From dd44cff56cb091f146be6437ec5668a28d6c70e1 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Wed, 25 Mar 2026 07:57:05 -0700 Subject: [PATCH 7/7] Fix mathdx site_packages_windows path for cu13 The nvidia-libmathdx-cu13 wheel installs mathdx64_0.dll under nvidia/cu13/bin, not nvidia/cu13/bin/x86_64. The x86_64 subdirectory is used by cuda-toolkit CTK packages, but nvidia-libmathdx is packaged separately and follows the flat layout (matching nvidia-cudss and the cu12 mathdx wheel). Made-with: Cursor --- .../cuda/pathfinder/_dynamic_libs/descriptor_catalog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cuda_pathfinder/cuda/pathfinder/_dynamic_libs/descriptor_catalog.py b/cuda_pathfinder/cuda/pathfinder/_dynamic_libs/descriptor_catalog.py index 69bb223a3d..e514b2e088 100644 --- a/cuda_pathfinder/cuda/pathfinder/_dynamic_libs/descriptor_catalog.py +++ b/cuda_pathfinder/cuda/pathfinder/_dynamic_libs/descriptor_catalog.py @@ -314,7 +314,7 @@ class DescriptorSpec: linux_sonames=("libmathdx.so.0",), windows_dlls=("mathdx64_0.dll",), site_packages_linux=("nvidia/cu13/lib", "nvidia/cu12/lib"), - site_packages_windows=("nvidia/cu13/bin/x86_64", "nvidia/cu12/bin"), + site_packages_windows=("nvidia/cu13/bin", "nvidia/cu12/bin"), dependencies=("nvrtc",), ), DescriptorSpec(