Skip to content

chore: upgrade torch 2.8.0#8836

Merged
zhyncs merged 4 commits intomainfrom
zhyncs/torch28
Aug 6, 2025
Merged

chore: upgrade torch 2.8.0#8836
zhyncs merged 4 commits intomainfrom
zhyncs/torch28

Conversation

@zhyncs
Copy link
Copy Markdown
Collaborator

@zhyncs zhyncs commented Aug 5, 2025

Motivation

Modifications

Accuracy Test

Benchmark & Profiling

Checklist

@zhyncs zhyncs requested a review from merrymercy as a code owner August 5, 2025 23:37
@zhyncs zhyncs self-assigned this Aug 5, 2025
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.

Summary of Changes

Hello @zhyncs, 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!

I've updated the project's dependencies to use a newer version of PyTorch. This involves bumping the minimum required Python version and adjusting the installation script for CI to ensure compatibility with the new PyTorch version.

Highlights

  • Python Version Requirement: The minimum required Python version for the project has been updated from 3.8 to 3.9 in the pyproject.toml file.
  • PyTorch Dependency Upgrade: The core 'torch' and 'torchaudio' dependencies have been upgraded from version 2.7.1 to 2.8.0 for both the 'srt' and 'blackwell' environments.
  • torchvision Dependency Adjustment: The 'torchvision' dependency for the 'srt' environment no longer specifies a fixed version, providing more flexibility for its resolution.
  • CI Installation Script Update: The CI installation script has been modified to include an extra index URL (https://download.pytorch.org/whl/test/cu126) when installing the 'python[dev]' package, which is likely necessary to correctly resolve and install the new PyTorch version in the CI environment.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue 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 or fill out our survey to provide feedback.

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 upgrades PyTorch from version 2.7.1 to 2.8.0. The changes primarily involve updating the pyproject.toml file with the new dependency versions and modifying the CI script to use a test channel for PyTorch installation. My review identifies a couple of issues in pyproject.toml related to torchvision dependencies. Specifically, torchvision is unpinned in one dependency group and pinned to a likely incompatible version in another. These inconsistencies could lead to build failures or runtime errors and should be addressed. Additionally, I noticed that the documentation in docs/start/install.md still refers to the old torch version and should be updated to reflect this upgrade.

"torchvision==0.22.1",
"torch==2.8.0",
"torchaudio==2.8.0",
"torchvision",
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

torchvision is unpinned, which can lead to non-reproducible builds. It's recommended to pin it to a specific version compatible with torch==2.8.0. For example, torchvision==0.23.0 seems to be available on the PyTorch test channel. This would also make it consistent with the blackwell dependency group which has a pinned version (though that one also needs an update).

"torchvision==0.23.0",

Comment on lines +69 to +70
"torch==2.8.0",
"torchaudio==2.8.0",
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

While torch and torchaudio are upgraded to 2.8.0, torchvision on the next line is kept at 0.22.1, which is likely incompatible. This can cause installation or runtime errors. Please update torchvision to a compatible version. This is also inconsistent with the srt dependency group where torchvision is unpinned.

@zhyncs zhyncs merged commit 3ae8e3e into main Aug 6, 2025
0 of 4 checks passed
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@zhyncs zhyncs deleted the zhyncs/torch28 branch August 6, 2025 00:32
@wuz15
Copy link
Copy Markdown

wuz15 commented Aug 6, 2025

@zhyncs Did you do the test before change it?

@EduardDurech
Copy link
Copy Markdown
Contributor

EduardDurech commented Aug 13, 2025

@zhyncs @wuz15 doesn't work except with #8874 , could you please merge? It's been a week

narutolhy pushed a commit to narutolhy/sglang that referenced this pull request Aug 17, 2025
MahmoudAshraf97 pushed a commit to MahmoudAshraf97/sglang that referenced this pull request Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants