Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
8f66f64b
Commit
8f66f64b
authored
Sep 06, 2025
by
王敏
Browse files
修复all2all报维度不匹配问题
parent
578d3e97
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
vllm/model_executor/layers/fused_moe/ep_moe/layer.py
vllm/model_executor/layers/fused_moe/ep_moe/layer.py
+1
-1
vllm/model_executor/layers/fused_moe/ep_moe/token_dispatcher.py
...odel_executor/layers/fused_moe/ep_moe/token_dispatcher.py
+6
-7
No files found.
vllm/model_executor/layers/fused_moe/ep_moe/layer.py
View file @
8f66f64b
...
...
@@ -180,7 +180,7 @@ class EPMoE(FusedMoE):
routed_scaling_factor
:
Optional
[
float
]
=
None
,
enable_eplb
:
bool
=
False
,
num_redundant_experts
:
int
=
0
,
moe_permute_fusion
:
bool
=
Fals
e
,
moe_permute_fusion
:
bool
=
Tru
e
,
moe_shared_expert_overlap
:
bool
=
False
):
super
().
__init__
(
num_experts
,
top_k
,
hidden_size
,
...
...
vllm/model_executor/layers/fused_moe/ep_moe/token_dispatcher.py
View file @
8f66f64b
...
...
@@ -212,7 +212,6 @@ class MoEAlltoAllTokenDispatcher(MoETokenDispatcher):
if
self
.
use_all_gather
:
# Gather is not supported for some devices such as TPUs.
# Use all-gather instead.
num_global_tokens_per_expert
=
expert_parallel_all_gather
(
num_local_tokens_per_expert
)
\
.
reshape
(
self
.
ep_size
,
self
.
tp_size
,
self
.
num_experts
)
\
.
transpose
(
0
,
1
)
...
...
@@ -327,7 +326,7 @@ class MoEAlltoAllTokenDispatcher(MoETokenDispatcher):
###test##############
#cuda_dtoh_stream.synchronize()
#
cuda_dtoh_sync_event.synchronize()
cuda_dtoh_sync_event
.
synchronize
()
###test##############
global_input_tokens
=
all_to_all
(
...
...
@@ -462,10 +461,10 @@ class MoEAlltoAllTokenDispatcher(MoETokenDispatcher):
self
.
num_global_tokens_per_local_expert
,
record_stream
=
on_side_stream
)
#
cuda_dtoh_sync_event.record()
cuda_dtoh_sync_event
.
record
()
if
point
==
self
.
cuda_sync_point
:
# Synchronize with the dtoh stream at self.cuda_sync_point.
cuda_dtoh_stream
.
synchronize
()
#
if point == self.cuda_sync_point:
#
# Synchronize with the dtoh stream at self.cuda_sync_point.
#
cuda_dtoh_stream.synchronize()
return
tokens_per_expert
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment