Repository navigation
[EP] Optimize MUSA legacy EP dispatch and combine - #4125
Merged
stmatengss merged 8 commits intoOct 10, 2026
Merged
Conversation
UNIDY2002
force-pushed
the
feature/musa-ep-optimization
branch
from
September 15, 2026 03:59
750d765 to
cdf7ffd
Compare
UNIDY2002
force-pushed
the
feature/musa-ep-optimization
branch
3 times, most recently
from
September 15, 2026 04:45
3e53fd5 to
8f854de
Compare
UNIDY2002
force-pushed
the
feature/musa-ep-optimization
branch
from
September 15, 2026 04:56
8f854de to
5d508b8
Compare
UNIDY2002
force-pushed
the
feature/musa-ep-optimization
branch
from
September 15, 2026 07:26
2051d17 to
ea65651
Compare
UNIDY2002
marked this pull request as ready for review
September 15, 2026 07:32
UNIDY2002
requested review from
alogfans,
chestnut-Q,
doujiang24,
staryxchen,
ympcMark and
yuechen-sys
as code owners
September 15, 2026 07:32
UNIDY2002
requested review from
Aionw,
Ann-1024,
luketong777,
stmatengss and
ykwd
as code owners
September 15, 2026 09:02
alogfans
approved these changes
Sep 15, 2026
yuechen-sys
reviewed
Oct 10, 2026
yuechen-sys
left a comment
Member
There was a problem hiding this comment.
Thanks for your contribution.
I found a critical issue need to be resolved.
stmatengss
approved these changes
Oct 10, 2026
6 of 10 tasks
UNIDY2002
pushed a commit
that referenced
this pull request
Oct 12, 2026
…sh (#4579) mooncake_ep_kernel.cu imports every mooncake::device::mc_* helper it calls into namespace mooncake with an explicit using-declaration. #4125 added mc_fence_noflush() to the MUSA ops header and called it from the dispatch kernel under #ifdef MOONCAKE_EP_USE_MUSA, but only added the using-declaration for its sibling mc_atomic_add_relaxed. The call site is a no-argument unqualified call, so argument-dependent lookup cannot find the name, and because mc_fence_noflush is defined only in the MUSA backend header (device_ops.cuh selects musa/maca/cuda ops), only the MUSA build breaks: mooncake_ep_kernel.cu:227:17: error: use of undeclared identifier 'mc_fence_noflush'; did you mean 'device::mc_fence_noflush'? Add the missing using-declaration in the existing MUSA-only block. Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
8 of 36 tasks
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.
Description
Optimize the MUSA legacy EP dispatch and combine kernels on top of the MACA/CUDA-compatible EP device path introduced by #4091. This draft is the second stage of the EP portability work and is intentionally based on
feature/maca-ep-functional-clean.The changes reduce MUSA dispatch/combine overhead and refine the MUSA device operations used by the legacy EP path.
Depends on #4091.
Module
mooncake-transfer-engine)mooncake-store)mooncake-conductor)mooncake-reshard)mooncake-ep)mooncake-pg)mooncake-integration)mooncake-p2p-store)mooncake-wheel)mooncake-common)mooncake-rl)Type of Change
How Has This Been Tested?
MUSA validation and benchmark results:
P2P, 8 ranks, BF16, 128 tokens, hidden size 7168, 288 experts, top-k 8: correctness checks passed. Dispatch reached 12.7--13.0 GB/s at 586 us; combine reached 14.9--15.4 GB/s at 0.96 ms; combined dispatch+combine reached 19.7 GB/s at 1.12 ms.
No-P2P / IBGDA, same workload: correctness checks passed. Dispatch reached 2.11--2.12 GB/s at 3.54 ms; combine reached 3.59--3.93 GB/s at 3.9 ms; combined dispatch+combine reached 3.02 GB/s at 7.30 ms.
Official MUSA DeepEP reference: the official MUSA DeepEP low-latency path reported 72.3--75.5 GB/s dispatch on the same intranode 8-GPU class of workload. This is a platform reference; the implementations and measured paths are different.
Unit tests pass
Integration tests pass (if applicable)
Manual testing done (MUSA 8-rank correctness and benchmark validation)
Checklist
./scripts/code_format.shAI Assistance Disclosure