[BugFix] fix VLLM_USE_STANDALONE_COMPILE=0 (#38015)

Signed-off-by: Richard Zou <zou3519@gmail.com>
This commit is contained in:
Richard Zou
2026-03-24 15:08:26 -04:00
committed by GitHub
parent 71a4a2fbd0
commit 89f572dbc0
2 changed files with 48 additions and 0 deletions

View File

@@ -441,6 +441,37 @@ def test_partition_wrapper_applied_on_aot_load(
)
@create_new_process_for_each_test("spawn")
def test_standalone_compile_correctness():
"""Outputs must match regardless of VLLM_USE_STANDALONE_COMPILE."""
import json
from ..utils import compare_two_settings
compilation_config = json.dumps(
{
"mode": CompilationMode.VLLM_COMPILE,
}
)
common_args = [
"--dtype",
"float16",
"--max-model-len",
"256",
"--compilation_config",
compilation_config,
]
compare_two_settings(
"facebook/opt-125m",
common_args,
common_args,
env1={"VLLM_USE_STANDALONE_COMPILE": "1"},
env2={"VLLM_USE_STANDALONE_COMPILE": "0"},
)
@pytest.mark.skipif(not is_torch_equal_or_newer("2.10.0"), reason="requires torch 2.10")
@create_new_process_for_each_test("spawn")
def test_gpt2_cache_hit(monkeypatch: pytest.MonkeyPatch):