Fix fallback to default tactic (flashinfer autotuner) with trtllm_fp4_block_scale_moe#19189
Conversation
Summary of ChangesHello @wenscarl, 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 resolves a critical issue affecting the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request aims to fix an issue with the flashinfer autotuner by ensuring the hidden_states_scale tensor is 2D instead of being flattened. The changes across the three files are consistent with this goal. However, there are critical syntax errors in two of the files (python/sglang/srt/layers/moe/moe_runner/flashinfer_trtllm.py and python/sglang/srt/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a4_nvfp4_moe.py) where an invalid tuple slicing [:,-1] is used. This should be corrected to [:-1] to avoid a SyntaxError.
...lang/srt/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a4_nvfp4_moe.py
Outdated
Show resolved
Hide resolved
babc680 to
62234ac
Compare
|
@wenscarl Should we mark this PR as DRAFT until FlashInfer PR has been merged and SGLang has upgraded to a new FlashInfer version containing the fix? Thanks! |
|
@nvpohanh Actually this PR doesn't rely on flashinfer fix or update which add coverage to the cases when the first dim is not power of 2. |
|
Got it, then I think this PR is ready to merge. |
|
@wenscarl Could you update the PR description?
This line makes me wonder if this is blocked by FlashInfer PR. Thanks! |
|
@Fridge003 Could you assign this to the MoE expert for review? This is a small change. Thanks! |
|
/tag-and-rerun-ci |
The flashinfer autotuner expects the first dimension of the MoE tensors to be num_tokens.
Following the changes in vllm-project/vllm#35088.
Credits to @danisereb. Depends on flashinfer fix: flashinfer-ai/flashinfer#2617
cc. @Fridge003 @nvpohanh
Motivation
Modifications
Accuracy Tests
Benchmarking and Profiling
Checklist
Review Process
/tag-run-ci-label,/rerun-failed-ci,/tag-and-rerun-ci