Skip to content

[SM100] Keep the normal shared memory budget for block_m 240 Mega MoE on CC 10.7 - #125

Merged
zcnrex merged 1 commit into
sgl-project:devfrom
zcnrex:chunan/mega-moe-bm240-normal-smem
Oct 27, 2026
Merged

zcnrex merged 1 commit into
sgl-project:devfrom
zcnrex:chunan/mega-moe-bm240-normal-smem

Conversation

@zcnrex

@zcnrex zcnrex commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

On CC 10.7, #120 gives every Mega MoE config the oversized shared-memory budget (334848 B). For block_m 240, the prefill-sized config, that makes the kernel slower. This PR keeps the normal budget (232448 B) for block_m 240 and leaves every other block_m on the oversized budget.

  • get_smem_capacity_for_mega_moe(block_m) returns SM100ArchSpec::smem_capacity when block_m == 240.
  • The launch path is unchanged: at the normal size, get_smem_mode_for_mega_moe returns no mode and the launch falls back to jit->launch.

Motivation

On DeepSeek-V4.1-Flash prefill on VR200 (sm_107a, CUDA 13.4), the oversized budget nearly doubles the stage count of the block_m 240 kernel. That kernel gets slower, and prefill throughput drops a few percent compared with the normal budget. Smaller block_m configs, used at decode, keep their gain from #120. Only fp8xfp4 was measured.

Validation

sm_107a, CUDA 13.4, CUTLASS 4.8.1:

🤖 Generated with Claude Code

@zcnrex
zcnrex marked this pull request as ready for review October 27, 2026 23:15
@zcnrex
zcnrex merged commit 438cfd9 into sgl-project:dev Oct 27, 2026
@zcnrex
zcnrex deleted the chunan/mega-moe-bm240-normal-smem branch October 27, 2026 23:15
zcnrex added a commit that referenced this pull request Oct 27, 2026
… on CC 10.7 (#125)

Co-authored-by: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 438cfd9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant