Skip to content

Delete CUTLASS FP8 blockwise for SM90 and SM100, move SM120 to JIT and add SwapAB - #30438

Merged
BBuf merged 24 commits into
mainfrom
brayden/conslidate-fp8-blockwise
Jul 14, 2026
Merged

Delete CUTLASS FP8 blockwise for SM90 and SM100, move SM120 to JIT and add SwapAB#30438
BBuf merged 24 commits into
mainfrom
brayden/conslidate-fp8-blockwise

Conversation

@b8zhong

@b8zhong b8zhong commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Recommended migration plan

  • SM90 has DeepGEMM, which has better perf, more tile sizes
  • SM100 has DeepGEMM (which has a lot better perf, more tile sizes) and also trtllm-gen.

Only SM120 needs this for now. Also, there has been no development on this kernel for 1 year+.

For future development (Rubin, etc), we'd use Cute-DSL. Ideally, some kernel experts can also help us migrate this one to Cute-DSL (as long as the perf is the same)

For M = 1 on Qwen/Qwen3.6-27B-FP8, speed increase from 42 to 46.76 TPS.

Screenshot 2026-07-07 at 4 07 01 PM

And here is the difference of using StreamK scheduler on M >= 64 (when below this threshold, we currently use SwapAB to transpose the A and B operand for better MMA utilization)
image


CI States

Latest PR Test (Base): 🚫 Run #29298468640
Latest PR Test (Extra): ❌ Run #29298468570

Brayden Zhong and others added 3 commits July 7, 2026 22:40
…mm files

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Dedup getSMVersion/alloc_workspace_tensor into shared utils.cuh, delete
dead fp8_blockwise benchmark-only entry points and force_noswap branch,
reuse the canonical is_sm120_supported() instead of local reimpls, fix
CI runner_config to 1-gpu-small and drop the stale disabled= reason,
and trim/remove explanatory comments in the new fp8 blockwise files.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@b8zhong b8zhong changed the title Delete CUTLASS FP8 blockwise for SM90 and SM100, move SM120 to JIT Delete CUTLASS FP8 blockwise for SM90 and SM100, move SM120 to JIT and add SwapAB Jul 7, 2026
Brayden Zhong added 2 commits July 7, 2026 23:07
@b8zhong

b8zhong commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator Author

/rerun-test test/registered/jit/test_fp8_blockwise_gemm.py

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Results for /rerun-test test/registered/jit/test_fp8_blockwise_gemm.py:

🚀 1-gpu-5090 (1 test): ✅ View workflow run

cd test/ && python3 registered/jit/test_fp8_blockwise_gemm.py

@b8zhong
b8zhong marked this pull request as ready for review July 7, 2026 23:14
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@b8zhong b8zhong added the run-ci label Jul 7, 2026
@b8zhong

b8zhong commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator Author

@b8zhong

b8zhong commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator Author

/rerun-failed-ci

@b8zhong

b8zhong commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator Author

The multimodal tests are fixed in #30716

@b8zhong

b8zhong commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator Author

/rerun-failed-ci

@ormandj

ormandj commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Tested PR head fe82f85b56 on SGLang main 96a04cb13f with the SM120
DeepSeek-V4 stack. The path compiles, completes CUDA graph capture, and serves.

In the post-page-mask 120-step C1 trace:

  • dense FP8 GEMM union coverage: 346.420 / 1,358.530 ms = 25.50%
  • dense FP8 GEMM summed duration: 391.607 ms = 3.263 ms/token
  • median GPU step wall: 11.242 ms

Dense FP8 is the largest measured post-fix decode kernel family. These numbers
are trace accounting, not an isolated before/after measurement of this PR.

Brayden Zhong and others added 5 commits July 13, 2026 13:13
# Conflicts:
#	test/registered/quant/test_fp8_blockwise_row_padding.py
sgl-kernel/tests/test_per_token_group_quant_8bit.py and the matching
benchmark script still imported from
sglang.srt.layers.quantization.fp8_kernel, which was moved to
sglang.kernels.ops.quantization.fp8_kernel on main, breaking CI
collection after the merge.
…8-blockwise

# Conflicts:
#	python/sglang/jit_kernel/csrc/gemm/nvfp4/nvfp4_expert_quant.cuh
#	python/sglang/jit_kernel/csrc/gemm/nvfp4/nvfp4_quant_kernels.cuh
#	python/sglang/jit_kernel/csrc/gemm/nvfp4/nvfp4_scaled_mm_common.cuh
#	python/sglang/jit_kernel/csrc/moe/nvfp4_blockwise_moe.cuh
#	sgl-kernel/benchmark/bench_fp8_blockwise_gemm.py
@BBuf
BBuf disabled auto-merge July 14, 2026 01:27
@BBuf
BBuf merged commit 7431f35 into main Jul 14, 2026
63 of 178 checks passed
@BBuf
BBuf deleted the brayden/conslidate-fp8-blockwise branch July 14, 2026 01:31
@Fridge003

Copy link
Copy Markdown
Collaborator

Nice!

At1a8 added a commit to At1a8/sglang that referenced this pull request Jul 14, 2026
At1a8 added a commit to At1a8/sglang that referenced this pull request Jul 15, 2026
Chronostasys pushed a commit to MindLab-Research/sglang that referenced this pull request Aug 24, 2026
…d add SwapAB (sgl-project#30438)

Co-authored-by: Brayden Zhong <brayden.zhong@radixark.ai>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Co-authored-by: root <root@sgl-b300-inference.datacrunch.io>
Co-authored-by: Brayden Zhong <brayden@radixark.ai>
jakki-amd pushed a commit to jakki-amd/sglang that referenced this pull request Sep 9, 2026
…d add SwapAB (sgl-project#30438)

Co-authored-by: Brayden Zhong <brayden.zhong@radixark.ai>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Co-authored-by: root <root@sgl-b300-inference.datacrunch.io>
Co-authored-by: Brayden Zhong <brayden@radixark.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants