[BugFix] Allow use_cudagraph to work with dynamic VLLM_USE_V1 (#19390)
Signed-off-by: rzou <zou3519@gmail.com>
This commit is contained in:
@@ -11,6 +11,16 @@ from vllm.config import (CompilationConfig, CompilationLevel, VllmConfig,
|
||||
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])
|
||||
def test_use_cudagraphs(enabled):
|
||||
assert vllm.envs.VLLM_USE_V1
|
||||
|
||||
Reference in New Issue
Block a user