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
64384bbc
Unverified
Commit
64384bbc
authored
Oct 30, 2024
by
youkaichao
Committed by
GitHub
Oct 30, 2024
Browse files
[torch.compile] upgrade tests (#9858)
Signed-off-by:
youkaichao
<
youkaichao@gmail.com
>
parent
00d91c8a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
tests/compile/test_basic_correctness.py
tests/compile/test_basic_correctness.py
+14
-12
No files found.
tests/compile/test_basic_correctness.py
View file @
64384bbc
...
...
@@ -30,18 +30,20 @@ def test_compile_correctness(model, model_args, pp_size, tp_size, attn_backend,
pytest
.
skip
(
"Not correct CUDA devices for the test."
)
import
os
os
.
environ
[
"VLLM_ATTENTION_BACKEND"
]
=
attn_backend
if
not
fullgraph
:
os
.
environ
[
"VLLM_TEST_DYNAMO_FULLGRAPH_CAPTURE"
]
=
"0"
all_args
=
[[
"--enforce-eager"
]
+
model_args
+
[
"--max_model_len"
,
"1024"
]
+
[
"-pp"
,
str
(
pp_size
)]
+
[
"-tp"
,
str
(
tp_size
)]]
*
3
all_args
=
[[
"--enforce-eager"
]
+
model_args
+
[
"-pp"
,
str
(
pp_size
)]
+
[
"-tp"
,
str
(
tp_size
)]]
*
3
# don't test VLLM_TORCH_COMPILE_LEVEL == 3 case
# inductor will change the output, so we cannot compare them.
all_envs
:
List
[
Optional
[
Dict
[
str
,
str
]]]
=
[{
"VLLM_TORCH_COMPILE_LEVEL"
:
str
(
level
)
}
for
level
in
[
all_envs
:
List
[
Optional
[
Dict
[
str
,
str
]]]
=
[]
for
level
in
[
CompilationLevel
.
NO_COMPILATION
,
CompilationLevel
.
DYNAMO_AS_IS
,
CompilationLevel
.
DYNAMO_ONCE
,
]]
]:
all_envs
.
append
({
"VLLM_TORCH_COMPILE_LEVEL"
:
str
(
level
)})
if
level
!=
CompilationLevel
.
DYNAMO_ONCE
and
not
fullgraph
:
# "DYNAMO_ONCE" will always use fullgraph
all_envs
[
-
1
][
"VLLM_TEST_DYNAMO_FULLGRAPH_CAPTURE"
]
=
"0"
# type: ignore
compare_all_settings
(
model
,
all_args
,
all_envs
,
method
=
method
)
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