Repository navigation
Conversation
Collaborator
Author
|
/te-ci |
1 similar comment
Member
|
/te-ci |
fheinecke
force-pushed
the
fred/add-build-time-requirements-1
branch
from
September 4, 2026 16:42
e01577c to
d8270b8
Compare
10 of 13 tasks
Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
for more information, see https://pre-commit.ci
Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
Match the nvidia-cudnn-frontend version that main requires. Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
Enable cuBLASMp, cuSOLVERMp, NVSHMEM, and CuTeDSL with either their NVTE_* variables or matching pip config settings (with-cublasmp, with-cusolvermp, enable-nvshmem, with-cutedsl). In isolated builds, install the corresponding Python packages as build requirements unless the feature's *_HOME variable selects an existing installation. Without build isolation, fall back to installed Python packages when *_HOME is not set. Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
Add the ub-with-mpi config setting for NVTE_UB_WITH_MPI. Isolated builds install the openmpi package unless MPI_HOME is set, and builds without isolation use an installed openmpi package when MPI_HOME is unset. The package installs into the environment prefix, so locate it through its installed mpi.h. Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
The cuSOLVERMp, NVSHMEM, and NCCL Python packages only provide versioned shared libraries (libcusolverMp.so.0, libnvshmem_host.so.3, libnccl.so.2), which CMake's find_library and -l<name> linker flags do not match. Look for the versioned names as well, and find NCCL's library next to its headers. Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
Add RUNPATH entries to libtransformer_engine.so for the cuBLASMp, cuSOLVERMp, NCCL, NVSHMEM, and openmpi Python packages when the corresponding features are enabled, relative to the installed library's location in site-packages. NCCL is included whenever the library links it, including the default NCCL EP build, so an NCCL Python package installed next to Transformer Engine takes precedence over a system NCCL. Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
fheinecke
force-pushed
the
fred/add-build-time-requirements-1
branch
from
November 6, 2026 21:43
c60111f to
4a5b76a
Compare
Build the core library wheel with pip wheel so build_tools/build_backend.py installs its CUDA and optional feature build requirements, instead of installing cuDNN frontend and TVM-FFI into the build interpreter. Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
… builds Isolated builds previously failed unless NVTE_FRAMEWORK or the framework config setting was set. Instead, add no framework build requirements, so setup.py's framework detection finds none in the isolated build environment and only the core library is built. Builds without isolation still detect installed frameworks. Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
fheinecke
force-pushed
the
fred/add-build-time-requirements-1
branch
from
November 9, 2026 22:19
190f8c2 to
152b4fb
Compare
…d builds Remove the hardcoded CUDA 13.3 fallback. A guessed CUDA version can build successfully but fail at runtime against an older driver or a framework built for a different CUDA major version. The version is still detected from the cuda-version config setting, NVTE_CUDA_VERSION, or the CUDA Toolkit's nvcc; otherwise the build fails with instructions. Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
Describe isolated installs from PyPI, GitHub, and source, including pinning the framework version with build constraints, selecting frameworks, CUDA versions, and optional dependencies with config settings, and the cases that still require --no-build-isolation. Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
The JAX extension's build requirements always installed jax[cuda12], so isolated builds required the CUDA 12 core library even for JAX with CUDA 13 support. Add a build backend that installs jax[cuda12] or jax[cuda13] based on the cuda-version config setting or NVTE_CUDA_VERSION. CUDA 12 remains the default so that existing installs are unchanged. setup.py already selects the core library from the CUDA version of the installed JAX. Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
Move CUDA version validation, config setting parsing, and the setuptools PEP 517/660 hook wrappers into build_tools/build_backend_utils.py, so the supported CUDA versions and settings handling are defined once. The JAX backend imports the repository's build_tools in a source checkout, like its setup.py, and the copy bundled in its sdist otherwise. Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
…ge dependencies Isolated builds installed the CUDA compiler and runtime but not cuBLAS or cuDNN, which the core library links against. Install them through the cuda-toolkit metapackage, which pins all CUDA components to the same release, and nvidia-cudnn-cu*. When CUDA_HOME is set, use the installed CUDA Toolkit and cuDNN instead of installing either. When the core library is built against libraries from Python packages (the CUDA Toolkit, cuDNN, NCCL, cuBLASMp, cuSOLVERMp, NVSHMEM, or openmpi), declare runtime dependencies on those packages, within the major version used for the build so that they stay compatible with frameworks' exact pins. Builds against system libraries, including release wheels, declare no new dependencies. When the CUDA Toolkit comes from Python packages, build NCCL EP against the nvidia-nccl wheel that the core library then depends on and loads at runtime. Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
Move MIN_CUDNN_VERSION into transformer_engine/common/_versions.py, which imports nothing. The runtime imports it as before, and the build loads the file directly so that the transformer_engine package and its shared libraries are not loaded during the build. Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
This reverts commit aaaf3d5. Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
Remove the runtime dependencies that were declared for libraries the core library was built against from Python packages, and restore the original NCCL discovery order for NCCL EP. Build isolation only changes the build environment; runtime requirements are unchanged. The installation guide now notes that the CUDA libraries, cuDNN, and optional dependencies must be installed at runtime. Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
…es from Python packages With a CUDA Toolkit from Python packages, the NCCL loaded at runtime is most likely the nvidia-nccl wheel, which the core library's RUNPATH prefers when it is installed. Check for it before system NCCL in that case. Builds with an installed CUDA Toolkit keep the system-first order. Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
One of the issues blocking wheel build isolation is that CUDA build-time dependencies (e.g. nvcc) are not available today. These cannot easily be statically defined in pyproject.toml, because the exact dependencies required depend on whether the wheel is being built for CUDA 12 or CUDA 13.
This PR adds a PEP 517/660 compliant
build_system.pythat defines these requirements based on specific build-time flag, env var, or system dependencies. As with today, this logic is completely ignored when--no-build-isolationis set, so it should have no impact on existing release processes. This does not completely enable build isolation, but fixes most of the remaining blockers.I have intentionally listed this as "not for external use" in the documentation. I'll update this and the install docs once build isolation is completely supported.
Depends on #3251
Type of change
Changes
Please list the changes introduced in this PR:
Checklist: