Skip to content

add intel support for torch210 within pyproject.toml#4144

Merged
danielhanchen merged 2 commits into
unslothai:mainfrom
leizhenyuan:zhenyuan_enable_torch210
Mar 3, 2026
Merged

add intel support for torch210 within pyproject.toml#4144
danielhanchen merged 2 commits into
unslothai:mainfrom
leizhenyuan:zhenyuan_enable_torch210

Conversation

@leizhenyuan
Copy link
Copy Markdown
Contributor

add intel support for torch210 within pyproject.toml

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request expands the project's hardware compatibility by integrating support for Intel GPUs with PyTorch version 2.1.0. It achieves this by defining a new, comprehensive dependency set within the pyproject.toml file, allowing users to seamlessly install the required libraries for Intel GPU acceleration with this specific PyTorch release.

Highlights

  • New Dependency Group Added: A new dependency group, intelgputorch210, has been introduced in pyproject.toml to specifically support PyTorch 2.1.0 on Intel GPUs.
  • Intel GPU Support for PyTorch 2.1.0: This new group includes platform-specific wheels for pytorch_triton_xpu, torch (version 2.10.0+xpu), bitsandbytes, and torchvision (version 0.25.0+xpu) across various Python versions (3.10-3.13) and operating systems (Linux, Windows).
  • Integration with Unsloth: The intelgputorch210 group also includes unsloth_zoo[intelgpu] and unsloth[huggingfacenotorch] to ensure compatibility with the Unsloth framework.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • pyproject.toml
    • Added a new dependency group intelgputorch210 to support PyTorch 2.1.0 on Intel GPUs.
    • Included specific pytorch_triton_xpu, torch, bitsandbytes, and torchvision wheel URLs with SHA256 hashes, conditional on Python version and platform.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

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

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 adds support for torch 2.10 on Intel GPUs by defining a new set of optional dependencies in pyproject.toml. The changes are mostly correct, but I found a critical copy-paste error in the torchvision dependencies for Windows which will break installation for Python 3.11 users. Please see the specific comment for details.

Comment thread pyproject.toml Outdated
Comment on lines +1022 to +1023
"torchvision @ https://download.pytorch.org/whl/xpu/torchvision-0.25.0%2Bxpu-cp312-cp312-win_amd64.whl#sha256=738357d97468d75fe3d510ac37e65130f2787f81d9bbc1518898f7396dc3403f ; sys_platform == 'win32' and python_version == '3.11' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torchvision @ https://download.pytorch.org/whl/xpu/torchvision-0.25.0%2Bxpu-cp312-cp312-win_amd64.whl#sha256=738357d97468d75fe3d510ac37e65130f2787f81d9bbc1518898f7396dc3403f ; sys_platform == 'win32' and python_version == '3.12' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
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.

critical

There appears to be a copy-paste error in the torchvision dependencies for Windows.

  • The entry for Python 3.11 (line 1022) incorrectly points to the cp312 (Python 3.12) wheel.
  • The entry for Python 3.12 (line 1023) uses the same URL and hash, which is correct for this version but highlights the error on the previous line.

Please correct line 1022 to use the cp311 wheel for torchvision with its corresponding SHA256 hash.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d7186efdd0

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread pyproject.toml Outdated
"torchvision @ https://download.pytorch.org/whl/xpu/torchvision-0.25.0%2Bxpu-cp312-cp312-manylinux_2_28_x86_64.whl#sha256=6ad2543496bc29e59d3dd614a94d09aa9870318aedb66045344fffddfedd2cf8 ; platform_system == 'Linux' and python_version == '3.12' and platform_machine == 'x86_64'",
"torchvision @ https://download.pytorch.org/whl/xpu/torchvision-0.25.0%2Bxpu-cp313-cp313-manylinux_2_28_x86_64.whl#sha256=80269f37865fcd8b57f20e4786efae2200bfa2b2727926c3c7acc82f0e7d3548 ; platform_system == 'Linux' and python_version == '3.13' and platform_machine == 'x86_64'",
"torchvision @ https://download.pytorch.org/whl/xpu/torchvision-0.25.0%2Bxpu-cp310-cp310-win_amd64.whl#sha256=6b9485ba85dcba4d196d6134d9c3332fb228fb2556416bf0450a64e8a472fcba ; sys_platform == 'win32' and python_version == '3.10' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torchvision @ https://download.pytorch.org/whl/xpu/torchvision-0.25.0%2Bxpu-cp312-cp312-win_amd64.whl#sha256=738357d97468d75fe3d510ac37e65130f2787f81d9bbc1518898f7396dc3403f ; sys_platform == 'win32' and python_version == '3.11' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Point Python 3.11 torchvision marker to cp311 wheel

For the intelgputorch210 extra, the dependency guarded by python_version == '3.11' points to a torchvision wheel tagged cp312, so Windows Python 3.11 installs will try to use an incompatible wheel and fail during resolution/install. This blocks unsloth[intel-gpu-torch210] for that interpreter version even though a 3.11-specific wheel is expected in this matrix.

Useful? React with 👍 / 👎.

@danielhanchen
Copy link
Copy Markdown
Member

Thanks!

@danielhanchen danielhanchen merged commit cb8ff8e into unslothai:main Mar 3, 2026
1 check passed
abiswas-realadvice pushed a commit to abiswas-realadvice/unsloth that referenced this pull request May 14, 2026
* add intel support for torch210

* fix for typo
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.

2 participants