[MRV2] Switch CI tests still running on MRV1 unnecessarily (#61014)
Signed-off-by: Nick Hill <nickhill123@gmail.com>
This commit is contained in:
@@ -2046,7 +2046,6 @@ steps:
|
||||
- vllm/model_executor/model_loader/
|
||||
optional: true
|
||||
commands:
|
||||
- unset VLLM_USE_V2_MODEL_RUNNER
|
||||
- pytest -v -s models/quantization
|
||||
|
||||
#-------------------------------------------------- mi300 · models / transformers ---------------------------------------------------#
|
||||
@@ -2353,7 +2352,6 @@ steps:
|
||||
# https://github.com/pytorch/ao/issues/2919, we'll have to skip new torchao tests for now
|
||||
# we can only upgrade after this is resolved
|
||||
# TODO(jerryzh168): resolve the above comment
|
||||
- unset VLLM_USE_V2_MODEL_RUNNER
|
||||
- uv pip install --system torchao==0.18.0
|
||||
- uv pip install --system conch-triton-kernels
|
||||
- VLLM_TEST_FORCE_LOAD_FORMAT=auto pytest -v -s quantization/ --ignore quantization/test_blackwell_moe.py --ignore quantization/test_rocm_moe.py --shard-id=$$BUILDKITE_PARALLEL_JOB --num-shards=$$BUILDKITE_PARALLEL_JOB_COUNT
|
||||
@@ -5163,7 +5161,6 @@ steps:
|
||||
- vllm/model_executor/model_loader/
|
||||
optional: true
|
||||
commands:
|
||||
- unset VLLM_USE_V2_MODEL_RUNNER
|
||||
- pytest -v -s models/quantization
|
||||
|
||||
#------------------------------------------------------- mi355 · quantization --------------------------------------------------------#
|
||||
@@ -5186,7 +5183,6 @@ steps:
|
||||
- tests/rocm/test_moe_weight_replay.py
|
||||
optional: true
|
||||
commands:
|
||||
- unset VLLM_USE_V2_MODEL_RUNNER
|
||||
- uv pip install --system torchao==0.17.0
|
||||
- uv pip install --system conch-triton-kernels
|
||||
- VLLM_TEST_FORCE_LOAD_FORMAT=auto pytest -v -s quantization/ --ignore quantization/test_blackwell_moe.py --ignore quantization/test_rocm_moe.py --ignore quantization/test_gfx950_moe.py --shard-id=$$BUILDKITE_PARALLEL_JOB --num-shards=$$BUILDKITE_PARALLEL_JOB_COUNT
|
||||
|
||||
@@ -7,8 +7,6 @@ steps:
|
||||
key: quantization
|
||||
timeout_in_minutes: 40
|
||||
parallelism: 4
|
||||
env:
|
||||
VLLM_USE_V2_MODEL_RUNNER: "0"
|
||||
source_file_dependencies:
|
||||
- csrc/
|
||||
- vllm/model_executor/layers/quantization
|
||||
@@ -41,8 +39,6 @@ steps:
|
||||
- tests/rocm/test_moe_weight_replay.py
|
||||
- tests/rocm/test_moe_padding.py
|
||||
commands:
|
||||
# Use the ROCm default instead of the NVIDIA runner override.
|
||||
- unset VLLM_USE_V2_MODEL_RUNNER
|
||||
- uv pip install --system torchao==0.17.0
|
||||
- uv pip install --system conch-triton-kernels
|
||||
- VLLM_TEST_FORCE_LOAD_FORMAT=auto pytest -v -s quantization/ --ignore quantization/test_blackwell_moe.py --ignore quantization/test_rocm_moe.py --shard-id=$$BUILDKITE_PARALLEL_JOB --num-shards=$$BUILDKITE_PARALLEL_JOB_COUNT
|
||||
@@ -130,8 +126,6 @@ steps:
|
||||
key: quantized-models-test
|
||||
automatic_shard: true
|
||||
timeout_in_minutes: 65
|
||||
env:
|
||||
VLLM_USE_V2_MODEL_RUNNER: "0"
|
||||
source_file_dependencies:
|
||||
- vllm/model_executor/layers/quantization
|
||||
- tests/models/quantization
|
||||
@@ -153,6 +147,4 @@ steps:
|
||||
- vllm/platforms/rocm.py
|
||||
- vllm/model_executor/model_loader/
|
||||
commands:
|
||||
# Use the ROCm default instead of the NVIDIA runner override.
|
||||
- unset VLLM_USE_V2_MODEL_RUNNER
|
||||
- pytest -v -s models/quantization
|
||||
|
||||
@@ -411,15 +411,9 @@ def test_deep_sleep_compressed_tensors_kv_scales(
|
||||
|
||||
|
||||
@requires_fp8
|
||||
def test_deep_sleep_fp8_kvcache_mrv1(
|
||||
monkeypatch: pytest.MonkeyPatch, gpu_memory_cleared
|
||||
):
|
||||
# Regression test for https://github.com/vllm-project/vllm/pull/28783.
|
||||
# In particular, verify that MRV1 does not rely on post_kv_cache_wake_up()
|
||||
# to restore correct output after level-2 sleep.
|
||||
monkeypatch.setenv("VLLM_USE_V2_MODEL_RUNNER", "0")
|
||||
envs.disable_envs_cache()
|
||||
|
||||
def test_deep_sleep_fp8_kvcache(gpu_memory_cleared):
|
||||
# Regression test for https://github.com/vllm-project/vllm/pull/28783:
|
||||
# fp8 KV cache output must be restored correctly after level-2 sleep.
|
||||
model = "Qwen/Qwen2-0.5B"
|
||||
used_bytes_baseline = current_platform.get_current_memory_usage()
|
||||
|
||||
@@ -454,10 +448,9 @@ def test_deep_sleep_fp8_kvcache_mrv1(
|
||||
|
||||
|
||||
@requires_fp8
|
||||
def test_deep_sleep_fp8_kvcache_mrv1_with_undefined_remap(
|
||||
def test_deep_sleep_fp8_kvcache_with_undefined_remap(
|
||||
monkeypatch: pytest.MonkeyPatch,
|
||||
):
|
||||
monkeypatch.setenv("VLLM_USE_V2_MODEL_RUNNER", "0")
|
||||
monkeypatch.setenv("VLLM_ENABLE_V1_MULTIPROCESSING", "0")
|
||||
envs.disable_envs_cache()
|
||||
|
||||
|
||||
@@ -77,7 +77,6 @@ def test_rocm_aiter_static_attention_output_correctness(caplog_mp_spawn):
|
||||
env1=env,
|
||||
env2=env,
|
||||
method="generate",
|
||||
force_v1_runner=True,
|
||||
)
|
||||
matches = [
|
||||
int(count) for count in re.findall(r"'attn_quant_fusion': (\d+)", logs.text)
|
||||
|
||||
@@ -219,7 +219,7 @@ def test_kda_recoverssm_startup_metadata_flow_without_model(monkeypatch):
|
||||
scheduler_config=SimpleNamespace(max_num_seqs=4),
|
||||
additional_config={},
|
||||
num_speculative_tokens=2,
|
||||
use_v2_model_runner=False,
|
||||
use_v2_model_runner=True,
|
||||
)
|
||||
builder = KimiK3KDAMetadataBuilder(
|
||||
kv_cache_spec=kv_cache_spec,
|
||||
|
||||
@@ -1165,7 +1165,6 @@ def compare_two_settings(
|
||||
method: str = "generate",
|
||||
max_wait_seconds: float | None = None,
|
||||
include_seeded_sampling: bool = True,
|
||||
force_v1_runner: bool = False,
|
||||
) -> None:
|
||||
"""Launch API server with two different sets of arguments/environments
|
||||
and compare the results of the API calls.
|
||||
@@ -1178,9 +1177,6 @@ def compare_two_settings(
|
||||
env2: The second set of environment variables to pass to the API server.
|
||||
include_seeded_sampling: Whether to include temperature=1.0 seeded
|
||||
sampling checks in the default generate comparison.
|
||||
force_v1_runner: Whether to pin all compared settings to the v1 model
|
||||
runner to avoid mixing model runner differences into correctness
|
||||
tests.
|
||||
|
||||
"""
|
||||
compare_all_settings(
|
||||
@@ -1190,7 +1186,6 @@ def compare_two_settings(
|
||||
method=method,
|
||||
max_wait_seconds=max_wait_seconds,
|
||||
include_seeded_sampling=include_seeded_sampling,
|
||||
force_v1_runner=force_v1_runner,
|
||||
)
|
||||
|
||||
|
||||
@@ -1202,7 +1197,6 @@ def compare_all_settings(
|
||||
method: str = "generate",
|
||||
max_wait_seconds: float | None = None,
|
||||
include_seeded_sampling: bool = True,
|
||||
force_v1_runner: bool = False,
|
||||
) -> None:
|
||||
"""Launch API server with several different sets of arguments/environments
|
||||
and compare the results of the API calls with the first set of arguments.
|
||||
@@ -1213,16 +1207,8 @@ def compare_all_settings(
|
||||
all_envs: A list of environment dictionaries to pass to the API server.
|
||||
include_seeded_sampling: Whether to include temperature=1.0 seeded
|
||||
sampling checks in the default generate comparison.
|
||||
force_v1_runner: Whether to pin all compared settings to the v1 model
|
||||
runner to avoid mixing model runner differences into correctness
|
||||
tests.
|
||||
|
||||
"""
|
||||
if force_v1_runner:
|
||||
all_envs = [
|
||||
{"VLLM_USE_V2_MODEL_RUNNER": "0", **(env or {})} for env in all_envs
|
||||
]
|
||||
|
||||
trust_remote_code = False
|
||||
for args in all_args:
|
||||
if "--trust-remote-code" in args:
|
||||
|
||||
@@ -352,6 +352,12 @@ def test_async_scheduling_pp_allows_rescheduling_with_output_placeholders():
|
||||
_ = scheduler.schedule()
|
||||
assert req.num_output_placeholders > 0
|
||||
|
||||
if scheduler.use_v2_model_runner:
|
||||
# MRV2 staggers same-request decodes by pp_size steps to match the
|
||||
# worker-side sampled-token broadcast cadence.
|
||||
output = scheduler.schedule()
|
||||
assert req.request_id not in output.num_scheduled_tokens
|
||||
|
||||
# before any update_from_output, we still expect the request can be
|
||||
# scheduled again (multi-step in-flight).
|
||||
output = scheduler.schedule()
|
||||
|
||||
@@ -238,7 +238,7 @@ def create_scheduler(
|
||||
structured_output_manager=StructuredOutputManager(vllm_config),
|
||||
)
|
||||
if use_v2_model_runner is None:
|
||||
use_v2_model_runner = bool(envs.VLLM_USE_V2_MODEL_RUNNER)
|
||||
use_v2_model_runner = envs.VLLM_USE_V2_MODEL_RUNNER is not False
|
||||
scheduler.use_v2_model_runner = use_v2_model_runner
|
||||
return scheduler
|
||||
|
||||
|
||||
@@ -122,7 +122,10 @@ def test_replayssm_flashinfer_decode_matches_baseline(
|
||||
|
||||
|
||||
@pytest.mark.parametrize("model_name", FLASHINFER_MODELS)
|
||||
def test_replayssm_flashinfer_spec_decode_matches_baseline(vllm_runner, model_name):
|
||||
@pytest.mark.parametrize("use_v2_model_runner", [False, True], ids=["v1", "v2"])
|
||||
def test_replayssm_flashinfer_spec_decode_matches_baseline(
|
||||
vllm_runner, model_name, monkeypatch, use_v2_model_runner
|
||||
):
|
||||
common = dict(
|
||||
max_model_len=1024,
|
||||
trust_remote_code=True,
|
||||
@@ -134,7 +137,15 @@ def test_replayssm_flashinfer_spec_decode_matches_baseline(vllm_runner, model_na
|
||||
"prompt_lookup_max": 3,
|
||||
},
|
||||
)
|
||||
try:
|
||||
with monkeypatch.context() as patch:
|
||||
patch.setenv("VLLM_USE_V2_MODEL_RUNNER", str(int(use_v2_model_runner)))
|
||||
envs.disable_envs_cache()
|
||||
with vllm_runner(model_name, mamba_backend="flashinfer", **common) as llm:
|
||||
assert (
|
||||
llm.llm.llm_engine.vllm_config.use_v2_model_runner
|
||||
is use_v2_model_runner
|
||||
)
|
||||
baseline = llm.generate_greedy_logprobs(
|
||||
FLASHINFER_PROMPTS, max_tokens=32, num_logprobs=5
|
||||
)
|
||||
@@ -145,9 +156,15 @@ def test_replayssm_flashinfer_spec_decode_matches_baseline(vllm_runner, model_na
|
||||
mamba_backend="flashinfer",
|
||||
**common,
|
||||
) as llm:
|
||||
assert (
|
||||
llm.llm.llm_engine.vllm_config.use_v2_model_runner
|
||||
is use_v2_model_runner
|
||||
)
|
||||
replay = llm.generate_greedy_logprobs(
|
||||
FLASHINFER_PROMPTS, max_tokens=32, num_logprobs=5
|
||||
)
|
||||
finally:
|
||||
envs.disable_envs_cache()
|
||||
|
||||
check_logprobs_close(
|
||||
outputs_0_lst=baseline,
|
||||
|
||||
@@ -71,7 +71,7 @@ def _make_vllm_config(
|
||||
decode_context_parallel_size=decode_context_parallel_size,
|
||||
)
|
||||
config.kv_events_config = None
|
||||
config.use_v2_model_runner = False
|
||||
config.use_v2_model_runner = True
|
||||
config.kv_transfer_config = KVTransferConfig(
|
||||
kv_connector="OffloadingConnector",
|
||||
kv_role="kv_both",
|
||||
@@ -284,7 +284,7 @@ def _parallelism_agnostic(
|
||||
kv_cache_groups: list[KVCacheGroupSpec],
|
||||
*,
|
||||
canonical: bool = False,
|
||||
v2: bool = False,
|
||||
v2: bool = True,
|
||||
) -> bool:
|
||||
config = _make_vllm_config(
|
||||
extra_config={"canonical_layout": True} if canonical else None
|
||||
@@ -308,7 +308,7 @@ def _replicated_layout(
|
||||
prefill_context_parallel_size: int = 1,
|
||||
decode_context_parallel_size: int = 1,
|
||||
use_mla: bool = True,
|
||||
use_v2_model_runner: bool = False,
|
||||
use_v2_model_runner: bool = True,
|
||||
distributed_executor_backend: Any = "mp",
|
||||
nnodes: int = 1,
|
||||
world_size: int | None = None,
|
||||
@@ -1105,7 +1105,10 @@ def test_replicated_layout_parallel_gate(kwargs: dict[str, Any], case: str):
|
||||
|
||||
|
||||
def test_parallelism_agnostic_for_single_full_attention_group():
|
||||
assert _parallelism_agnostic([KVCacheGroupSpec(["l0"], _full_attention_spec())])
|
||||
# The direct (non-canonical) parallelism-agnostic layout is MRV1-only.
|
||||
assert _parallelism_agnostic(
|
||||
[KVCacheGroupSpec(["l0"], _full_attention_spec())], v2=False
|
||||
)
|
||||
|
||||
|
||||
_SWA_SPEC = SlidingWindowSpec(
|
||||
@@ -1147,7 +1150,9 @@ def _uniform_group(*specs: KVCacheSpec) -> KVCacheGroupSpec:
|
||||
],
|
||||
)
|
||||
def test_parallelism_agnostic_excluded(kv_cache_groups: list[KVCacheGroupSpec]):
|
||||
assert not _parallelism_agnostic(kv_cache_groups)
|
||||
# The direct layout is never parallelism-agnostic on MRV2, so check the
|
||||
# MRV1 gate.
|
||||
assert not _parallelism_agnostic(kv_cache_groups, v2=False)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@@ -1178,7 +1183,7 @@ def test_parallelism_agnostic_excluded(kv_cache_groups: list[KVCacheGroupSpec]):
|
||||
def test_canonical_layout_gate(kv_cache_groups, certified):
|
||||
"""The canonical layout certifies portability group by group; none of
|
||||
these shapes are portable in the direct layout."""
|
||||
assert not _parallelism_agnostic(kv_cache_groups)
|
||||
assert not _parallelism_agnostic(kv_cache_groups, v2=False)
|
||||
assert _parallelism_agnostic(kv_cache_groups, canonical=True) is certified
|
||||
|
||||
|
||||
@@ -1233,7 +1238,7 @@ def test_canonical_layout_certifies_v2_model_runner():
|
||||
registration, so the static gate must not depend on the model-runner
|
||||
version — the v2 runner is the case the canonical layout exists for."""
|
||||
groups = _groups(_full_attention_spec())
|
||||
assert _parallelism_agnostic(groups, canonical=True, v2=True)
|
||||
assert _parallelism_agnostic(groups, canonical=True)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("tp_size", [1, 2, 4])
|
||||
@@ -1275,7 +1280,6 @@ def test_canonical_mla_dsa_rows_are_tp_independent(tp_size, scheduler):
|
||||
|
||||
def test_parallelism_agnostic_disabled_on_v2_model_runner():
|
||||
config = _make_vllm_config()
|
||||
config.use_v2_model_runner = True
|
||||
kv_cache_config = KVCacheConfig(
|
||||
num_blocks=0,
|
||||
kv_cache_tensors=[],
|
||||
|
||||
@@ -105,7 +105,7 @@ def minimax_pp_stage(monkeypatch):
|
||||
model_config=SimpleNamespace(hf_text_config=config),
|
||||
quant_config=None,
|
||||
speculative_config=None,
|
||||
use_v2_model_runner=False,
|
||||
use_v2_model_runner=True,
|
||||
)
|
||||
)
|
||||
model._set_aux_hidden_state_layers(taps)
|
||||
|
||||
@@ -424,8 +424,8 @@ def test_execute_model_waits_previous_pp_send_before_forward(
|
||||
pipeline_parallel_size=2, distributed_executor_backend="mp"
|
||||
),
|
||||
),
|
||||
use_v2_model_runner=False,
|
||||
model_runner=SimpleNamespace(execute_model=run_model),
|
||||
use_v2_model_runner=True,
|
||||
model_runner=SimpleNamespace(execute_model=run_model, is_pooling_model=False),
|
||||
annotate_profile=lambda scheduler_output: nullcontext(),
|
||||
_pp_send_work=[previous_tensor_send],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user