Skip to content

Comments

[chore] update torch version to 2.9#12969

Merged
Fridge003 merged 54 commits intosgl-project:mainfrom
FlamingoPg:torch29
Nov 25, 2025
Merged

[chore] update torch version to 2.9#12969
Fridge003 merged 54 commits intosgl-project:mainfrom
FlamingoPg:torch29

Conversation

@FlamingoPg
Copy link
Collaborator

Motivation

As titled, update torch version to 2.9

Modifications

Accuracy Tests

Benchmarking and Profiling

Checklist

@FlamingoPg FlamingoPg self-assigned this Nov 10, 2025
@github-actions github-actions bot added dependencies Pull requests that update a dependency file sgl-kernel labels Nov 10, 2025
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @FlamingoPg, 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 focuses on a routine dependency upgrade, specifically updating the PyTorch framework to version 2.9.0 across the project. This involves modifying the primary Python dependency configuration and adjusting the kernel build script to reflect the new PyTorch version for various CUDA environments, streamlining the development and deployment process with the latest stable release.

Highlights

  • PyTorch Version Update: The torch and torchaudio dependencies in python/pyproject.toml have been updated from version 2.8.0 to 2.9.0.
  • Build Script Alignment: The sgl-kernel/build.sh script has been modified to install torch==2.9.0 for CUDA versions 13.0, 12.8, and the default case (likely 12.6), ensuring consistency with the updated PyTorch version.
  • CUDA 12.9 Removal: The specific installation path for CUDA_VERSION = "12.9" has been removed from the sgl-kernel/build.sh script.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/pr-test-pd-router.yml
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
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 updates the Torch dependency to version 2.9.0. The changes in python/pyproject.toml and sgl-kernel/build.sh are consistent with this goal. I've provided one suggestion in sgl-kernel/build.sh to refactor the logic for setting the TORCH_INSTALL variable, which will improve code clarity and make future updates easier. Additionally, while not part of this PR's changes, you might want to review other dependency files like sgl-kernel/pyproject.toml and sgl-kernel/pyproject_rocm.toml to ensure their Torch version constraints are also updated for consistency across the project.

@Fridge003
Copy link
Collaborator

Fridge003 commented Nov 12, 2025

@FlamingoPg Seems triton is failing with this error https://github.com/sgl-project/sglang/actions/runs/19317390340/job/55254572458?pr=12969

We have met similar situations before. It's caused by https://github.com/triton-lang/triton/pull/8536/files, and we solved it by pinning the version of Triton to the commit before this culprit.

@FlamingoPg
Copy link
Collaborator Author

@FlamingoPg Seems triton is failing with this error https://github.com/sgl-project/sglang/actions/runs/19317390340/job/55254572458?pr=12969

We have met similar situations before. It's caused by https://github.com/triton-lang/triton/pull/8536/files, and we solved it by pinning the version of Triton to the commit before this culprit.

I see, looks we need to update triton_kernels in CMakeLists.txt https://github.com/triton-lang/triton/blob/3543fe1d52dd84fd4e5b792f916cafe2824e46ea/python/triton_kernels/triton_kernels/numerics_details/flexpoint.py#L54

@Fridge003 Fridge003 requested a review from mickqian as a code owner November 22, 2025 07:32
@github-actions github-actions bot added the diffusion SGLang Diffusion label Nov 22, 2025
@Fridge003 Fridge003 added the format Auto Format Code label Nov 24, 2025
@Fridge003
Copy link
Collaborator

Fridge003 commented Nov 25, 2025

Updates related to Torch 2.9

  • Upgrade dependencies in pyproject.toml/Dockerfiles. Torch -> 2.9.1, triton -> 3.5.1
  • Skip flaky multimodal test cases: Qwen/Qwen-Image-Edit, Wan-AI/Wan2.2-I2V-A14B-Diffusers
  • Forcefully reinstall nvidia-cudnn-cu12==9.16.0.29, to avoid slow Conv3D kernel
  • Skip mooncake all2all test. Mooncake will support torch 2.9 shortly
  • Fix some flaky Lora tests

@Fridge003
Copy link
Collaborator

Fridge003 commented Nov 25, 2025

https://github.com/sgl-project/sglang/pull/12969/checks?check_run_id=56374158981
A few flaky CIs left. Can be fixed in following PRs.

@Fridge003 Fridge003 merged commit 36b1bcd into sgl-project:main Nov 25, 2025
13 of 71 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file diffusion SGLang Diffusion format Auto Format Code high priority lora quant LLM Quantization run-ci sgl-kernel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants