[CI] Improve build time dependency resolution - #3251
Conversation
Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
|
/te-ci |
for more information, see https://pre-commit.ci
…64 bug) Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
|
/te-ci |
for more information, see https://pre-commit.ci
Greptile SummaryThis PR expands native build dependency discovery so CUDA and NCCL components installed through Python packages can be passed into the CMake and JAX build paths.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains within the scope of the previous review thread. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Python package build] --> B[Discover NVCC and CUDA root]
B --> C[Configure common CMake extension]
B --> D[Discover NCCL headers and library]
D --> E[Build JAX extension]
B --> F[Configure NCCL EP submodule]
C --> G[Package native artifacts]
E --> G
F --> G
Reviews (2): Last reviewed commit: "Standardize CUDA home path and NVCC look..." | Re-trigger Greptile |
|
|
||
|
|
||
| @functools.lru_cache(maxsize=None) | ||
| def cuda_home_path() -> Optional[Path]: |
There was a problem hiding this comment.
We have somewhat inconsistent search logic:
cuda_home_path: prioritizeCUDA_HOME, otherwise look inPYTHONPATHfornvidia/*-cu13/bin(assumed to hold NVCC).cuda_toolkit_include_path: prioritizeCUDA_HOME, then look inPATHfor NVCC, then in/usr/local/cuda/include.nvcc_path: look incuda_home_path(), thenPATH, then Python libs, then/usr/local/cuda
It seems cuda_home_path and cuda_toolkit_include_path are primarily looking for NVCC, so could we consolidate logic?
nvcc_path: prioritizeCUDA_HOME, then look inPYTHONPATH, then Python libs, thenPATH, then/usr/local/cudacuda_home_path: look innvcc_path()cuda_toolkit_include_path: look incuda_home_path()
timmoon10
left a comment
There was a problem hiding this comment.
Overall LGTM. I have a suggestion to consolidate logic, but it's not required if this PR is blocking more important improvements.
Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
|
/te-ci |
Description
There are a few issues with how build-time dependencies are resolved for native code build paths today:
The goal here is to allow all build-time requirements to be installed via wheel. This fixes many of the issues blocking TE wheel build isolation.
This change aims to be 100% backwards compatible.
Fixes # (issue)
Type of change
Changes
Please list the changes introduced in this PR:
Checklist: