-
Notifications
You must be signed in to change notification settings - Fork 270
feat(pathfinder): centralize CUDA env var handling, prioritize CUDA_PATH over CUDA_HOME
#1801
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
Changes from 20 commits
417a5d7
2164c33
c004342
3ba64ae
0c6c655
a4e38d0
3cb531e
c174cd8
24b89b5
feecb82
74e2d5b
5ae2976
6d065e9
8d3ed03
5e445bf
930e25d
51e6c6a
23ad88c
7140117
1eff0f5
00f202d
0255083
9c13237
a79ae81
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -1,13 +1,14 @@ | ||||||||
| # SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||||||||
| # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||||||||
| # SPDX-License-Identifier: Apache-2.0 | ||||||||
|
|
||||||||
| import os | ||||||||
|
|
||||||||
| import pytest | ||||||||
|
|
||||||||
| from cuda.pathfinder import get_cuda_path_or_home | ||||||||
|
|
||||||||
|
|
||||||||
| def pytest_collection_modifyitems(config, items): # noqa: ARG001 | ||||||||
| cuda_home = os.environ.get("CUDA_HOME") | ||||||||
| cuda_home = get_cuda_path_or_home() | ||||||||
|
||||||||
| cuda_home = get_cuda_path_or_home() | |
| cuda_root = get_cuda_path_or_home() | |
| cuda_home = cuda_root if cuda_root is not None and os.path.isdir(os.path.join(cuda_root, "include")) else None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done: commit 9c13237
I believe skipping if CUDA_PATH is set, but there is no include/, is likely to mask oversights. My commit introduces a hard, obvious failure in that situation. I believe that'll be more helpful than skipping, which is likely to get overlooked.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To keep the repo-level core Cython gate accurate after the env-var change, this file needs
osagain if you preserve theinclude/existence check below.