[CI][ROCm] Mirror remaining portable suites without duplicate coverage (#57877)
Signed-off-by: Andreas Karatzas <akaratza@amd.com> Co-authored-by: OpenAI Codex <noreply@openai.com>
This commit is contained in:
co-authored by
OpenAI Codex
parent
b8cf275382
commit
8902dbb177
@@ -2,7 +2,7 @@
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
"""Cold start and warm start tests for vLLM-compile.
|
||||
|
||||
Cold start runs in a forked child (must fork before CUDA init) which
|
||||
Cold start runs in a separate child process which
|
||||
populates on-disk caches and asserts cold-start counters. Warm start
|
||||
then runs in the parent with clean in-memory state but populated caches.
|
||||
"""
|
||||
@@ -18,7 +18,7 @@ from vllm.compilation.counter import compilation_counter
|
||||
from vllm.config import CompilationConfig, CompilationMode, CUDAGraphMode, PassConfig
|
||||
from vllm.utils.torch_utils import is_torch_equal_or_newer
|
||||
|
||||
from ...utils import fork_new_process_for_each_test
|
||||
from ...utils import create_new_process_for_each_test, requires_spawn_multiprocessing
|
||||
|
||||
MODEL = "microsoft/Phi-tiny-MoE-instruct"
|
||||
|
||||
@@ -54,17 +54,21 @@ def _cold_start(vllm_runner):
|
||||
assert counters["aot_autograd"]["autograd_cache_hit"] == 0
|
||||
|
||||
|
||||
@fork_new_process_for_each_test
|
||||
@create_new_process_for_each_test()
|
||||
@pytest.mark.parametrize("mega_aot_artifact", ["0", "1"])
|
||||
def test_moe_startup(monkeypatch, vllm_runner, fresh_vllm_cache, mega_aot_artifact):
|
||||
monkeypatch.setenv("VLLM_ENABLE_V1_MULTIPROCESSING", "0")
|
||||
monkeypatch.setenv("VLLM_USE_MEGA_AOT_ARTIFACT", mega_aot_artifact)
|
||||
monkeypatch.setenv("VLLM_DEEP_GEMM_WARMUP", "skip")
|
||||
|
||||
# Cold start in a forked child (must fork before CUDA init).
|
||||
# ROCm and XPU cannot fork safely after device discovery.
|
||||
# This model has 32 identical transformer layers which produce
|
||||
# 33 subgraphs after splitting on attention — only 3 are unique.
|
||||
ctx = mp.get_context("fork")
|
||||
ctx = (
|
||||
mp.get_context("spawn")
|
||||
if requires_spawn_multiprocessing()
|
||||
else mp.get_context("fork")
|
||||
)
|
||||
p = ctx.Process(target=_cold_start, args=(vllm_runner,))
|
||||
p.start()
|
||||
p.join()
|
||||
@@ -223,13 +227,17 @@ def _cold_start_model(vllm_runner, spec: ModelStartupSpec):
|
||||
|
||||
|
||||
@pytest.mark.parametrize("spec", MODEL_SPECS)
|
||||
@fork_new_process_for_each_test
|
||||
@create_new_process_for_each_test()
|
||||
def test_model_startup(monkeypatch, vllm_runner, fresh_vllm_cache, spec):
|
||||
monkeypatch.setenv("VLLM_ENABLE_V1_MULTIPROCESSING", "0")
|
||||
monkeypatch.setenv("VLLM_DEEP_GEMM_WARMUP", "skip")
|
||||
|
||||
# Cold start in a forked child (must fork before CUDA init).
|
||||
ctx = mp.get_context("fork")
|
||||
# ROCm and XPU cannot fork safely after device discovery.
|
||||
ctx = (
|
||||
mp.get_context("spawn")
|
||||
if requires_spawn_multiprocessing()
|
||||
else mp.get_context("fork")
|
||||
)
|
||||
p = ctx.Process(target=_cold_start_model, args=(vllm_runner, spec))
|
||||
p.start()
|
||||
p.join()
|
||||
|
||||
Reference in New Issue
Block a user