Skip to content

Conversation

@rwgk
Copy link
Collaborator

@rwgk rwgk commented Sep 9, 2025

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
Contributor

copy-pr-bot bot commented Sep 9, 2025

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 Sep 9, 2025

/ok to test

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

This comment has been minimized.

@rwgk
Copy link
Collaborator Author

rwgk commented Sep 9, 2025

/ok to test

Copy link
Member

@leofang leofang left a comment

Choose a reason for hiding this comment

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

quick pass

@rwgk rwgk marked this pull request as ready for review September 16, 2025 15:00
@copy-pr-bot
Copy link
Contributor

copy-pr-bot bot commented Sep 16, 2025

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.

@rwgk
Copy link
Collaborator Author

rwgk commented Sep 16, 2025

@leofang I just marked this PR as Ready for review, but there is a small docs-only glitch that I couldn't resolve even after spending a good 45 minutes or so.

I added this part:

https://github.com/rwgk/cuda-python/blob/306684d4c99ad6e00df28172b99fc0f361b4838d/cuda_pathfinder/cuda/pathfinder/_headers/supported_nvidia_headers.py#L37-L40

But Sphinx doesn't pick it up. I looked around for a few minutes to see if there is an existing similar constant with documentation, but didn't get lucky. Do you know how to get Sphinx to pick up documentation for constants?

@leofang
Copy link
Member

leofang commented Sep 16, 2025

Q:

  1. Don't we usually put docstrings after the variables, like this?
module_level_variable = 12345
"""int: Module level variable documented inline."""
  1. I am a bit nervous about documenting private APIs. Is it a must?

@rwgk
Copy link
Collaborator Author

rwgk commented Sep 16, 2025

  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
Copy link
Collaborator Author

rwgk commented Sep 16, 2025

/ok to test

@rwgk
Copy link
Collaborator Author

rwgk commented Sep 17, 2025

/ok to test

@rwgk
Copy link
Collaborator Author

rwgk commented Sep 17, 2025

Thanks for the reviews!

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

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

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

Labels

cuda.pathfinder Everything related to the cuda.pathfinder module feature New feature or request P0 High priority - Must do!

Projects

None yet

3 participants