Add support for pathfinder.load_nvidia_dynamic_lib("cupti")#1693
Merged
rwgk merged 11 commits intoNVIDIA:mainfrom Mar 6, 2026
Merged
Add support for pathfinder.load_nvidia_dynamic_lib("cupti")#1693rwgk merged 11 commits intoNVIDIA:mainfrom
pathfinder.load_nvidia_dynamic_lib("cupti")#1693rwgk merged 11 commits intoNVIDIA:mainfrom
Conversation
This commit adds support for finding and loading CUPTI libraries on Linux through cuda.pathfinder. It implements support for all enumerated installation methods: - Site-packages: nvidia/cuda_cupti/lib (CUDA 12) and nvidia/cu13/lib (CUDA 13) - Conda: $CONDA_PREFIX/lib (colocated with other CUDA libraries) - CTK via CUDA_HOME: $CUDA_HOME/extras/CUPTI/lib64 - CTK via canary probe: system CTK root discovery (similar to nvvm) Changes: - Add 'cupti' to supported library names and SONAMEs - Add site-packages paths for CUDA 12 and 13 - Add cupti to CTK root canary discoverable libraries - Update find_nvidia_dynamic_lib to handle extras/CUPTI/lib64 path - Add logic to distinguish CTK (extras/CUPTI/lib64) vs conda (lib) paths - Update _find_so_using_lib_dir to support versioned libraries via glob - Add comprehensive mock tests covering all installation methods Fixes NVIDIA#1572 (Linux support) Made-with: Cursor
Contributor
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Collaborator
Author
|
/ok to test |
This comment has been minimized.
This comment has been minimized.
Resolved conflicts by: - Adding cupti to descriptor_catalog.py with proper configuration - Updating search_platform.py to handle versioned libraries via glob - Removing old find_nvidia_dynamic_lib.py (refactored into new structure) - Resolving supported_nvidia_libs.py conflicts (now derives from catalog) The cupti support is now integrated into the new descriptor-based architecture. Made-with: Cursor
Migrated test_load_nvidia_dynamic_lib_using_mocker.py from the old _FindNvidiaDynamicLib API to the new descriptor-based SearchContext API. Changes: - Replace _FindNvidiaDynamicLib imports with search_steps and load_nvidia_dynamic_lib modules - Update mocks to use run_find_steps, LOADER, and SearchContext - Use LIB_DESCRIPTORS to get cupti descriptor - Update all test functions to work with the new search step architecture Made-with: Cursor
These variables (_CTK_ROOT_CANARY_ANCHOR_LIBNAMES and _CTK_ROOT_CANARY_DISCOVERABLE_LIBNAMES) were added in the cupti PR but are not used in the new descriptor-based architecture. The new code uses desc.ctk_root_canary_anchor_libnames directly from descriptors. Made-with: Cursor
Collaborator
Author
|
/ok to test |
…cupti in /descriptor_catalog.py
Remove tests covered by real CI: - Site-packages tests (CUDA 12 and 13) - covered by real CI - CTK tests (CUDA_HOME and canary probe) - covered by real CI - Search order tests involving site-packages/CTK - covered by real CI Keep tests not covered by real CI: - Conda discovery test - Conda not covered by real CI - Error path test (not found) - error path not covered - Conda vs CTK search order test - Conda not covered by real CI Also remove unused imports and helper functions. Made-with: Cursor
Collaborator
Author
|
/ok to test |
libcupti.so.12 and libcupti.so.13pathfinder.load_nvidia_dynamic_lib("cupti")
Contributor
|
Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
cpcloud
reviewed
Mar 6, 2026
cuda_pathfinder/cuda/pathfinder/_dynamic_libs/search_platform.py
Outdated
Show resolved
Hide resolved
Collaborator
Author
|
We want your header PR in the release, too, so timing works for having the |
Collaborator
Author
|
/ok to test |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1572
Complete support for (Linux, Windows) x (site-packages, Conda, CTK)
The CTK and site-packages support is fully tested in the cuda-python CI (
all_must_work).The Conda support is based on inspecting local Conda installations: (Linux, Windows) x (CTK 12, CTK 13)
In the cuda-python CI, Conda support is tested via mocks only. Additional manual testing:
abs_pathfound in CI logs for https://github.com/NVIDIA/cuda-python/actions/runs/22734923321/