Skip to content

fix(install): add Python 3.13 triton dependency for Intel GPU extras#4372

Closed
BillionClaw wants to merge 1 commit into
unslothai:mainfrom
BillionClaw:clawoss/fix-python3.13-intelgpu-install
Closed

fix(install): add Python 3.13 triton dependency for Intel GPU extras#4372
BillionClaw wants to merge 1 commit into
unslothai:mainfrom
BillionClaw:clawoss/fix-python3.13-intelgpu-install

Conversation

@BillionClaw

Copy link
Copy Markdown

Problem

Installing unsloth[intelgputorch210] (and other Intel GPU extras) on Python 3.13 fails because the unsloth_zoo[intelgpu] dependency requires triton>=3.0.0, but PyPI triton 3.6.0 does not have Python 3.13 wheels available.

Error:

ERROR: Could not find a version that satisfies the requirement triton-xpu==3.6.0

Root Cause

The unsloth_zoo[intelgpu] extra specifies triton>=3.0.0 as a dependency. When pip tries to resolve this on Python 3.13, it selects version 3.6.0 which does not have Python 3.13 wheels on PyPI.

Fix

Add a direct triton wheel URL (version 3.2.0 with Python 3.13 support) to all Intel GPU extras:

  • intelgputorch260
  • intelgputorch270
  • intelgputorch280
  • intelgputorch290
  • intelgputorch210

This provides pip with a Python 3.13 compatible triton wheel before it attempts to resolve from PyPI, avoiding the version conflict.

Changes

  • Added 5 triton wheel URLs (one per Intel GPU extra) with platform condition for Linux Python 3.13

Fixes #4319

The unsloth_zoo[intelgpu] extra pulls in triton>=3.0.0 from PyPI, but
PyPI triton 3.6.0 doesn't have Python 3.13 wheels. This causes pip to
fail when installing unsloth[intelgputorch210] on Python 3.13.

Add a direct triton wheel URL for Python 3.13 to all Intel GPU extras
(intelgputorch260, intelgputorch270, intelgputorch280, intelgputorch290,
intelgputorch210) to override the PyPI dependency.

Fixes unslothai#4319
@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 enables Python 3.13 support for Intel GPU installations by resolving a critical dependency issue with the triton library. By explicitly providing a compatible triton wheel, it ensures that the necessary components can be correctly installed, expanding the range of supported Python environments for users leveraging Intel GPUs.

Highlights

  • Python 3.13 Compatibility: Resolved an installation failure for Intel GPU extras on Python 3.13 by addressing the absence of compatible triton 3.6.0 wheels on PyPI.
  • Triton Dependency Update: Added direct triton 3.2.0 wheel URLs for Python 3.13 to five Intel GPU extra dependency groups: intelgputorch260, intelgputorch270, intelgputorch280, intelgputorch290, and intelgputorch210.
Changelog
  • pyproject.toml
    • Added conditional triton wheel dependencies for Python 3.13 to the intelgputorch260 extra.
    • Added conditional triton wheel dependencies for Python 3.13 to the intelgputorch270 extra.
    • Added conditional triton wheel dependencies for Python 3.13 to the intelgputorch280 extra.
    • Added conditional triton wheel dependencies for Python 3.13 to the intelgputorch290 extra.
    • Added conditional triton wheel dependencies for Python 3.13 to the intelgputorch210 extra.
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.

@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 correctly addresses an installation failure on Python 3.13 for Intel GPU extras by pinning a compatible version of the triton dependency. My review includes two main suggestions. First, for security, a file hash should be added to the direct wheel URL, which is a high-priority issue. Second, to improve maintainability, the duplicated dependency line across five extras should be refactored into a single, reusable optional dependency group. These changes will make the project more secure and easier to manage in the long run.

Comment thread pyproject.toml
"unsloth_zoo[intelgpu]",
"unsloth[huggingfacenotorch]",

"triton @ https://download.pytorch.org/whl/triton-3.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl ; 'linux' in sys_platform and python_version == '3.13' 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.

high

For security, it's crucial to add a file hash to this direct URL dependency. Without a hash, your project is vulnerable to supply-chain attacks if the file at the URL is ever compromised. Other dependencies in this file already follow this best practice.

Please calculate the SHA256 hash for the wheel and append it to the URL like this:

"...whl#sha256=<your_hash_here> ; ..."

You can generate the hash with pip hash <URL>. This should be done for all 5 new triton dependencies.

Comment thread pyproject.toml
"unsloth_zoo[intelgpu]",
"unsloth[huggingfacenotorch]",

"triton @ https://download.pytorch.org/whl/triton-3.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl ; 'linux' in sys_platform and python_version == '3.13' 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.

medium

This dependency line is duplicated in 5 different intelgputorch... extras. To improve maintainability, I recommend creating a new, dedicated optional-dependency group for this Python 3.13 triton wheel and then referencing it.

For example, you could add a new group:

[project.optional-dependencies]
...
intelgputritonpy313 = [
    "triton @ https://...whl#sha256=... ; 'linux' in sys_platform and python_version == '3.13' and ...",
]

Then, you can simply include it in the intelgputorch260 extra (and the other 4) like so:

intelgputorch260 = [
    "unsloth[intelgputritonpy313]",
    "unsloth_zoo[intelgpu]",
    ...
]

This will make future updates to this dependency much easier, as you'll only need to change it in one place.

@BillionClaw

Copy link
Copy Markdown
Author

Closing per ClawOSS blocklist — repo has 100% closure rate and no maintainer engagement.

@danielhanchen

Copy link
Copy Markdown
Member

Sorry on the delay, we fixed it in #5484. Appreciate the PR again!

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.

[Bug] Install from git -> python3.13

2 participants