Skip to content

Single Batch Overlap (SBO): Overlaping of Down GEMM with Combine Send - #483

Merged
wangfakang merged 9 commits into
deepseek-ai:antgroup-optfrom
Zqy11:antgroup-overlap
Nov 21, 2025
Merged

Single Batch Overlap (SBO): Overlaping of Down GEMM with Combine Send#483
wangfakang merged 9 commits into
deepseek-ai:antgroup-optfrom
Zqy11:antgroup-overlap

Conversation

@Zqy11

@Zqy11 Zqy11 commented Nov 6, 2025

Copy link
Copy Markdown

The DeepEP implementation for SBO (DeepEP #390) will be merged into the antgroup-opt branch.

Co-authored-by: Sulfur6 <huangchun50@gmail.com>
Co-authored-by: AniZpZ <aniz1905@gmail.com>
Comment thread csrc/kernels/internode_ll.cu
Comment thread csrc/kernels/internode_ll.cu Outdated
Comment thread csrc/kernels/internode_ll.cu Outdated
Comment thread csrc/kernels/internode_ll.cu
Comment thread csrc/kernels/internode_ll.cu Outdated
Comment thread csrc/kernels/internode_ll.cu
for (int token_idx = offset + sub_warp_id; token_idx < offset + num_tokens_to_send; token_idx += num_warps_per_group) {
if (overlap or (not is_rank_masked<true>(mask_buffer_ptr, dst_rank))) {
auto token_start_idx = overlap ? local_expert_signal_idx * block_m : offset;
auto token_end_idx = overlap ? min((local_expert_signal_idx + 1) * block_m, num_tokens_per_expert) : (offset + num_tokens_to_send);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi~ I have tried this great feature, and foud that combine_send was slower than the non-overlap situation, maybe block_m is too big for one SM in each itertions? I

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may consider increasing num_sms from the default value of 3 to 4-6. When block_m is set to 64, given that num_warps is 32: if num_token <= 32, one SM sends a single round; if 32 < num_token <= 64, one SM needs to send two rounds. Two rounds may take slightly longer than the origin combined send, but you can increase parallelism by raising num_sms.

@wangfakang wangfakang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks.

@wangfakang
wangfakang merged commit 9f2fc4b into deepseek-ai:antgroup-opt Nov 21, 2025
jiafuzha pushed a commit to jiafuzha/DeepEP that referenced this pull request Jul 23, 2026
…deepseek-ai#483)

* feat: Overlap down gemm and combine send

Co-authored-by: Sulfur6 <huangchun50@gmail.com>
Co-authored-by: AniZpZ <aniz1905@gmail.com>

* Add validation to new parameters

Co-authored-by: sky <fakangwang@gmail.com>

* Optimize judgment logic

Co-authored-by: sky <fakangwang@gmail.com>

* add comments to explain the changes in NUM_WORKSPACE_BYTES

* shared_vaild_signal_prefix_sum added to the end of smem_buffer

* shared_vaild_signal_prefix_sum added to the end of smem_buffer

* fix format

* bugfix

---------

Co-authored-by: Sulfur6 <huangchun50@gmail.com>
Co-authored-by: AniZpZ <aniz1905@gmail.com>
Co-authored-by: sky <fakangwang@gmail.com>
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.

3 participants