intel-gpu: refresh xpu extras (fix torch 2.10, add 2.7.1 / 2.9.1 / 2.11.0 / 2.12.0)#5484
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 17548a082f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "unsloth_zoo[intelgpu]", | ||
| "unsloth[huggingfacenotorch]", | ||
|
|
||
| "pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.3.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl#sha256=663ce21364096b268c6687f26f22862cb1001cae0c4ec9f98a0998415f99e2b0 ; platform_system == 'Linux' and python_version == '3.10' and platform_machine == 'x86_64'", |
There was a problem hiding this comment.
Add the missing Python 3.9 wheels to torch271
For Python 3.9 users on x86_64 Linux or Windows, this new intel-gpu-torch271 extra only selects the unversioned bitsandbytes entries because every torch, torchvision, and pytorch-triton-xpu URL starts at python_version == '3.10'; the project still advertises Python 3.9 support, and PyTorch publishes matching 2.7.1+xpu / 0.22.1+xpu / 3.3.1 wheels for cp39, as the neighboring 2.7.0/2.8.0 extras already include. Installing unsloth[intel-gpu-torch271] on Python 3.9 therefore succeeds without installing torch at all, leading to runtime import failures.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Code Review
This pull request adds several new dependency groups to pyproject.toml to support Intel GPU configurations across multiple Torch versions (2.7.1, 2.9.1, 2.11.0, and 2.12.0). These groups specify direct wheel URLs for torch, torchvision, triton-xpu, and bitsandbytes for various Python versions and operating systems. Feedback was provided regarding the omission of SHA256 integrity hashes for some triton-xpu and torch dependencies, which should be added to ensure security and maintain consistency with other entries in the file.
| "triton-xpu @ https://download.pytorch.org/whl/triton_xpu-3.6.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl ; platform_system == 'Linux' and python_version == '3.10' and platform_machine == 'x86_64'", | ||
| "triton-xpu @ https://download.pytorch.org/whl/triton_xpu-3.6.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl ; platform_system == 'Linux' and python_version == '3.11' and platform_machine == 'x86_64'", | ||
| "triton-xpu @ https://download.pytorch.org/whl/triton_xpu-3.6.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl ; platform_system == 'Linux' and python_version == '3.12' and platform_machine == 'x86_64'", | ||
| "triton-xpu @ https://download.pytorch.org/whl/triton_xpu-3.6.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl ; platform_system == 'Linux' and python_version == '3.13' and platform_machine == 'x86_64'", | ||
| "triton-xpu @ https://download.pytorch.org/whl/triton_xpu-3.6.0-cp310-cp310-win_amd64.whl ; sys_platform == 'win32' and python_version == '3.10' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')", | ||
| "triton-xpu @ https://download.pytorch.org/whl/triton_xpu-3.6.0-cp311-cp311-win_amd64.whl ; sys_platform == 'win32' and python_version == '3.11' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')", | ||
| "triton-xpu @ https://download.pytorch.org/whl/triton_xpu-3.6.0-cp312-cp312-win_amd64.whl ; sys_platform == 'win32' and python_version == '3.12' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')", | ||
| "triton-xpu @ https://download.pytorch.org/whl/triton_xpu-3.6.0-cp313-cp313-win_amd64.whl ; sys_platform == 'win32' and python_version == '3.13' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')", |
There was a problem hiding this comment.
| "torch @ https://download.pytorch.org/whl/xpu/torch-2.11.0%2Bxpu-cp310-cp310-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.10' and platform_machine == 'x86_64'", | ||
| "torch @ https://download.pytorch.org/whl/xpu/torch-2.11.0%2Bxpu-cp311-cp311-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.11' and platform_machine == 'x86_64'", | ||
| "torch @ https://download.pytorch.org/whl/xpu/torch-2.11.0%2Bxpu-cp312-cp312-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.12' and platform_machine == 'x86_64'", | ||
| "torch @ https://download.pytorch.org/whl/xpu/torch-2.11.0%2Bxpu-cp313-cp313-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.13' and platform_machine == 'x86_64'", | ||
| "torch @ https://download.pytorch.org/whl/xpu/torch-2.11.0%2Bxpu-cp310-cp310-win_amd64.whl ; sys_platform == 'win32' and python_version == '3.10' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')", | ||
| "torch @ https://download.pytorch.org/whl/xpu/torch-2.11.0%2Bxpu-cp311-cp311-win_amd64.whl ; sys_platform == 'win32' and python_version == '3.11' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')", | ||
| "torch @ https://download.pytorch.org/whl/xpu/torch-2.11.0%2Bxpu-cp312-cp312-win_amd64.whl ; sys_platform == 'win32' and python_version == '3.12' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')", | ||
| "torch @ https://download.pytorch.org/whl/xpu/torch-2.11.0%2Bxpu-cp313-cp313-win_amd64.whl ; sys_platform == 'win32' and python_version == '3.13' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')", |
Builds on the intelgputorch210 fix in the previous commit by also
filling in the four other intel-gpu-torch* wheel stacks that PyTorch
has published but Unsloth was not yet exposing:
* intelgputorch271 / intel-gpu-torch271:
torch 2.7.1+xpu with pytorch-triton-xpu 3.3.1
* intelgputorch291 / intel-gpu-torch291:
torch 2.9.1+xpu with pytorch-triton-xpu 3.5.0
* intelgputorch2110 / intel-gpu-torch2110:
torch 2.11.0+xpu with triton-xpu 3.7.0
* intelgputorch2120 / intel-gpu-torch2120:
torch 2.12.0+xpu with triton-xpu 3.7.1
Each torch + triton pair was cross-checked against the wheel's PEP 658
.metadata sidecar to confirm the upstream Requires-Dist matches what
this block pins. Verified via `uv pip compile` across cp310/cp311/cp312/
cp313 on Linux x86_64 and Windows AMD64.
17548a0 to
c0cd342
Compare
There was a problem hiding this comment.
💡 Codex Review
Lines 1061 to 1064 in c0cd342
For Python 3.14 users, the newly added intelgputorch291 stack stops at python_version == '3.13' for triton/torch/torchvision even though this package advertises requires-python = ">=3.9,<3.15" and the PyTorch XPU index publishes cp314 wheels for the 2.9.1, 2.11.0, and 2.12.0 stacks. Installing unsloth[intel-gpu-torch291] (and the analogous new 2110/2120 extras) on Python 3.14 therefore matches only the unversioned dependencies like bitsandbytes and leaves torch uninstalled, causing runtime import failures.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Fixes #5494: installing any intel-gpu-torch* extra without also pulling `huggingface` or `colab-new` lets the resolver silently fall back to a stale unsloth_zoo (2026.3.6 in the original report) because no version floor is enforced on `unsloth_zoo[intelgpu]` in those blocks. unsloth_zoo 2026.5.2 (just released) also relaxes its own torch upper bound from <2.11.0 to <2.13.0, which is what unblocks the resolver for the intel-gpu-torch2110 and intel-gpu-torch2120 extras shipped in #5484. Adding the floor in `huggingfacenotorch` propagates it to every extra that includes the HF-without-torch base: amd, huggingface, and all nine intelgputorch* blocks. Single line, single source of truth. Requires unsloth_zoo 2026.5.2 to be on PyPI for end-to-end resolution.
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.
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.
Summary
Aligns the
intel-gpu-torch*optional dependency stacks inpyproject.tomlwith the wheels PyTorch is actually publishing ondownload.pytorch.org/whl/xpu.The
intelgputorch210block onmainpinspytorch_triton_xpu 3.5.0, but the publishedtorch-2.10.0+xpuwheel's own metadata declaresRequires-Dist: triton-xpu==3.6.0(the package was renamed and bumped upstream). The result is thatpip install .[intel-gpu-torch210]fails on every supported Python with:This PR fixes that block and also fills in the four newer xpu wheel sets (2.7.1, 2.9.1, 2.11.0, 2.12.0) that have been published but were not yet exposed as Unsloth extras.
Commits
fix(pyproject): use triton-xpu 3.6.0 for intelgputorch210 (#4931)by @aiSynergy37, cherry-picked from Fix intelgputorch210 Triton dependency for PyTorch 2.10 XPU #4941 to preserve original authorship in git history.intel-gpu: add xpu extras for torch 2.7.1 / 2.9.1 / 2.11.0 / 2.12.0adds the four newer wheel stacks plus theirintel-gpu-torch*aliases.Final state of the section
intelgputorch271/intel-gpu-torch271(new)torch-2.7.1+xpupytorch-triton-xpu==3.3.1intelgputorch291/intel-gpu-torch291(new)torch-2.9.1+xpupytorch-triton-xpu==3.5.0intelgputorch210/intel-gpu-torch210(fix, by @aiSynergy37)torch-2.10.0+xputriton-xpu==3.6.0(was:pytorch_triton_xpu 3.5.0)intelgputorch2110/intel-gpu-torch2110(new)torch-2.11.0+xputriton-xpu==3.7.0intelgputorch2120/intel-gpu-torch2120(new)torch-2.12.0+xputriton-xpu==3.7.1Each torch + triton pair was cross-checked against the wheel's own PEP 658
.metadatasidecar to confirm itsRequires-Distmatches.The neighbouring
intelgputorch290block was left alone:torch-2.9.0+xpu'sRequires-Distispytorch-triton-xpu==3.5.0, which is what is already pinned there.Test plan
For every modified and new extra, ran the resolver across all four supported Python versions on Linux x86_64 and Windows AMD64:
All combinations resolve cleanly and pick the correct
torch-N.M.P+xpu+ matchingtriton-xpu/pytorch-triton-xpuwheels. End-to-end reproduce-then-fix on the original failure also confirmed:uv pip install --dry-run '.[intel-gpu-torch210]'against unpatched main produces the user-reportedtriton-xpu==3.6.0error; against this branch it succeeds and selects torch-2.10.0+xpu + triton-xpu-3.6.0. Full regression run against the other 149 untouched extras shows zero new breakage.Closes #4319.
Closes #4931.
Closes #5358.
Replaces #4941 (whose commit by @aiSynergy37 is preserved as the first commit here).