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
8d705996
Unverified
Commit
8d705996
authored
Aug 02, 2025
by
Jee Jee Li
Committed by
GitHub
Aug 02, 2025
Browse files
[Misc] Minor enhancement of benchmark_moe (#22068)
Signed-off-by:
Jee Jee Li
<
pandaleefree@gmail.com
>
parent
38c8bce8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
benchmarks/kernels/benchmark_moe.py
benchmarks/kernels/benchmark_moe.py
+8
-1
No files found.
benchmarks/kernels/benchmark_moe.py
View file @
8d705996
...
...
@@ -22,6 +22,13 @@ from vllm.utils import FlexibleArgumentParser
FP8_DTYPE
=
current_platform
.
fp8_dtype
()
def
ensure_divisibility
(
numerator
,
denominator
):
"""Ensure that numerator is divisible by the denominator."""
assert
numerator
%
denominator
==
0
,
(
"intermediate_size {} is not divisible by tp {}."
.
format
(
numerator
,
denominator
)
)
class
BenchmarkConfig
(
TypedDict
):
BLOCK_SIZE_M
:
int
BLOCK_SIZE_N
:
int
...
...
@@ -603,7 +610,7 @@ def main(args: argparse.Namespace):
topk
=
config
.
num_experts_per_tok
intermediate_size
=
config
.
intermediate_size
shard_intermediate_size
=
2
*
intermediate_size
//
args
.
tp_size
ensure_divisibility
(
intermediate_size
,
args
.
tp_size
)
hidden_size
=
config
.
hidden_size
dtype
=
torch
.
float16
if
current_platform
.
is_rocm
()
else
config
.
torch_dtype
use_fp8_w8a8
=
args
.
dtype
==
"fp8_w8a8"
...
...
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