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
6d3da472
Unverified
Commit
6d3da472
authored
Aug 16, 2025
by
Jee Jee Li
Committed by
GitHub
Aug 16, 2025
Browse files
[Misc] Add --save-dir option to benchmark_moe (#23020)
Signed-off-by:
Jee Jee Li
<
pandaleefree@gmail.com
>
parent
78863f8c
Changes
1
Hide 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 @
6d3da472
...
...
@@ -3,6 +3,7 @@
import
argparse
import
json
import
os
import
time
from
contextlib
import
nullcontext
from
datetime
import
datetime
...
...
@@ -542,6 +543,7 @@ def save_configs(
use_fp8_w8a8
:
bool
,
use_int8_w8a16
:
bool
,
block_quant_shape
:
list
[
int
],
save_dir
:
str
,
)
->
None
:
dtype_str
=
get_config_dtype_str
(
dtype
,
use_int8_w8a16
=
use_int8_w8a16
,
use_fp8_w8a8
=
use_fp8_w8a8
...
...
@@ -552,7 +554,8 @@ def save_configs(
filename
=
get_config_file_name
(
num_experts
,
shard_intermediate_size
//
2
,
dtype_str
,
block_quant_shape
)
os
.
makedirs
(
save_dir
,
exist_ok
=
True
)
filename
=
os
.
path
.
join
(
save_dir
,
filename
)
print
(
f
"Writing best config to
{
filename
}
..."
)
with
open
(
filename
,
"w"
)
as
f
:
json
.
dump
(
configs
,
f
,
indent
=
4
)
...
...
@@ -707,6 +710,7 @@ def main(args: argparse.Namespace):
use_fp8_w8a8
,
use_int8_w8a16
,
block_quant_shape
,
args
.
save_dir
,
)
end
=
time
.
time
()
print
(
f
"Tuning took
{
end
-
start
:.
2
f
}
seconds"
)
...
...
@@ -748,6 +752,9 @@ if __name__ == "__main__":
"--dtype"
,
type
=
str
,
choices
=
[
"auto"
,
"fp8_w8a8"
,
"int8_w8a16"
],
default
=
"auto"
)
parser
.
add_argument
(
"--use-deep-gemm"
,
action
=
"store_true"
)
parser
.
add_argument
(
"--save-dir"
,
type
=
str
,
default
=
"./"
,
help
=
"Directory to save tuned results"
)
parser
.
add_argument
(
"--seed"
,
type
=
int
,
default
=
0
)
parser
.
add_argument
(
"--batch-size"
,
type
=
int
,
nargs
=
"+"
,
required
=
False
)
parser
.
add_argument
(
"--tune"
,
action
=
"store_true"
)
...
...
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