Remove DeepGEMM for indexer GEMM in piecewise NSA path - #26494
Merged
Conversation
b8zhong
requested review from
1am9trash,
Fridge003,
HaiShaw,
YAMY1234,
hubertlu-tw and
kkHuang-amd
as code owners
May 27, 2026 17:34
Collaborator
Author
|
/tag-and-rerun-ci |
Contributor
There was a problem hiding this comment.
Code Review
This pull request replaces a custom deep_gemm_wrapper matrix multiplication with PyTorch's native torch.mm in logits_head_gate_pcg. However, standard torch.mm does not support the out_dtype keyword argument, which will cause a runtime TypeError. It is recommended to perform the multiplication and cast the result using .to(torch.float32) instead.
Fridge003
approved these changes
May 28, 2026
mqhc2020
pushed a commit
to mqhc2020/sglang
that referenced
this pull request
Jun 2, 2026
…6494) Co-authored-by: b8zhong <b8zhong@users.noreply.github.com>
Chronostasys
pushed a commit
to MindLab-Research/sglang
that referenced
this pull request
Aug 24, 2026
…6494) Co-authored-by: b8zhong <b8zhong@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Remove it in piecewise CUDA graph path, which seems to be accidentally reintroduced in #23351 due to PRs merging at different times. Additionally, it will increase the warmup time
Modifications
Remove it.
Accuracy Tests
It's already been validated in #23856
Speed Tests and Profiling
Unit benchmark with CUPTI.

Results: (only N = 64 and N = 32 are relevant for indexer for DSV3.2 and GLM-5), the rest are Deepseek V4 shapes, which shows we could remove it from Deepseek V4 path later (currently not used on default path anyway)
CI States
Latest PR Test (Base): 🚫 Run #26527866613
Latest PR Test (Extra): ❌ Run #26527866300