Skip to content

cuda.pathfinder._find_nvidia_header_directory(): add support for CTK libs - #956

Merged
rwgk merged 39 commits into
NVIDIA:mainfrom
rwgk:supported_nvidia_headers
Sep 17, 2025
Merged

cuda.pathfinder._find_nvidia_header_directory(): add support for CTK libs#956
rwgk merged 39 commits into
NVIDIA:mainfrom
rwgk:supported_nvidia_headers

Conversation

@rwgk

@rwgkrwgk commented Sep 9, 2025

Copy link
Copy Markdown
Contributor

Closes#832, #954

Make the cuda.pathfinder._find_nvidia_header_directory API public (by removing the leading underscore) and extend the function to also support CTK library headers.

See new find_nvidia_header_directory() docstring for details:

https://nvidia.github.io/cuda-python/cuda-pathfinder/1.2.3/generated/cuda.pathfinder.find_nvidia_header_directory.html

@copy-pr-bot

Copy link
Copy Markdown
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.

@rwgk

rwgk commented Sep 9, 2025

Copy link
Copy Markdown
ContributorAuthor

/ok to test

@leofangleofang added P0 High priority - Must do! feature New feature or request cuda.pathfinder Everything related to the cuda.pathfinder module labels Sep 9, 2025
@leofangleofang added this to the cuda-pathfinder parking lot milestone Sep 9, 2025
@github-actions

This comment has been minimized.

@rwgk

rwgk commented Sep 9, 2025

Copy link
Copy Markdown
ContributorAuthor

/ok to test

@leofangleofang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quick pass

Comment threadcuda_pathfinder/cuda/pathfinder/_utils/env_vars.py Outdated
Comment threadcuda_pathfinder/cuda/pathfinder/_headers/find_nvidia_headers.py Outdated
Comment threadcuda_pathfinder/cuda/pathfinder/_headers/supported_nvidia_headers.py Outdated
Comment threadcuda_pathfinder/cuda/pathfinder/_headers/supported_nvidia_headers.py Outdated
@rwgk

rwgk commented Sep 16, 2025

Copy link
Copy Markdown
ContributorAuthor
  1. Don't we usually put docstrings after the variables, like this?

Wrt commit 3faea76:

The triple-quoted docstring worked for Sphinx, but tripped up the check-docstring-first pre-commit check.

The #: markup works for Sphinx and keeps the pre-commit check happy.

I tried various ways to have the docstring in cuda/pathfinder/_headers/supported_nvidia_headers.py instead of __init__.py, but after spending 45 + 30 minutes unsuccessfully, I decided to give up and go with this solution. The generated HTML (local testing) looks good to me.

@rwgk

rwgk commented Sep 16, 2025

Copy link
Copy Markdown
ContributorAuthor

/ok to test

Comment threadcuda_pathfinder/cuda/pathfinder/__init__.py Outdated
Comment threadcuda_pathfinder/docs/source/api.rst Outdated
@rwgk

rwgk commented Sep 17, 2025

Copy link
Copy Markdown
ContributorAuthor

/ok to test

@rwgk

rwgk commented Sep 17, 2025

Copy link
Copy Markdown
ContributorAuthor

Thanks for the reviews!

@rwgk
rwgk merged commit d97a2cc into NVIDIA:mainSep 17, 2025
94 of 95 checks passed
@rwgk
rwgk deleted the supported_nvidia_headers branch September 17, 2025 06:50
@github-actions

Copy link
Copy Markdown
Doc Preview CI
Preview removed because the pull request was closed or merged.

@leofangleofang linked an issue Sep 26, 2025 that may be closed by this pull request
rwgk added a commit to rwgk/cuda-python that referenced this pull request Sep 29, 2025
jcfr added a commit to jcfr/cuda-python that referenced this pull request Mar 2, 2026
When `CUDA_PATH`/`CUDA_HOME` are unset, fall back to `/usr/local/cuda`
on non-Windows platforms. Aligns with CuPy's `get_cuda_path()` behavior
and fixes CuPy header detection in containers (e.g. Holoscan).
Ref: PR NVIDIA#956
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda.pathfinderEverything related to the cuda.pathfinder modulefeatureNew feature or requestP0High priority - Must do!

Projects

None yet

3 participants

@rwgk@leofang@rparolin