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
77f0d465
Unverified
Commit
77f0d465
authored
Jun 10, 2025
by
Richard Zou
Committed by
GitHub
Jun 11, 2025
Browse files
[BugFix] Allow use_cudagraph to work with dynamic VLLM_USE_V1 (#19390)
Signed-off-by:
rzou
<
zou3519@gmail.com
>
parent
22c3c0aa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
tests/compile/test_config.py
tests/compile/test_config.py
+10
-0
vllm/config.py
vllm/config.py
+1
-1
No files found.
tests/compile/test_config.py
View file @
77f0d465
...
@@ -11,6 +11,16 @@ from vllm.config import (CompilationConfig, CompilationLevel, VllmConfig,
...
@@ -11,6 +11,16 @@ from vllm.config import (CompilationConfig, CompilationLevel, VllmConfig,
from
.piecewise.test_simple
import
SillyModel
from
.piecewise.test_simple
import
SillyModel
def
test_use_cudagraphs_dynamic
(
monkeypatch
):
assert
vllm
.
envs
.
VLLM_USE_V1
vllm_config
=
VllmConfig
()
assert
vllm_config
.
compilation_config
.
use_cudagraph
monkeypatch
.
setenv
(
'VLLM_USE_V1'
,
'0'
)
vllm_config
=
VllmConfig
()
assert
not
vllm_config
.
compilation_config
.
use_cudagraph
@
pytest
.
mark
.
parametrize
(
"enabled"
,
[
True
,
False
])
@
pytest
.
mark
.
parametrize
(
"enabled"
,
[
True
,
False
])
def
test_use_cudagraphs
(
enabled
):
def
test_use_cudagraphs
(
enabled
):
assert
vllm
.
envs
.
VLLM_USE_V1
assert
vllm
.
envs
.
VLLM_USE_V1
...
...
vllm/config.py
View file @
77f0d465
...
@@ -3931,7 +3931,7 @@ class CompilationConfig:
...
@@ -3931,7 +3931,7 @@ class CompilationConfig:
constructor, e.g. `CompilationConfig(inductor_passes={"a": func})`."""
constructor, e.g. `CompilationConfig(inductor_passes={"a": func})`."""
# CudaGraph compilation
# CudaGraph compilation
use_cudagraph
:
bool
=
envs
.
VLLM_USE_V1
use_cudagraph
:
bool
=
field
(
default_factory
=
lambda
:
envs
.
VLLM_USE_V1
)
"""Whether to use cudagraph inside compilation.
"""Whether to use cudagraph inside compilation.
- False: cudagraph inside compilation is not used.
- False: cudagraph inside compilation is not used.
- True: cudagraph inside compilation is used. It requires
- True: cudagraph inside compilation is used. It requires
...
...
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