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
f8b757bc
Unverified
Commit
f8b757bc
authored
Aug 25, 2025
by
Yineng Zhang
Committed by
GitHub
Aug 25, 2025
Browse files
fix: resolve tuning fused moe issue (#9587)
parent
ebd9dbe7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
benchmark/kernels/fused_moe_triton/tuning_fused_moe_triton.py
...hmark/kernels/fused_moe_triton/tuning_fused_moe_triton.py
+3
-3
No files found.
benchmark/kernels/fused_moe_triton/tuning_fused_moe_triton.py
View file @
f8b757bc
...
...
@@ -22,7 +22,7 @@ from sglang.srt.layers.moe.fused_moe_triton.fused_moe import (
)
from
sglang.srt.layers.moe.moe_runner
import
MoeRunnerConfig
from
sglang.srt.layers.moe.topk
import
TopKConfig
,
select_experts
from
sglang.srt.utils
import
is_hip
,
is_rocm
from
sglang.srt.utils
import
is_hip
_is_hip
=
is_hip
()
...
...
@@ -287,7 +287,7 @@ class BenchmarkWorker:
)
else
:
config
=
op_config
[
min
(
op_config
.
keys
(),
key
=
lambda
x
:
abs
(
x
-
num_tokens
))]
with
torch
.
cuda
.
device
(
self
.
device_id
)
if
is_
rocm
()
else
nullcontext
():
with
torch
.
cuda
.
device
(
self
.
device_id
)
if
is_
hip
()
else
nullcontext
():
kernel_time
=
benchmark_config
(
config
,
num_tokens
,
...
...
@@ -319,7 +319,7 @@ class BenchmarkWorker:
)
->
Dict
[
str
,
int
]:
best_config
=
None
best_time
=
float
(
"inf"
)
with
torch
.
cuda
.
device
(
self
.
device_id
)
if
is_
rocm
()
else
nullcontext
():
with
torch
.
cuda
.
device
(
self
.
device_id
)
if
is_
hip
()
else
nullcontext
():
for
config
in
tqdm
(
search_space
):
try
:
kernel_time
=
benchmark_config
(
...
...
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