-
Notifications
You must be signed in to change notification settings - Fork 315
Adds path for the CUDA static library based on CUDA_HOME #837
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 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
b400e34
Adds paths for the CUDA static library based on CUDA_HOME (#608).
Andy-Jost 82dcb06
Removes LIB and LIBRARY_PATH environment variables from the build-whe…
Andy-Jost 73acddf
Updates Linux install to search both lib and lib64 directories for CU…
Andy-Jost 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,6 +31,7 @@ | |
| raise RuntimeError("Environment variable CUDA_HOME or CUDA_PATH is not set") | ||
|
|
||
| CUDA_HOME = CUDA_HOME.split(os.pathsep) | ||
|
|
||
| if os.environ.get("PARALLEL_LEVEL") is not None: | ||
| warn( | ||
| "Environment variable PARALLEL_LEVEL is deprecated. Use CUDA_PYTHON_PARALLEL_LEVEL instead", | ||
|
|
@@ -238,6 +239,8 @@ def generate_output(infile, local): | |
| os.path.dirname(sysconfig.get_path("include")), | ||
| ] + include_path_list | ||
| library_dirs = [sysconfig.get_path("platlib"), os.path.join(os.sys.prefix, "lib")] | ||
| cudalib_subdir = r"lib\x64" if sys.platform == "win32" else "lib64" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Linux side, one annoying thing is that depending on how CUDA is installed, this could be $ ls -l /usr/local/cuda-13.0/lib64/libcudart_static.a
-rw-r--r-- 1 root root 1361104 Aug 5 09:32 /usr/local/cuda-13.0/lib64/libcudart_static.a
$ ls -l /usr/local/cuda-13.0/targets/x86_64-linux/lib/libcudart_static.a
-rw-r--r-- 1 root root 1361104 Aug 5 09:32 /usr/local/cuda-13.0/targets/x86_64-linux/lib/libcudart_static.aWe probably should support both. |
||
| library_dirs.extend(os.path.join(prefix, cudalib_subdir) for prefix in CUDA_HOME) | ||
|
|
||
| extra_compile_args = [] | ||
| extra_cythonize_kwargs = {} | ||
|
|
||
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.