Uh oh!
There was an error while loading. Please reload this page.
Initial version of cuda.pathfinder._find_nvidia_headers for nvshmem - #661
Conversation
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
commented
May 28, 2025
/ok to test |
This comment has been minimized.
This comment has been minimized.
ZzEeKkAa
commented
Jul 18, 2025
Just wondering what is the status for this PR? |
rwgk
commented
Jul 18, 2025
I still need to fix this up, after merging #723 a couple days ago. |
isVoid
commented
Jul 28, 2025
Is there some mechanism so that user can override the path returned by the api? Or that's largely a library duty to maintain? |
…more complete commands for setting up manual testing.
path_finderfind_nvidia_headers.py (Minimal Viable Product)find_nvidia_headers.py for nvshmem (Minimal Viable Product)rwgk
commented
Aug 12, 2025
/ok to test |
ZzEeKkAa
commented
Aug 12, 2025
Will it tolerate |
rwgk
commented
Aug 12, 2025
The code added in this PR ignores those completely. I've only tested these situations (copy-pasted from the current Offline @leofang wrote that getting headers in general is now the top priority (I just created #832 to track the work). That will bring in Coming back to |
b1ceca6 to
eb2e78aCompare…ind_nvidia_headers.py
c822c15 to
c90c393Comparerwgk
commented
Sep 4, 2025
/ok to test |
leofang
left a comment
There was a problem hiding this comment.
I have not reviewed tests, just the implementation.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| # Installed from a wheel | ||
| nvidia_sub_dirs = ("nvidia", "nvshmem", "include") | ||
| hdr_dir: str # help mypy | ||
| for hdr_dir in find_sub_dirs_all_sitepackages(nvidia_sub_dirs): |
There was a problem hiding this comment.
We should do it in a follow up, but I think we should really move towards using an importlib based resolution method instead of walking the sitepackages ourselves.
There was a problem hiding this comment.
I thought we discussed and agreed walking the paths is acceptable since on the PyPI side they are predictable? Any reason to prefer importlib?
There was a problem hiding this comment.
I thought we discussed and agreed walking the paths is acceptable since on the PyPI side they are predictable? Any reason to prefer importlib?
Lines crossed here. Let's review under #949 when we get to it.
There was a problem hiding this comment.
Oops, sorry, copy-paste mishap. Corrected (949).
Uh oh!
There was an error while loading. Please reload this page.
| "site-packages", # pip install | ||
| "dist-packages", # apt install |
There was a problem hiding this comment.
Do we need to do anything for conda packages here?
There was a problem hiding this comment.
This is gated by have_nvidia_nvshmem_package(). ... But I just realized, there is no nvshmem .deb that installs into dist-packages. So I removed dist-packages from here to not implicitly suggest that it exists: commit 2426260
While at it, I added additional test (low-hanging fruits): commit b74a84c
Interactive testing with conda and "all_must_work" set:
$ pytest -ra -s -vv tests/test_find_nvidia_headers.py
========================================================================= test session starts ==========================================================================
platform linux -- Python 3.12.11, pytest-8.4.1, pluggy-1.6.0 -- /home/rgrossekunst/miniforge3/envs/nvshmem/bin/python3.12
cachedir: .pytest_cache
rootdir: /home/rgrossekunst/forked/cuda-python/cuda_pathfinder
configfile: pyproject.toml
collected 2 items
tests/test_find_nvidia_headers.py::test_unknown_libname PASSED
tests/test_find_nvidia_headers.py::test_find_libname_nvshmem PASSED
============================================================================= INFO summary =============================================================================
INFO test_find_libname_nvshmem: hdr_dir='/home/rgrossekunst/miniforge3/envs/nvshmem/include'
========================================================================== 2 passed in 0.01s ===========================================================================
Without wheel or conda ("all_must_work" set):
$ pytest -ra -s -vv tests/test_find_nvidia_headers.py
========================================================================= test session starts ==========================================================================
platform linux -- Python 3.12.3, pytest-8.4.2, pluggy-1.6.0 -- /home/rgrossekunst/JunkVenv/bin/python3
cachedir: .pytest_cache
rootdir: /home/rgrossekunst/forked/cuda-python/cuda_pathfinder
configfile: pyproject.toml
collected 2 items
tests/test_find_nvidia_headers.py::test_unknown_libname PASSED
tests/test_find_nvidia_headers.py::test_find_libname_nvshmem PASSED
============================================================================= INFO summary =============================================================================
INFO test_find_libname_nvshmem: hdr_dir='/usr/include/nvshmem_13'
========================================================================== 2 passed in 0.02s ===========================================================================
I also did negative tests for both, by using bad expected paths, and they fail as expected.
… a .deb that installs into dist-packages does not exist.
rwgk
commented
Sep 5, 2025
/ok to test |
|
rwgk
commented
Sep 5, 2025
For easy pre-release testing, I uploaded this to TestPyPI: https://test.pypi.org/project/cuda-pathfinder/1.2.2.dev202509051239/ It's exactly the same as under this PR, except that I appended |
Description
Bump cuda-pathfinder version to TODO
Minimal viable product, currently not a public API (by way of using an underscore prefix:
_find_nvidia_headers).To support nvshmem4py.
Commit 673c38c was transferred from PR #864.