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
f78c0be8
Unverified
Commit
f78c0be8
authored
Mar 04, 2025
by
Michael Goin
Committed by
GitHub
Mar 03, 2025
Browse files
Fix benchmark_moe.py tuning for CUDA devices (#14164)
parent
66233af7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
benchmarks/kernels/benchmark_moe.py
benchmarks/kernels/benchmark_moe.py
+3
-1
No files found.
benchmarks/kernels/benchmark_moe.py
View file @
f78c0be8
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
import
argparse
import
argparse
import
time
import
time
from
contextlib
import
nullcontext
from
datetime
import
datetime
from
datetime
import
datetime
from
itertools
import
product
from
itertools
import
product
from
typing
import
Any
,
TypedDict
from
typing
import
Any
,
TypedDict
...
@@ -412,7 +413,8 @@ class BenchmarkWorker:
...
@@ -412,7 +413,8 @@ class BenchmarkWorker:
hidden_size
,
search_space
,
hidden_size
,
search_space
,
is_fp16
,
topk
)
is_fp16
,
topk
)
with
torch
.
cuda
.
device
(
self
.
device_id
):
with
torch
.
cuda
.
device
(
self
.
device_id
)
if
current_platform
.
is_rocm
(
)
else
nullcontext
():
for
config
in
tqdm
(
search_space
):
for
config
in
tqdm
(
search_space
):
try
:
try
:
kernel_time
=
benchmark_config
(
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