Skip to content

Add Linux support for loading libcupti.so.12 and libcupti.so.13#1693

Draft
rwgk wants to merge 1 commit intoNVIDIA:mainfrom
rwgk:pathfinder_cupti
Draft

Add Linux support for loading libcupti.so.12 and libcupti.so.13#1693
rwgk wants to merge 1 commit intoNVIDIA:mainfrom
rwgk:pathfinder_cupti

Conversation

@rwgk
Copy link
Collaborator

@rwgk rwgk commented Feb 26, 2026

WIP — Feel free to look around but don't review yet. The code came straight out of Cursor (Composer 1), based on just one very high-level prompt, and I have not reviewed it myself yet.

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
@copy-pr-bot
Copy link
Contributor

copy-pr-bot bot commented Feb 26, 2026

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.

@rwgk
Copy link
Collaborator Author

rwgk commented Feb 26, 2026

/ok to test

@github-actions
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant