-
Notifications
You must be signed in to change notification settings - Fork 223
cuda.pathfinder._find_nvidia_header_directory(): add support for CTK libs
#956
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 13 commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
c4955e4
New supported_nvidia_headers.py, starting with just SUPPORTED_HEADERS…
rwgk d3b1a98
Add _find_ctk_header_directory(), currently for site-packages only.
rwgk 12beef6
Factor out get_cuda_home_or_path() into new cuda/pathfinder/_utils/en…
rwgk a37d132
Add CUDA_HOME code in find_nvidia_headers.py
rwgk 2a397b6
Formalize supported_nvidia_headers.CCCL_LIBNAMES
rwgk e0a22fa
Add CONDA_PREFIX code in find_nvidia_headers.py
rwgk 160d8a4
Add `shutil.which("nvcc")` code in find_nvidia_headers.py
rwgk 946721f
Cleanup: add _joined_isfile() helper
rwgk 656a30d
find_nvidia_header_directory(): return _abs_norm()
rwgk fb362ae
Merge branch 'main' into supported_nvidia_headers
rwgk 0d4e5a8
Bump pathfinder version to 1.2.3a0
rwgk 0629da2
Replace libcudacxx,cub,thrust with cccl. Add cuda-toolkit[cccl] to nv…
rwgk c7cabd8
SUPPORTED_HEADERS_CTK_LINUX_ONLY etc. (for cufile)
rwgk 6d51ffb
Merge branch 'main' into supported_nvidia_headers
rwgk 72db46d
Insert _find_based_on_conda_layout()
rwgk 601449e
Merge branch 'main' into supported_nvidia_headers
rwgk 6234000
Remove `shutil.which("nvcc")` code (it finds all includes on Windows …
rwgk 4d4ff77
Remove cccl code
rwgk 03bdbad
conda windows support
rwgk 8cefd27
Merge branch 'main' into supported_nvidia_headers
rwgk 0c5f6c2
Replace cusolver_common.h → cusolverDn.h
rwgk 1876f16
UserWarning: Both CUDA_HOME and CUDA_PATH are set but differ
rwgk 826398d
Remove `cccl` again in pyproject.toml
rwgk 607e9ef
Merge branch 'main' into supported_nvidia_headers
rwgk c023a01
Revert "Remove `cccl` again in pyproject.toml"
rwgk 476da62
Revert "Remove cccl code"
rwgk d42465e
Remove `cuda-cccl` include path in SUPPORTED_SITE_PACKAGE_HEADER_DIRS…
rwgk 17221d6
Apply reviewer suggestion:
rwgk aea31bb
Add find_nvidia_header_directory docstring.
rwgk 5774471
Add _SUPPORTED_HEADERS_CTK to public API
rwgk 306684d
Add cuda_pathfinder 1.2.3 Release notes
rwgk eee4929
Merge branch 'main' into supported_nvidia_headers
rwgk 9f55b7e
Merge branch 'main' into supported_nvidia_headers
rwgk caf4e52
Remove leading underscores: _SUPPORTED_HEADERS_CTK, _find_nvidia_head…
rwgk 3faea76
docstring in __init__.py, using `#: ` Sphinx-specific markup
rwgk 5e1146c
Bump pathfinder version to 1.2.3 (for release) and change release dat…
rwgk f31f93a
Merge branch 'main' into supported_nvidia_headers
rwgk 59de489
Make comment less ambiguous.
rwgk 410d866
Remove subtitle as suggested by reviewer.
rwgk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
58 changes: 58 additions & 0 deletions
58
cuda_pathfinder/cuda/pathfinder/_headers/supported_nvidia_headers.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| import sys | ||
|
|
||
| IS_WINDOWS = sys.platform == "win32" | ||
|
|
||
| SUPPORTED_HEADERS_CTK_COMMON = { | ||
| "cccl": "cuda/std/version", | ||
| "cublas": "cublas.h", | ||
| "cudart": "cuda_runtime.h", | ||
| "cufft": "cufft.h", | ||
| "curand": "curand.h", | ||
| "cusolver": "cusolver_common.h", | ||
rwgk marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "cusparse": "cusparse.h", | ||
| "npp": "npp.h", | ||
| "nvcc": "fatbinary_section.h", | ||
| "nvfatbin": "nvFatbin.h", | ||
| "nvjitlink": "nvJitLink.h", | ||
| "nvjpeg": "nvjpeg.h", | ||
| "nvrtc": "nvrtc.h", | ||
| "nvvm": "nvvm.h", | ||
| } | ||
|
|
||
| SUPPORTED_HEADERS_CTK_LINUX_ONLY = { | ||
| "cufile": "cufile.h", | ||
| } | ||
| SUPPORTED_HEADERS_CTK_LINUX = SUPPORTED_HEADERS_CTK_COMMON | SUPPORTED_HEADERS_CTK_LINUX_ONLY | ||
|
|
||
| SUPPORTED_HEADERS_CTK_WINDOWS_ONLY: dict[str, str] = {} | ||
| SUPPORTED_HEADERS_CTK_WINDOWS = SUPPORTED_HEADERS_CTK_COMMON | SUPPORTED_HEADERS_CTK_WINDOWS_ONLY | ||
|
|
||
| SUPPORTED_HEADERS_CTK_ALL = ( | ||
| SUPPORTED_HEADERS_CTK_COMMON | SUPPORTED_HEADERS_CTK_LINUX_ONLY | SUPPORTED_HEADERS_CTK_WINDOWS_ONLY | ||
| ) | ||
| SUPPORTED_HEADERS_CTK = SUPPORTED_HEADERS_CTK_WINDOWS if IS_WINDOWS else SUPPORTED_HEADERS_CTK_LINUX | ||
|
|
||
| SUPPORTED_SITE_PACKAGE_HEADER_DIRS_CTK = { | ||
| "cccl": ( | ||
| "cuda/cccl/headers/include", # cuda-cccl | ||
rwgk marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "nvidia/cu13/include/cccl", # cuda-toolkit[cccl]==13.* | ||
| "nvidia/cuda_cccl/include", # cuda-toolkit[cccl]==12.* | ||
| ), | ||
| "cublas": ("nvidia/cu13/include", "nvidia/cublas/include"), | ||
| "cudart": ("nvidia/cu13/include", "nvidia/cuda_runtime/include"), | ||
| "cufft": ("nvidia/cu13/include", "nvidia/cufft/include"), | ||
| "cufile": ("nvidia/cu13/include", "nvidia/cufile/include"), | ||
| "curand": ("nvidia/cu13/include", "nvidia/curand/include"), | ||
| "cusolver": ("nvidia/cu13/include", "nvidia/cusolver/include"), | ||
| "cusparse": ("nvidia/cu13/include", "nvidia/cusparse/include"), | ||
| "npp": ("nvidia/cu13/include", "nvidia/npp/include"), | ||
| "nvcc": ("nvidia/cu13/include", "nvidia/cuda_nvcc/include"), | ||
| "nvfatbin": ("nvidia/cu13/include", "nvidia/nvfatbin/include"), | ||
| "nvjitlink": ("nvidia/cu13/include", "nvidia/nvjitlink/include"), | ||
| "nvjpeg": ("nvidia/cu13/include", "nvidia/nvjpeg/include"), | ||
| "nvrtc": ("nvidia/cu13/include", "nvidia/cuda_nvrtc/include"), | ||
| "nvvm": ("nvidia/cu13/include", "nvidia/cuda_nvcc/nvvm/include"), | ||
| } | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| import os | ||
| from typing import Optional | ||
|
|
||
|
|
||
| def get_cuda_home_or_path() -> Optional[str]: | ||
| cuda_home = os.environ.get("CUDA_HOME") | ||
| if cuda_home is None: | ||
| cuda_home = os.environ.get("CUDA_PATH") | ||
| return cuda_home | ||
rwgk marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| __version__ = "1.2.2" | ||
| __version__ = "1.2.3a0" |
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.