@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 5a87d8b9b1
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 11, 16:15 UTC

[Deprecation] Remove deprecated plugin and compilation fields for v0.13 release (#30396)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>

Cyrus Leung committed Dec 11, 2025 at 11:59 UTC 5a87d8b9b1f357a65a9b73773178ae17fd7cd9c8
10 files changed +22 -238
docs/design/plugin_system.md
+2 -2
@@ -152,5 +152,5 @@ The interface for the model/module may change during vLLM's development. If you
152 ## Deprecation announcement
153
154 !!! warning "Deprecations"
155 - - `use_v1` parameter in `Platform.get_attn_backend_cls` is deprecated. It will be removed in v0.13.0 or v1.0.0.
156 - - `_Backend` in `vllm.attention` is deprecated. It will be removed in v0.13.0 or v1.0.0. Please use `vllm.attention.backends.registry.register_backend` to add new attention backend to `AttentionBackendEnum` instead.
155 + - `use_v1` parameter in `Platform.get_attn_backend_cls` is deprecated. It has been removed in v0.13.0.
156 + - `_Backend` in `vllm.attention` is deprecated. It has been removed in v0.13.0. Please use `vllm.attention.backends.registry.register_backend` to add new attention backend to `AttentionBackendEnum` instead.
tests/compile/test_config.py
+1 -62
@@ -1,7 +1,6 @@
1 # SPDX-License-Identifier: Apache-2.0
2 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3 import copy
4 -import logging
4 from contextlib import nullcontext
5 from unittest.mock import patch
6
@@ -13,7 +12,6 @@ from vllm.compilation.fix_functionalization import FixFunctionalizationPass
12 from vllm.config import CompilationConfig, CUDAGraphMode, ParallelConfig, VllmConfig
13 from vllm.config.compilation import CompilationMode, PassConfig
14 from vllm.engine.arg_utils import EngineArgs
16 -from vllm.logger import _print_warning_once
15 from vllm.platforms import current_platform
16 from vllm.utils.torch_utils import _is_torch_equal_or_newer
17
@@ -290,7 +288,7 @@ def test_moe_splitting_ops_deepep_ht_attn_fusion_no_inductor():
288 ),
289 compilation_config=CompilationConfig(
290 mode=CompilationMode.VLLM_COMPILE,
293 - pass_config={"enable_attn_fusion": True, "enable_noop": True},
291 + pass_config={"fuse_attn_quant": True, "eliminate_noops": True},
292 custom_ops=["+quant_fp8"],
293 cudagraph_mode=CUDAGraphMode.PIECEWISE,
294 ),
@@ -442,62 +440,3 @@ def test_cudagraph_sizes_post_init(
440 vllm_config.compilation_config.max_cudagraph_capture_size
441 == expected_max_size
442 )
445 -
446 -
447 -def test_pass_config_deprecation(caplog_vllm):
448 - caplog_vllm.set_level(logging.WARNING)
449 -
450 - # Clear cache to ensure warnings are re-issued
451 - _print_warning_once.cache_clear()
452 -
453 - # Test enable_fusion -> fuse_norm_quant, fuse_act_quant
454 - caplog_vllm.clear()
455 - config = PassConfig(enable_fusion=True)
456 - assert "enable_fusion is deprecated" in caplog_vllm.text
457 - assert config.fuse_norm_quant is True
458 - assert config.fuse_act_quant is True
459 - assert config.enable_fusion is True
460 -
461 - # Test enable_attn_fusion -> fuse_attn_quant
462 - caplog_vllm.clear()
463 - config = PassConfig(enable_attn_fusion=True)
464 - assert "enable_attn_fusion is deprecated" in caplog_vllm.text
465 - assert config.fuse_attn_quant is True
466 - assert config.enable_attn_fusion is True
467 -
468 - # Test enable_noop -> eliminate_noops
469 - caplog_vllm.clear()
470 - config = PassConfig(enable_noop=True)
471 - assert "enable_noop is deprecated" in caplog_vllm.text
472 - assert config.eliminate_noops is True
473 - assert config.enable_noop is True
474 -
475 - # Test enable_sequence_parallelism -> enable_sp
476 - caplog_vllm.clear()
477 - config = PassConfig(enable_sequence_parallelism=True)
478 - assert "enable_sequence_parallelism is deprecated" in caplog_vllm.text
479 - assert config.enable_sp is True
480 - assert config.enable_sequence_parallelism is True
481 -
482 - # Test enable_async_tp -> fuse_gemm_comms
483 - caplog_vllm.clear()
484 - config = PassConfig(enable_async_tp=True)
485 - assert "enable_async_tp is deprecated" in caplog_vllm.text
486 - assert config.fuse_gemm_comms is True
487 - assert config.enable_async_tp is True
488 -
489 - # Test enable_fi_allreduce_fusion -> fuse_allreduce_rms
490 - caplog_vllm.clear()
491 - config = PassConfig(enable_fi_allreduce_fusion=True)
492 - assert "enable_fi_allreduce_fusion is deprecated" in caplog_vllm.text
493 - assert config.fuse_allreduce_rms is True
494 - assert config.enable_fi_allreduce_fusion is True
495 -
496 - # Test hash consistency
497 - config_old = PassConfig(enable_fusion=True)
498 - config_new = PassConfig(fuse_norm_quant=True, fuse_act_quant=True)
499 - assert config_old.compute_hash() == config_new.compute_hash()
500 -
501 - config_old = PassConfig(enable_async_tp=True)
502 - config_new = PassConfig(fuse_gemm_comms=True)
503 - assert config_old.compute_hash() == config_new.compute_hash()
tests/kernels/moe/test_ocp_mx_moe.py
+2 -2
@@ -70,12 +70,12 @@ def test_mxfp4_loading_and_execution_moe(vllm_runner, model_case: ModelCase):
70 f"{torch.cuda.device_count()}"
71 )
72
73 - # `cuda_graph_sizes=[16]` to reduce load time.
73 + # `cudagraph_capture_sizes=[16]` to reduce load time.
74 with vllm_runner(
75 model_case.model_id,
76 tensor_parallel_size=model_case.tp,
77 load_format="dummy",
78 - cuda_graph_sizes=[16],
78 + cudagraph_capture_sizes=[16],
79 ) as llm:
80 # Disabled as check_model is broken: https://github.com/vllm-project/vllm/pull/18465#issuecomment-3329880562
81 # def check_model(model):
tests/quantization/test_quark.py
+2 -2
@@ -212,11 +212,11 @@ def test_ocp_mx_wikitext_correctness(config: AccuracyTestConfig, tp_size: int):
212 task = "wikitext"
213 rtol = 0.1
214
215 - # Smaller cuda_graph_sizes to speed up the test.
215 + # Smaller cudagraph_capture_sizes to speed up the test.
216 results = lm_eval.simple_evaluate(
217 model="vllm",
218 model_args=config.get_model_args(
219 - tp_size=tp_size, kwargs={"cuda_graph_sizes": [16]}
219 + tp_size=tp_size, kwargs={"cudagraph_capture_sizes": [16]}
220 ),
221 tasks=task,
222 batch_size=64,
tests/test_config.py
+1 -1
@@ -1085,7 +1085,7 @@ def test_vllm_config_explicit_overrides():
1085 )
1086
1087 # Override one field but not others
1088 - pass_config = PassConfig(enable_noop=False)
1088 + pass_config = PassConfig(eliminate_noops=False)
1089 compilation_config = CompilationConfig(pass_config=pass_config)
1090 config = VllmConfig(
1091 model_config=regular_model,
vllm/attention/backends/registry.py
-32
@@ -252,35 +252,3 @@ def register_backend(
252 return lambda x: x
253
254 return decorator
255 -
256 -
257 -# Backwards compatibility alias for plugins
258 -class _BackendMeta(type):
259 - """Metaclass to provide deprecation warnings when accessing _Backend."""
260 -
261 - def __getattribute__(cls, name: str):
262 - if name not in ("__class__", "__mro__", "__name__"):
263 - logger.warning(
264 - "_Backend has been renamed to AttentionBackendEnum. "
265 - "Please update your code to use AttentionBackendEnum instead. "
266 - "_Backend will be removed in a future release."
267 - )
268 - return getattr(AttentionBackendEnum, name)
269 -
270 - def __getitem__(cls, name: str):
271 - logger.warning(
272 - "_Backend has been renamed to AttentionBackendEnum. "
273 - "Please update your code to use AttentionBackendEnum instead. "
274 - "_Backend will be removed in a future release."
275 - )
276 - return AttentionBackendEnum[name]
277 -
278 -
279 -class _Backend(metaclass=_BackendMeta):
280 - """Deprecated: Use AttentionBackendEnum instead.
281 -
282 - This class is provided for backwards compatibility with plugins
283 - and will be removed in a future release.
284 - """
285 -
286 - pass
vllm/attention/selector.py
+12 -34
@@ -1,7 +1,6 @@
1 # SPDX-License-Identifier: Apache-2.0
2 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3
4 -import inspect
4 from functools import cache
5 from typing import cast, get_args
6
@@ -73,39 +72,18 @@ def _cached_get_attn_backend(
72 ) -> type[AttentionBackend]:
73 from vllm.platforms import current_platform
74
76 - sig = inspect.signature(current_platform.get_attn_backend_cls)
77 - if "use_v1" in sig.parameters:
78 - logger.warning_once(
79 - "use_v1 parameter for get_attn_backend_cls is deprecated and will "
80 - "be removed in v0.13.0 or v1.0.0, whichever is soonest. Please "
81 - "remove it from your plugin code."
82 - )
83 - attention_cls = current_platform.get_attn_backend_cls(
84 - backend,
85 - head_size,
86 - dtype,
87 - kv_cache_dtype,
88 - block_size,
89 - True, # use_v1
90 - use_mla,
91 - has_sink,
92 - use_sparse,
93 - use_mm_prefix,
94 - attn_type,
95 - )
96 - else:
97 - attention_cls = current_platform.get_attn_backend_cls(
98 - backend,
99 - head_size,
100 - dtype,
101 - kv_cache_dtype,
102 - block_size,
103 - use_mla,
104 - has_sink,
105 - use_sparse,
106 - use_mm_prefix,
107 - attn_type,
108 - )
75 + attention_cls = current_platform.get_attn_backend_cls(
76 + backend,
77 + head_size,
78 + dtype,
79 + kv_cache_dtype,
80 + block_size,
81 + use_mla,
82 + has_sink,
83 + use_sparse,
84 + use_mm_prefix,
85 + attn_type,
86 + )
87 if not attention_cls:
88 raise ValueError(
89 f"Invalid attention backend for {current_platform.device_name}"
vllm/config/compilation.py
+1 -80
@@ -17,7 +17,6 @@ from vllm.config.utils import (
17 Range,
18 config,
19 get_hash_factors,
20 - handle_deprecated,
20 hash_factors,
21 )
22 from vllm.logger import init_logger
@@ -127,27 +126,6 @@ class PassConfig:
126 fuse_allreduce_rms: bool = Field(default=None)
127 """Enable flashinfer allreduce fusion."""
128
130 - # Deprecated flags
131 - enable_fusion: bool = Field(default=None)
132 - """Deprecated in: v0.12.0. Use fuse_norm_quant and fuse_act_quant
133 - instead. Will be removed in v0.13.0 or v1.0.0, whichever is sooner.
134 - """
135 - enable_attn_fusion: bool = Field(default=None)
136 - """Deprecated in: v0.12.0. Use fuse_attn_quant instead.
137 - Will be removed in v0.13.0 or v1.0.0, whichever is sooner."""
138 - enable_noop: bool = Field(default=None)
139 - """Deprecated in: v0.12.0. Use eliminate_noops instead.
140 - Will be removed in v0.13.0 or v1.0.0, whichever is sooner."""
141 - enable_sequence_parallelism: bool = Field(default=None)
142 - """Deprecated in: v0.12.0. Use enable_sp instead.
143 - Will be removed in v0.13.0 or v1.0.0, whichever is sooner."""
144 - enable_async_tp: bool = Field(default=None)
145 - """Deprecated in: v0.12.0. Use fuse_gemm_comms instead.
146 - Will be removed in v0.13.0 or v1.0.0, whichever is sooner."""
147 - enable_fi_allreduce_fusion: bool = Field(default=None)
148 - """Deprecated in: v0.12.0. Use fuse_allreduce_rms instead.
149 - Will be removed in v0.13.0 or v1.0.0, whichever is sooner."""
150 -
129 fi_allreduce_fusion_max_size_mb: float | None = None
130 """The threshold of the communicated tensor sizes under which
131 vllm should use flashinfer fused allreduce. Specified as a
@@ -206,15 +184,7 @@ class PassConfig:
184 Any future fields that don't affect compilation should be excluded.
185 """
186
209 - ignored_fields = [
210 - "enable_fusion",
211 - "enable_attn_fusion",
212 - "enable_noop",
213 - "enable_sequence_parallelism",
214 - "enable_async_tp",
215 - "enable_fi_allreduce_fusion",
216 - ]
217 - return hash_factors(get_hash_factors(self, ignored_factors=ignored_fields))
187 + return hash_factors(get_hash_factors(self, set()))
188
189 @field_validator(
190 "fuse_norm_quant",
@@ -224,12 +194,6 @@ class PassConfig:
194 "enable_sp",
195 "fuse_gemm_comms",
196 "fuse_allreduce_rms",
227 - "enable_fusion",
228 - "enable_attn_fusion",
229 - "enable_noop",
230 - "enable_sequence_parallelism",
231 - "enable_async_tp",
232 - "enable_fi_allreduce_fusion",
197 mode="wrap",
198 )
199 @classmethod
@@ -242,49 +206,6 @@ class PassConfig:
206 def __post_init__(self) -> None:
207 # Handle deprecation and defaults
208
245 - # Map old flags to new flags and issue warnings
246 - handle_deprecated(
247 - self,
248 - "enable_fusion",
249 - ["fuse_norm_quant", "fuse_act_quant"],
250 - "v0.13.0 or v1.0.0, whichever is sooner",
251 - )
252 -
253 - handle_deprecated(
254 - self,
255 - "enable_attn_fusion",
256 - "fuse_attn_quant",
257 - "v0.13.0 or v1.0.0, whichever is sooner",
258 - )
259 -
260 - handle_deprecated(
261 - self,
262 - "enable_sequence_parallelism",
263 - "enable_sp",
264 - "v0.13.0 or v1.0.0, whichever is sooner",
265 - )
266 -
267 - handle_deprecated(
268 - self,
269 - "enable_async_tp",
270 - "fuse_gemm_comms",
271 - "v0.13.0 or v1.0.0, whichever is sooner",
272 - )
273 -
274 - handle_deprecated(
275 - self,
276 - "enable_fi_allreduce_fusion",
277 - "fuse_allreduce_rms",
278 - "v0.13.0 or v1.0.0, whichever is sooner",
279 - )
280 -
281 - handle_deprecated(
282 - self,
283 - "enable_noop",
284 - "eliminate_noops",
285 - "v0.13.0 or v1.0.0, whichever is sooner",
286 - )
287 -
209 if not self.eliminate_noops:
210 if self.fuse_norm_quant or self.fuse_act_quant:
211 logger.warning_once(
vllm/config/vllm.py
+1 -1
@@ -1014,7 +1014,7 @@ class VllmConfig:
1014 max_graph_size = min(max_num_seqs * 2, 512)
1015 # 1, 2, 4, then multiples of 8 up to 256 and then multiples of 16
1016 # up to max_graph_size
1017 - cuda_graph_sizes = [1, 2, 4] + list(range(8, 256, 8)) + list(
1017 + cudagraph_capture_sizes = [1, 2, 4] + list(range(8, 256, 8)) + list(
1018 range(256, max_graph_size + 1, 16))
1019
1020 In the end, `vllm_config.compilation_config.cudagraph_capture_sizes`
vllm/engine/arg_utils.py
-22
@@ -375,7 +375,6 @@ class EngineArgs:
375 kv_cache_dtype: CacheDType = CacheConfig.cache_dtype
376 seed: int | None = 0
377 max_model_len: int | None = ModelConfig.max_model_len
378 - cuda_graph_sizes: list[int] | None = CompilationConfig.cudagraph_capture_sizes
378 cudagraph_capture_sizes: list[int] | None = (
379 CompilationConfig.cudagraph_capture_sizes
380 )
@@ -1121,15 +1120,6 @@ class EngineArgs:
1120 compilation_group.add_argument(
1121 "--cudagraph-capture-sizes", **compilation_kwargs["cudagraph_capture_sizes"]
1122 )
1124 - compilation_kwargs["cudagraph_capture_sizes"]["help"] = (
1125 - "--cuda-graph-sizes is deprecated and will be removed in v0.13.0 or v1.0.0,"
1126 - " whichever is soonest. Please use --cudagraph-capture-sizes instead."
1127 - )
1128 - compilation_group.add_argument(
1129 - "--cuda-graph-sizes",
1130 - **compilation_kwargs["cudagraph_capture_sizes"],
1131 - deprecated=True,
1132 - )
1123 compilation_group.add_argument(
1124 "--max-cudagraph-capture-size",
1125 **compilation_kwargs["max_cudagraph_capture_size"],
@@ -1741,18 +1731,6 @@ class EngineArgs:
1731
1732 # Compilation config overrides
1733 compilation_config = copy.deepcopy(self.compilation_config)
1744 - if self.cuda_graph_sizes is not None:
1745 - logger.warning(
1746 - "--cuda-graph-sizes is deprecated and will be removed in v0.13.0 or "
1747 - "v1.0.0, whichever is soonest. Please use --cudagraph-capture-sizes "
1748 - "instead."
1749 - )
1750 - if compilation_config.cudagraph_capture_sizes is not None:
1751 - raise ValueError(
1752 - "cuda_graph_sizes and compilation_config."
1753 - "cudagraph_capture_sizes are mutually exclusive"
1754 - )
1755 - compilation_config.cudagraph_capture_sizes = self.cuda_graph_sizes
1734 if self.cudagraph_capture_sizes is not None:
1735 if compilation_config.cudagraph_capture_sizes is not None:
1736 raise ValueError(