Skip to content

Require torch>=2.6 - #2171

Merged
matthewdouglas merged 4 commits into
mainfrom
deps/torch-2.6-minimum
Dec 3, 2026
Merged

matthewdouglas merged 4 commits into
mainfrom
deps/torch-2.6-minimum

Conversation

@matthewdouglas

Copy link
Copy Markdown
Member

Raises the minimum PyTorch version from 2.4 to 2.6, matching transformers, accelerate and trl. Also bumps the dev version to 0.51.0.dev0.

Library

  • backends/triton/ops.py: drop the hasattr(torch, "accelerator") fallback.
  • nn/parametrize.py: always register the state dict post-hook. It was gated on torch >= 2.5.
  • backends/cpu/ops.py: the torch._int_mm path is now gated only on AVX-512. The torch >= 2.6 overflow guard is no longer needed.

On torch >= 2.6 every removed branch was already dead, so behavior is unchanged. In torch 2.6, torch.accelerator detects a registered privateuse1 backend first, then CUDA/MTIA/XPU/HIP/MPS/HPU.

Tests

  • tests/helpers.py and tests/fsdp_state_dict_save.py now use torch.accelerator directly.
  • Removed skips and xfails that only applied to torch < 2.5 / < 2.6.

CI

  • CPU and CUDA 11.8 jobs test torch 2.6.0 instead of 2.4.1.
  • The separate aarch64 2.5.1 entries are gone.
  • The Windows CUDA 11.8 2.4.1 nightly row is dropped.

Docs

  • README, installation and quickstart now say 2.6+.

🤖 Generated with Claude Code

matthewdouglas and others added 3 commits December 3, 2026 15:41
Raise the minimum PyTorch version to 2.6, matching transformers,
accelerate and trl.

- Remove compatibility code for torch < 2.6: the torch.accelerator
  fallbacks, the torch >= 2.5 guard on the parametrization state dict
  hook, and the torch >= 2.6 check on the CPU int8 matmul.
- Remove test skips and xfails that only applied to torch < 2.6.
- Test with torch 2.6.0 in place of 2.4.1 (and 2.5.1 on aarch64) in the
  PR and nightly workflows.
- Update the documented minimum.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Pages changed in this PR:

torch 2.6 inductor compiles for 256-bit SVE on any SVE CPU, which gives
wrong results on CPUs with 128-bit SVE such as the Neoverse-N2 CI
runners. Fixed in torch 2.7. Replaces the narrower gradient-only check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@matthewdouglas
matthewdouglas merged commit e886fac into main Dec 3, 2026
142 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant