Skip to content

[CI] Add workflow verifying build against minimum supported PyTorch and JAX - #3396

Draft
pggPL wants to merge 15 commits into
NVIDIA:mainfrom
pggPL:pytorch21_build_ci
Draft

[CI] Add workflow verifying build against minimum supported PyTorch and JAX#3396
pggPL wants to merge 15 commits into
NVIDIA:mainfrom
pggPL:pytorch21_build_ci

Conversation

@pggPL

@pggPL pggPL commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds a GitHub Actions workflow that builds TE against pinned minimum framework versions and runs the sanity imports. Versions are set in a single place (MIN_TORCH_VERSION: 2.8.0, MIN_JAX_VERSION: 0.5.3). This guards the declared lower bounds of the framework requirements, which are currently not exercised by CI.

Context — both declared floors are stale:

  • build_tools/pytorch.py declares torch>=2.1, but current main does not compile against torch 2.1 (std::optional vs c10::optional in generator APIs, missing c10::Stream pybind caster) and does not import against anything older than the FSDP2 _fully_shard internals (~2.4). 2.8.0 is pinned as a verified-working floor.
  • pyproject.toml declares jax>=0.5.0, but transformer_engine/jax/sharding.py imports jax.sharding.get_abstract_mesh, which only exists since jax 0.5.3. The build compiles against 0.5.0 but the import fails; 0.5.3 is the verified floor.

The declared requirements may deserve a separate bump to match.

To keep the jobs small they build a single old arch (NVTE_CUDA_ARCHS=70) with MAX_JOBS=2 (the 7GB public runner OOMs at full parallelism) and sccache backed by the GitHub Actions cache.

The arch-70-only build surfaced a real build bug, fixed here as well: the PyTorch extension enabled NVTE_WITH_NCCL_EP based only on the env var (default on), while the common library gates NCCL EP on having an arch >= 90 in the target list. A build targeting only archs < 90 compiled the EP extension against a core library with no nvte_ep_* symbols (and on older torch failed earlier on the missing SymmetricMemory header). The extension now uses the same nccl_ep_enabled() gate as the common CMake side; builds that include arch >= 90 are unaffected.

Type of change

  • Documentation change (change only to the documentation, either a fix or a new content)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Infra/Build change
  • Code refactoring

Changes

  • Add .github/workflows/minimum_versions.yml with two jobs, on pull_request / workflow_dispatch:
    • "Minimum supported PyTorch": build with torch==2.8.0 on a single arch (sm70) + sanity import
    • "Minimum supported JAX": build with jax==0.5.3 (CPU jaxlib) on a single arch (sm70) + sanity import
  • build_tools/pytorch.py: gate NVTE_WITH_NCCL_EP/USE_NCCL defines on nccl_ep_enabled() (matching the common CMake gate) instead of the raw env var

Checklist:

  • I have read and followed the contributing guidelines
  • The functionality is complete
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

🤖 Generated with Claude Code

pggPL added 11 commits August 18, 2026 11:44
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
… 8.9

Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
…1 needs c10::optional

Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
…Make

Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
… c10::Stream caster

Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
…nd lacks c10::Stream caster"

This reverts commit 04b4b0f.

Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
…torch 2.1 needs c10::optional"

This reverts commit 061834f.

Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
@pggPL
pggPL requested a review from fheinecke August 18, 2026 14:08
@greptile-apps

greptile-apps Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds minimum-version PyTorch and JAX build jobs and aligns PyTorch NCCL EP compilation with framework capability checks.

  • Builds and sanity-imports against pinned framework versions in CUDA containers.
  • Restricts each build to a single CUDA architecture with sccache and limited parallelism.
  • Disables PyTorch NCCL EP bindings when the required symmetric-memory header is unavailable.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains.

No blocking failure remains.

Important Files Changed

Filename Overview
.github/workflows/minimum_versions.yml Adds containerized minimum-version build and sanity-import jobs for PyTorch and JAX.
build_tools/pytorch.py Gates PyTorch NCCL EP compilation on the shared architecture setting and availability of the required PyTorch header.

Reviews (4): Last reviewed commit: "Skip NCCL EP in torch extension when tor..." | Re-trigger Greptile

pip install torch==${MIN_TORCH_VERSION}
pip install cmake pybind11[global] ninja pydantic importlib-metadata>=1.0 packaging einops onnxscript "nvidia-cudnn-frontend>=1.25.0"
- name: 'Checkout'
uses: actions/checkout@v3

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 security Mutable checkout action reference

The new workflow executes actions/checkout@v3 as root before recursively fetching and building the repository. Pinning the action to a full commit would prevent the reviewed CI dependency from changing when its upstream tag moves or is compromised.

Suggested change
uses: actions/checkout@v3
uses: actions/checkout@<full-commit-sha>

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
@pggPL pggPL changed the title [CI] Add workflow verifying build against minimum supported PyTorch [CI] Add workflow verifying build against minimum supported PyTorch and JAX Aug 18, 2026
pggPL added 2 commits August 18, 2026 16:33
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
…ild min-torch job on sm90

Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
@pggPL
pggPL marked this pull request as draft August 18, 2026 15:12
… import

Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant