Commit 070553f
* Squash-merge of PR #1519 (rparolin/env_var_improvements) rebased onto main.
Adds cuda.pathfinder._utils.env_var_constants with canonical search order,
enhances get_cuda_home_or_path() with robust path comparison and caching,
and updates documentation across all packages to reflect the new priority.
Co-authored-by: Rob Parolin <rparolin@nvidia.com>
Made-with: Cursor
* replace _get_cuda_paths() with _get_cuda_path() using pathfinder
Drop os.pathsep splitting of CUDA_PATH/CUDA_HOME in both build_hooks.py files.
Both functions now delegate to get_cuda_home_or_path() from cuda.pathfinder,
returning a single path.
See #1801 (comment)
Made-with: Cursor
* treat empty env vars as undefined in get_cuda_home_or_path()
See #1801 (comment) for the rationale
Made-with: Cursor
* fix(pathfinder): clear get_cuda_home_or_path cache in test fixtures
Made-with: Cursor
* fix(core): update test_build_hooks for _get_cuda_path rename, drop multi-path test
Made-with: Cursor
* refactor(core): use get_cuda_home_or_path() in test conftest skipif
Made-with: Cursor
* refactor(core): use get_cuda_home_or_path() in examples
Made-with: Cursor
* rename get_cuda_home_or_path -> get_cuda_path_or_home
Safe: currently an internal-only API (not yet public).
Made-with: Cursor
* make get_cuda_path_or_home a public API, privatize CUDA_ENV_VARS_ORDERED
Export get_cuda_path_or_home from cuda.pathfinder.__init__. External
consumers now import from cuda.pathfinder directly. Rename constant
to _CUDA_PATH_ENV_VARS_ORDERED and remove all public references to it.
Made-with: Cursor
* docs(pathfinder): manually edit 1.5.0 release notes, fix RST formatting (Cursor)
Made-with: Cursor
* Add 1.5.0, 1.4.3, 1.4.2 in cuda_pathfinder/docs/nv-versions.json
* docs: clarify that CUDA_PATH/CUDA_HOME priority comes from pathfinder
Pathfinder 1.5.0 release notes no longer claim cross-package consistency
(that depends on future bindings/core releases). cuda_bindings env var
docs now defer to pathfinder release notes for migration guidance.
Made-with: Cursor
* fix oversights that slipped in when manually editing cuda_pathfinder/docs/nv-versions.json before
Discovered via independent review from GPT-5.4 Extra High
* fix(pathfinder): change found_via from "CUDA_HOME" to "CUDA_PATH"
Aligns the provenance label with the new CUDA_PATH-first priority.
The label signals the highest-priority env var name, not necessarily
which variable supplied the value.
Discovered via independent review from GPT-5.4 Extra High
Made-with: Cursor
* fix(build): don't import cuda.pathfinder in build_hooks.py
The build backends run in an isolated venv created by pyproject-build.
Although cuda-pathfinder is listed in build-system.requires and gets
installed, the cuda namespace package from backend-path=["."] shadows
the installed cuda-pathfinder, making `from cuda.pathfinder import ...`
fail with ModuleNotFoundError. This broke all CI wheel builds.
Revert _get_cuda_path() to use os.environ.get() directly with
CUDA_PATH > CUDA_HOME priority, and remove cuda-pathfinder from
build-system.requires (it was not there on main; our PR added it).
Made-with: Cursor
* Update pathfinder descriptor catalogs for cusparseLt release 0.9.0
* Slightly enhance comment in _get_cuda_path()
* Add PR #1806 to 1.5.0-notes.rst
* Systematically rename find_in_cuda_home → find_in_cuda_path
* add _cuda_headers_available() guard to conftest files
Add a helper that skips tests when no CUDA path is set, but
asserts that the include/ subdirectory exists when one is — surfacing
stale or incomplete toolkit roots at collection time instead of
letting them fail later in compilation.
Applied in both the root conftest.py and cuda_core/tests/conftest.py.
Made-with: Cursor
---------
Co-authored-by: Rob Parolin <rparolin@nvidia.com>
1 parent 70ec6a6 commit 070553f
File tree
33 files changed
+402
-162
lines changed- cuda_bindings
- docs/source
- cuda_core
- examples
- tests
- helpers
- cuda_pathfinder
- cuda/pathfinder
- _binaries
- _dynamic_libs
- _headers
- _static_libs
- _utils
- docs
- source
- release
- tests
33 files changed
+402
-162
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
8 | 26 | | |
9 | 27 | | |
10 | | - | |
| 28 | + | |
11 | 29 | | |
12 | 30 | | |
13 | 31 | | |
| |||
31 | 49 | | |
32 | 50 | | |
33 | 51 | | |
34 | | - | |
35 | | - | |
36 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
| |||
133 | 136 | | |
134 | 137 | | |
135 | 138 | | |
136 | | - | |
137 | | - | |
| 139 | + | |
| 140 | + | |
138 | 141 | | |
139 | 142 | | |
140 | 143 | | |
| |||
291 | 294 | | |
292 | 295 | | |
293 | 296 | | |
294 | | - | |
| 297 | + | |
295 | 298 | | |
296 | 299 | | |
297 | 300 | | |
| |||
307 | 310 | | |
308 | 311 | | |
309 | 312 | | |
310 | | - | |
| 313 | + | |
311 | 314 | | |
312 | 315 | | |
313 | 316 | | |
| |||
347 | 350 | | |
348 | 351 | | |
349 | 352 | | |
350 | | - | |
| 353 | + | |
351 | 354 | | |
352 | 355 | | |
353 | 356 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
19 | 26 | | |
20 | 27 | | |
21 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
34 | 38 | | |
35 | 39 | | |
36 | | - | |
37 | | - | |
| 40 | + | |
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
| |||
60 | 63 | | |
61 | 64 | | |
62 | 65 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
| |||
132 | 134 | | |
133 | 135 | | |
134 | 136 | | |
135 | | - | |
| 137 | + | |
136 | 138 | | |
137 | 139 | | |
138 | 140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
68 | | - | |
| 69 | + | |
69 | 70 | | |
70 | | - | |
| 71 | + | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
106 | | - | |
| 107 | + | |
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
0 commit comments