Skip to content

chore: bump minimum PyTorch version from 2.3 to 2.4#1926

Open
Titus-von-Koeller wants to merge 3 commits intomainfrom
chore/bump-min-torch-2.4
Open

chore: bump minimum PyTorch version from 2.3 to 2.4#1926
Titus-von-Koeller wants to merge 3 commits intomainfrom
chore/bump-min-torch-2.4

Conversation

@Titus-von-Koeller
Copy link
Copy Markdown
Collaborator

Summary

  • Bump minimum PyTorch from 2.3 to 2.4 in pyproject.toml, README, and docs
  • Remove _IS_TORCH_GTE_24 compat shim in _ops.pytorch.library.register_fake / register_kernel are always available now
  • Remove torch < 2.4 skipif guards in tests and the opcheck no-op fallback
  • Remove NumPy < 2 downgrade workaround for torch 2.3 on Windows in test-runner
  • Update CI matrices: test minimum version is now 2.4.1 (with cu118 for CUDA 11.8)

Net change: -21 lines across 11 files.

Aligns with Transformers' minimum torch version ahead of the next release. Per discussion, bumping one version at a time (2.3 → 2.4) rather than jumping to 2.5.

Test plan

  • CI passes with torch 2.4.1 as the new minimum test version
  • No regressions on existing CUDA/CPU test configurations

🤖 Generated with Claude Code

- Update dependency spec in pyproject.toml
- Update docs (README, installation, quickstart)
- Remove _IS_TORCH_GTE_24 compat shim in _ops.py (register_fake/register_kernel
  are always available in torch 2.4+)
- Remove torch < 2.4 skipif guards in tests
- Remove NumPy < 2 downgrade workaround for torch 2.3 on Windows
- Update CI test matrices: 2.3.1 → 2.4.1

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
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.

Titus-von-Koeller and others added 2 commits April 16, 2026 15:23
fullgraph mode for torch.compile requires torch 2.8+, matching the
existing guard in test_linear4bit_torch_compile. Previously masked
by the torch < 2.4 skipif.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The failure on torch 2.4.1 is dynamo failing to trace MatmulLtState
(UserDefinedObject `__bool__`), which is a different root cause than
the Params4bit `.t()` issue that needs torch 2.8+ in the 4bit test.
Torch 2.5+ has the dynamo UDO improvements needed for this to work.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.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