Skip to content

Comments

Relax torch constraint to support PyTorch 2.8+#181

Closed
japadua619 wants to merge 1 commit intodatabricks:mainfrom
reve-ai:torch-2.9-support
Closed

Relax torch constraint to support PyTorch 2.8+#181
japadua619 wants to merge 1 commit intodatabricks:mainfrom
reve-ai:torch-2.9-support

Conversation

@japadua619
Copy link

Summary

Relaxes the torch version constraint from >=2.7.0,<2.7.1 to >=2.7.0,<3.0.0 to support PyTorch 2.8, 2.9, and future 2.x releases.

Motivation

The current constraint torch>=2.7.0,<2.7.1 is overly restrictive and blocks users from installing megablocks with newer PyTorch 2.x versions, even though the codebase only requires torch >= 2.0.0 (as checked in megablocks/layers/mlp.py).

This change enables compatibility with:

  • PyTorch 2.8.x
  • PyTorch 2.9.x (currently 2.9.1 is latest)
  • Future PyTorch 2.x releases

Changes

  • setup.py line 65: Changed 'torch>=2.7.0,<2.7.1' to 'torch>=2.7.0,<3.0.0'

Testing

No code changes were made - this is purely a packaging constraint update. The existing codebase already supports torch 2.x versions.

Impact

This unblocks users who need to use megablocks with newer PyTorch versions, particularly for CUDA 12.9 support available in PyTorch 2.9.1.

@japadua619 japadua619 closed this Feb 17, 2026
@japadua619 japadua619 deleted the torch-2.9-support branch February 17, 2026 01:01
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