EXPERIMENT — NOT FOR MERGING — cuda-pathfinder in build-system.requires#1803
EXPERIMENT — NOT FOR MERGING — cuda-pathfinder in build-system.requires#1803rwgk wants to merge 23 commits intoNVIDIA:mainfrom
cuda-pathfinder in build-system.requires#1803Conversation
…d 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
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 NVIDIA#1801 (comment) Made-with: Cursor
See NVIDIA#1801 (comment) for the rationale Made-with: Cursor
Made-with: Cursor
…lti-path test Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
Safe: currently an internal-only API (not yet public). Made-with: Cursor
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
…ng (Cursor) Made-with: Cursor
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
…docs/nv-versions.json before Discovered via independent review from GPT-5.4 Extra High
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
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
This reverts commit 5e445bf.
Temporary diagnostic to investigate why `from cuda.pathfinder import get_cuda_path_or_home` fails inside the pyproject-build isolated venv despite cuda-pathfinder being in build-system.requires. Made-with: Cursor
|
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. |
|
/ok to test |
|
Tracking Cursor Opus 4.6 1M Thinking analysis that was the motivation for this experimental PR: My prompt: Cursor response: |
|
Tracking Cursor Opus 4.6 1M Thinking analysis of https://github.com/NVIDIA/cuda-python/actions/runs/23381904071 logs (at commit 47ea03e here): |
Temporary instrumentation to understand why `import cuda.pathfinder` fails inside pyproject-build's isolated venv despite cuda-pathfinder being successfully installed. Prints sys.path, cuda.__path__, cuda.__spec__, and whether cuda.pathfinder is importable. Made-with: Cursor
If `import cuda.pathfinder` fails, try `pkgutil.extend_path` to merge the cuda namespace across sys.path entries and retry. This tests whether extend_path is a viable fix for the backend-path namespace conflict. Made-with: Cursor
|
/ok to test |
|
Temporary reduction to match the build matrix cut, one entry per platform (linux-64, linux-aarch64, win-64). Made-with: Cursor
|
The below is based on analyzing the 3 successful build logs and corresponding 9 successful tests logs from this CI run: https://github.com/NVIDIA/cuda-python/actions/runs/23382608485?pr=1803 Build hooks patch: use
|
Replace the temporary namespace diagnostic with _import_get_cuda_path_or_home which works around PEP 517 namespace shadowing: in isolated build envs, backend-path=["."] causes the cuda namespace to resolve to only the project's cuda/ dir, hiding the installed cuda-pathfinder. The fix replaces the _NamespacePath with a plain list that includes the site-packages cuda/ dir. Made-with: Cursor
cuda-pathfinder 1.4.x (currently on PyPI) does not expose get_cuda_path_or_home yet. Fall back to os.environ.get via getattr so the namespace fix can be tested on CI now. Made-with: Cursor
|
/ok to test |
`from cuda import pathfinder` raises ImportError (not ModuleNotFoundError) when the cuda namespace exists but pathfinder is not a submodule. Switch to `import cuda.pathfinder` which raises ModuleNotFoundError when the submodule is missing. Made-with: Cursor
|
/ok to test |
Based on #1801, with commit f44a308 from 1801 reverted here.