From 3d64d366e067a8121d923d7306fbcac0867411c6 Mon Sep 17 00:00:00 2001 From: Richard Zou Date: Sun, 8 Jun 2025 04:06:48 -0400 Subject: [PATCH] [Misc] Change tests/compile to use VLLM_V1 by default (#19302) Signed-off-by: rzou --- tests/compile/conftest.py | 15 --------------- tests/compile/piecewise/test_simple.py | 2 ++ 2 files changed, 2 insertions(+), 15 deletions(-) delete mode 100644 tests/compile/conftest.py diff --git a/tests/compile/conftest.py b/tests/compile/conftest.py deleted file mode 100644 index d86ca3710923..000000000000 --- a/tests/compile/conftest.py +++ /dev/null @@ -1,15 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# SPDX-FileCopyrightText: Copyright contributors to the vLLM project -import pytest - - -# TEST V1: this should be removed. Right now V1 overrides -# all the torch compile logic. We should re-enable this -# as we add torch compile support back to V1. -@pytest.fixture(scope="function", autouse=True) -def use_v0_only(monkeypatch): - """ - Since this module is V0 only, set VLLM_USE_V1=0 for - all tests in the module. - """ - monkeypatch.setenv('VLLM_USE_V1', '0') diff --git a/tests/compile/piecewise/test_simple.py b/tests/compile/piecewise/test_simple.py index a050646e5520..9633f139873c 100644 --- a/tests/compile/piecewise/test_simple.py +++ b/tests/compile/piecewise/test_simple.py @@ -13,6 +13,7 @@ from vllm.compilation.counter import compilation_counter from vllm.compilation.decorators import support_torch_compile from vllm.config import (CompilationConfig, CompilationLevel, VllmConfig, set_current_vllm_config) +from vllm.envs import VLLM_USE_V1 from vllm.utils import direct_register_custom_op global_counter = 0 @@ -76,6 +77,7 @@ class SillyModel(nn.Module): def _test_simple_piecewise_compile(*, use_inductor): + assert VLLM_USE_V1 vllm_config = VllmConfig(compilation_config=CompilationConfig( level=CompilationLevel.PIECEWISE,