Reorganize c++ source files in sgl-kernel with multiple folders - #4025
Merged
Merged
Conversation
merrymercy
requested review from
BBuf,
HandH1998,
ispobock,
yizhang2077 and
zhyncs
as code owners
March 3, 2025 10:53
0826joyce
pushed a commit
to 0826joyce/sglang-perf-opt
that referenced
this pull request
May 19, 2026
5 tasks
elvischenv
added a commit
to elvischenv/sglang
that referenced
this pull request
Aug 11, 2026
Unlike post1/post2, which only rebuilt the companion wheels, post3 and post4 carry real source changes. post3 reverts the SM90 CUTLASS MoE backend (flashinfer-ai/flashinfer#3738 plus dependents sgl-project#4025 and sgl-project#4080). That work first shipped in 0.6.16 — it is not in 0.6.15.post1 — so the revert returns those kernels to roughly the state this repo already runs against today, rather than regressing anything. It drops six public symbols and one parameter: preprocess_moe_weights_for_sm90_mixed_gemm_humming sm90_mixed_gemm_humming_weight_preprocess_trace_dispatch bits_from_float / float_from_bits / quant_to_fp4_val / dequant_fp4_val use_wfp4afp8_humming= on cutlass_fused_moe / cutlass_fused_moe_workspace_size SGLang uses none of them. `interleave_moe_{scales,weights}_for_sm90_mixed_gemm` move back from `fused_moe/prepare.py` to `fused_moe/core.py` but keep their signatures and stay exported from `flashinfer.fused_moe`, which is where mxfp4.py and mxfp4_flashinfer_cutlass_moe.py import them from. post4 adds `from __future__ import annotations` to `flashinfer/comm/fd_exchange.py`. That module is new in 0.6.16 and annotates `array.array[int]`, which is only subscriptable on Python 3.12+. `flashinfer/comm/mnnvl.py` imports it unconditionally, so on Python 3.10/3.11 — both allowed by our `requires-python = ">=3.10"` — importing `flashinfer.comm.mnnvl` raised TypeError: type 'array.array' is not subscriptable taking out the MNNVL comm-fusion and MoE all-to-all paths. Verified on a real 3.11 interpreter: post2's fd_exchange raises, post4's imports fine. The published Docker image is Python 3.12 and was unaffected; this only bit source installs on older interpreters. Checked against 0.6.15.post1 with the full symbol sweep: no API SGLang uses is removed, and every changed signature is purely additive. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
elvischenv
added a commit
to elvischenv/sglang
that referenced
this pull request
Aug 11, 2026
Unlike post1/post2, which only rebuilt the companion wheels, post3 and post4 carry real source changes. post3 reverts the SM90 CUTLASS MoE backend (flashinfer-ai/flashinfer#3738 plus dependents sgl-project#4025 and sgl-project#4080). That work first shipped in 0.6.16 — it is not in 0.6.15.post1 — so the revert returns those kernels to roughly the state this repo already runs against today, rather than regressing anything. It drops six public symbols and one parameter: preprocess_moe_weights_for_sm90_mixed_gemm_humming sm90_mixed_gemm_humming_weight_preprocess_trace_dispatch bits_from_float / float_from_bits / quant_to_fp4_val / dequant_fp4_val use_wfp4afp8_humming= on cutlass_fused_moe / cutlass_fused_moe_workspace_size SGLang uses none of them. `interleave_moe_{scales,weights}_for_sm90_mixed_gemm` move back from `fused_moe/prepare.py` to `fused_moe/core.py` but keep their signatures and stay exported from `flashinfer.fused_moe`, which is where mxfp4.py and mxfp4_flashinfer_cutlass_moe.py import them from. post4 adds `from __future__ import annotations` to `flashinfer/comm/fd_exchange.py`. That module is new in 0.6.16 and annotates `array.array[int]`, which is only subscriptable on Python 3.12+. `flashinfer/comm/mnnvl.py` imports it unconditionally, so on Python 3.10/3.11 — both allowed by our `requires-python = ">=3.10"` — importing `flashinfer.comm.mnnvl` raised TypeError: type 'array.array' is not subscriptable taking out the MNNVL comm-fusion and MoE all-to-all paths. Verified on a real 3.11 interpreter: post2's fd_exchange raises, post4's imports fine. The published Docker image is Python 3.12 and was unaffected; this only bit source installs on older interpreters. Checked against 0.6.15.post1 with the full symbol sweep: no API SGLang uses is removed, and every changed signature is purely additive. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.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.
Organize them into different folders