[sgl-kernel] misc: update deepgemm version for sgl-kernel#9340
[sgl-kernel] misc: update deepgemm version for sgl-kernel#9340zhyncs merged 93 commits intosgl-project:mainfrom
Conversation
There was a problem hiding this comment.
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 updates the DeepGEMM dependency within the sgl-kernel project to a newer version that unifies CUDA compatibility. This update involves significant changes to the build system to properly integrate DeepGEMM as a Python module and minor code adjustments to align with the updated DeepGEMM API and improve type hinting.
Highlights
- Updated DeepGEMM Dependency: The DeepGEMM dependency has been updated to a specific version ('cabi' tag from 'sgl-project/DeepGEMM') to ensure unified CUDA compatibility across the project.
- Refactored DeepGEMM Build System: The build and installation process for DeepGEMM in CMakeLists.txt has been refactored to compile it as a proper Python module, including linking against nvrtc for JIT compilation.
- DeepGEMM API Adaptation: The fp8_utils.py file was adjusted to use an updated DeepGEMM layout utility function, reflecting API changes in the new DeepGEMM version.
- Improved Type Hinting: Type hinting in mxfp4_tensor.py was enhanced by explicitly importing 'Optional' from the typing module and using it for a function parameter, improving code clarity.
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. 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
-
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. ↩
There was a problem hiding this comment.
Code Review
This pull request updates the DeepGEMM dependency to a newer version, likely to support Blackwell GPUs and unify CUDA version requirements. The changes involve updating an API call in fp8_utils.py, simplifying the dependency fetching in CMakeLists.txt, and changing how DeepGEMM is built and integrated from a simple directory copy to a compiled C++ extension. The changes are logical and consistent with the goal. I have one suggestion to improve the build script's robustness.
| install( | ||
| DIRECTORY ${repo-deepgemm_SOURCE_DIR}/deep_gemm/ | ||
| DESTINATION deep_gemm | ||
| ) |
There was a problem hiding this comment.
It's good practice to exclude version control and cache directories from the installation. Other install commands in this file use PATTERN to exclude .git and __pycache__ directories. It would be best to add these back to avoid including unnecessary files in the distribution and maintain consistency.
install(DIRECTORY ${repo-deepgemm_SOURCE_DIR}/deep_gemm/
DESTINATION deep_gemm
PATTERN ".git*" EXCLUDE
PATTERN "__pycache__" EXCLUDE)
|
|
|
@zhyncs @FlamingoPg My machine has cuda 12.8 and python 3.12, and I installed sglang from source. |
|
@namanlalitnyu use the latest main please and install sgl-kernel==0.3.7 |
|
@zhyncs thanks for your comment! |
…l-project#9340)" This reverts commit aa3eba8.
…l-project#9340)" This reverts commit aa3eba8.
…t#9340) Co-authored-by: Yineng Zhang <me@zhyncs.com> Co-authored-by: fzyzcjy <ch271828n@outlook.com>



Motivation
DeepGEMM updated for unify cuda version.
So we need upd for TORCH LIBRARY.
It depends on: #9167
Modifications
Accuracy Tests
Benchmarking and Profiling
Checklist