Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
b7170cc8
Unverified
Commit
b7170cc8
authored
Jul 31, 2025
by
Trevor Morris
Committed by
GitHub
Jul 31, 2025
Browse files
[bugfix] Fix flashinfer cutlass EP moe after MoE refactor (#8630)
parent
5c14515f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
python/sglang/srt/layers/moe/fused_moe_triton/layer.py
python/sglang/srt/layers/moe/fused_moe_triton/layer.py
+2
-1
python/sglang/srt/server_args.py
python/sglang/srt/server_args.py
+5
-0
No files found.
python/sglang/srt/layers/moe/fused_moe_triton/layer.py
View file @
b7170cc8
...
...
@@ -119,7 +119,8 @@ class FusedMoE(torch.nn.Module):
*
self
.
num_local_experts
:
(
self
.
moe_ep_rank
+
1
)
*
self
.
num_local_experts
]
=
torch
.
arange
(
0
,
self
.
num_local_experts
,
dtype
=
torch
.
int32
,
device
=
"cpu"
)
self
.
expert_map_gpu
=
self
.
expert_map_cpu
.
to
(
device
=
"cuda"
)
if
not
self
.
enable_flashinfer_cutlass_moe
:
self
.
expert_map_gpu
=
self
.
expert_map_cpu
.
to
(
device
=
"cuda"
)
self
.
routed_scaling_factor
=
routed_scaling_factor
assert
intermediate_size
%
self
.
moe_tp_size
==
0
...
...
python/sglang/srt/server_args.py
View file @
b7170cc8
...
...
@@ -437,6 +437,11 @@ class ServerArgs:
self
.
quantization
==
"modelopt_fp4"
),
"modelopt_fp4 quantization is required for Flashinfer MOE"
os
.
environ
[
"TRTLLM_ENABLE_PDL"
]
=
"1"
if
self
.
enable_ep_moe
:
self
.
ep_size
=
self
.
tp_size
logger
.
warning
(
f
"Flashinfer cutlass MoE and EP MoE are enabled. The expert parallel size is adjusted to be the same as the tensor parallel size[
{
self
.
tp_size
}
]."
)
if
self
.
enable_flashinfer_trtllm_moe
:
assert
self
.
enable_ep_moe
,
"EP MoE is required for Flashinfer TRTLLM MOE"
...
...
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