sglang icon indicating copy to clipboard operation
sglang copied to clipboard

[chore] update torch version to 2.9

Open FlamingoPg opened this issue 1 month ago • 3 comments

Motivation

As titled, update torch version to 2.9

Modifications

Accuracy Tests

Benchmarking and Profiling

Checklist

FlamingoPg avatar Nov 10 '25 08:11 FlamingoPg

Summary of Changes

Hello @FlamingoPg, I'm Gemini Code Assist[^1]! 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 :thumbsup: and :thumbsdown: 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.

[^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[bot] avatar Nov 10 '25 08:11 gemini-code-assist[bot]

@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.

Fridge003 avatar Nov 12 '25 21:11 Fridge003

@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

FlamingoPg avatar Nov 14 '25 10:11 FlamingoPg

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 avatar Nov 25 '25 08:11 Fridge003

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 avatar Nov 25 '25 22:11 Fridge003