Repository navigation
[Perf] Fix DBO overlap: capture DeepEP event before yield - #38451
Conversation
Signed-off-by: root <conway.zhu@cohere.com>
There was a problem hiding this comment.
Code Review
This pull request modifies vllm/model_executor/layers/fused_moe/prepare_finalize/deepep_ht.py to ensure that DeepEP events are captured on the compute stream before yielding and switching to communication. This change prevents over-serialization by ensuring the event only covers the current micro-batch's compute work. I have no feedback to provide as there were no review comments to evaluate.
c79010e to
934483b
Compare
|
nice job, thanks for your contribution! |
SageMoore
left a comment
There was a problem hiding this comment.
Nice find! This looks correct to me. Thanks for the contribution! CC @LucasWilkinson
LucasWilkinson
left a comment
There was a problem hiding this comment.
Thank for the fix! Overall LGTM, would be good to have @yewentao256 take a look (since dbo_get_previous_event was introduced in #27666 ; the dependency preservation seems to be correct to me)
yewentao256
left a comment
There was a problem hiding this comment.
Nice catch! Thanks for the work!
|
Thanks @yewentao256 ! I think the CI failure is unrelated, is this OK to merge? |
Let's try again before doing a force merge |
…ct#38451) Signed-off-by: root <conway.zhu@cohere.com> Signed-off-by: Rishi Puri <riship@nvidia.com>
…ct#38451) Signed-off-by: root <conway.zhu@cohere.com>
…ct#38451) Signed-off-by: root <conway.zhu@cohere.com>
…ct#38451) Signed-off-by: root <conway.zhu@cohere.com>
Purpose
From profiling trace it seemed like DeepEP HT backend wasn't fully overlapping the compute and communication.

The only thing being overlapped is one of the ubatch combine with the other ubatch non-moe compute.
Going through the DBO code it seems that the core issue is the
previous_eventthat is passed to DeepEP dispatch/combine. The way it's implemented, DeepEP will wait for the entire compute stream to finish before launching dispatch. Since we have yielded viadbo_yield_and_switch_from_compute_to_comm()right before this point, the compute stream will contain compute enqueued by the other ubatch that the current ubatch doesn't need to depend on. The fix is to move the DeepEP event capture right before yield so it correctly captures the compute tail of the current ubatch.After, the same model trace:

so now there is more overlap but the core dependency is still preserved.
Test Plan
test Qwen/Qwen3-30B-A3B-Instruct-2507-FP8 on 4xB200 DEP4
Test Result
prefill throughput test
server command
bench command
before result
after result
about 30% throughput increase
lm-eval correctness test
server command
lm-eval test command
before
after
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.