Skip to content

deps: bump torch upper cap to <2.13.0 (allow xpu 2.11.0 / 2.12.0)#658

Merged
danielhanchen merged 2 commits into
mainfrom
xpu-torch-cap-bump
May 17, 2026
Merged

deps: bump torch upper cap to <2.13.0 (allow xpu 2.11.0 / 2.12.0)#658
danielhanchen merged 2 commits into
mainfrom
xpu-torch-cap-bump

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

Bumps the torch upper bound from <2.11.0 to <2.13.0 in the base dependency block so that the new torch-2.11.0+xpu and torch-2.12.0+xpu intel-gpu extras in unsloth (added in unslothai/unsloth#5484) can actually resolve.

Why

unsloth/pyproject.toml now ships:

  • intel-gpu-torch2110 -> pins torch-2.11.0+xpu
  • intel-gpu-torch2120 -> pins torch-2.12.0+xpu

Without this PR, pip rejects those extras because every recent unsloth_zoo release declares torch>=2.4.0,<2.11.0 in its own dependency block. The reporter on unslothai/unsloth#5494 hit this directly: their install of .[intelgputorch2120] fell back to a stale unsloth_zoo (2026.3.6) and they had to manually run uv pip install --upgrade --no-deps unsloth_zoo to bypass the cap.

What

A single character bump on the torch upper bound, leaves everything else untouched:

-    "torch>=2.4.0,<2.11.0 ; (sys_platform != 'darwin' or platform_machine != 'arm64')",
+    "torch>=2.4.0,<2.13.0 ; (sys_platform != 'darwin' or platform_machine != 'arm64')",

<2.13.0 keeps a defensive cap on future torch versions while admitting the two new pinned versions we ship today.

Test plan

After cutting a release that contains this change, the matching unsloth pyproject change (forthcoming follow-up to add unsloth_zoo>=2026.X.Y floor on huggingfacenotorch) will pull this version through pip install unsloth[intel-gpu-torch2120] and the resolver will pick torch==2.12.0+xpu + triton-xpu==3.7.1 + latest unsloth_zoo, instead of falling back to a stale unsloth_zoo as today.

Closes part of unslothai/unsloth#5494 (the other half is the unsloth-side floor, which depends on a release containing this commit).

unsloth/pyproject.toml ships intel-gpu extras pinning torch-2.11.0+xpu
and torch-2.12.0+xpu (added in unslothai/unsloth#5484), but
unsloth_zoo's own torch constraint was capped at <2.11.0. The pip
resolver consequently could not satisfy `pip install
.[intel-gpu-torch2110]` or `.[intel-gpu-torch2120]` end-to-end: it
either failed outright or fell back to a stale unsloth_zoo (2026.3.6)
that does not enforce the cap.

Relax the cap to <2.13.0 so torch 2.11.x and 2.12.x are admissible.
Leaves torch>=2.4.0 floor intact and keeps the future-version cap as a
safety net.

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request updates the torch dependency version range in pyproject.toml from <2.11.0 to <2.13.0. I have no feedback to provide.

@danielhanchen danielhanchen merged commit 8f9d692 into main May 17, 2026
19 checks passed
@danielhanchen danielhanchen deleted the xpu-torch-cap-bump branch May 17, 2026 04:23
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