Skip to content

Commit a50259b

Browse files
WoosukKwonclaude
andauthored
[vLLM IR] Deprecate ir_op_priority ahead of vLLM IR removal (#63371)
Signed-off-by: Woosuk Kwon <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent a0544b1 commit a50259b

4 files changed

Lines changed: 38 additions & 0 deletions

File tree

‎docs/design/vllm_ir.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# vLLM IR: Functional Intermediate Representation
22

3+
!!! warning "Deprecated"
4+
vLLM IR is deprecated and is being removed. `--ir-op-priority`
5+
(`KernelConfig.ir_op_priority`) still works but logs a warning, and it will be
6+
removed in v0.34.0. Do not port new ops to vLLM IR.
7+
38
## Motivation
49

510
vLLM IR is a **functional intermediate representation (IR)** that fills the gap between

‎tests/engine/test_arg_utils.py‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import json
55
from argparse import ArgumentError
66
from contextlib import AbstractContextManager, nullcontext
7+
from dataclasses import replace
78
from typing import Annotated, Literal
89

910
import pytest
@@ -821,6 +822,27 @@ def test_ir_op_priority():
821822
).create_engine_config()
822823

823824

825+
def test_ir_op_priority_deprecation_warning(caplog_vllm, disable_log_dedup):
826+
"""Setting ir_op_priority warns users because vLLM IR is being removed."""
827+
from vllm.config.kernel import IrOpPriorityConfig, KernelConfig
828+
829+
msg = "ir_op_priority (--ir-op-priority) is deprecated"
830+
831+
# Platform defaults fill ir_op_priority; copying the config must not warn.
832+
cfg = EngineArgs().create_engine_config()
833+
replace(cfg.kernel_config, moe_backend="triton")
834+
assert msg not in caplog_vllm.text
835+
836+
ir_op_priority = IrOpPriorityConfig(rms_norm=["vllm_c"])
837+
EngineArgs(ir_op_priority=ir_op_priority).create_engine_config()
838+
assert msg in caplog_vllm.text
839+
840+
caplog_vllm.clear()
841+
kernel_config = KernelConfig(ir_op_priority=ir_op_priority)
842+
EngineArgs(kernel_config=kernel_config).create_engine_config()
843+
assert msg in caplog_vllm.text
844+
845+
824846
@pytest.mark.parametrize(
825847
("input_json", "expected_json"),
826848
[

‎vllm/config/kernel.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,9 @@ class KernelConfig:
275275
"""
276276
vLLM IR op priority for dispatching/lowering during the forward pass.
277277
Platform defaults appended automatically during VllmConfig.__post_init__.
278+
279+
Deprecated: vLLM IR is being removed, and this option will be removed in
280+
v0.34.0. Kernels will be selected by the platform, as for other custom ops.
278281
"""
279282

280283
enable_flashinfer_autotune: bool = None # type: ignore[assignment]

‎vllm/engine/arg_utils.py‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,12 @@ def get_kwargs(cls: ConfigType) -> dict[str, dict[str, Any]]:
465465
)
466466

467467

468+
_IR_OP_PRIORITY_DEPRECATION_MESSAGE = (
469+
"ir_op_priority (--ir-op-priority) is deprecated because vLLM IR is being "
470+
"removed. It will be removed in v0.34.0."
471+
)
472+
473+
468474
_DISABLE_CASCADE_ATTN_DEPRECATION_MESSAGE = (
469475
"--disable-cascade-attn is deprecated and has no effect since cascade "
470476
"attention has been removed. It will be removed in v0.33.0."
@@ -2813,6 +2819,8 @@ def create_engine_config(
28132819

28142820
# Set the attribute
28152821
setattr(kernel_config.ir_op_priority, op_name, op_priority)
2822+
if any(asdict(kernel_config.ir_op_priority).values()):
2823+
logger.warning_once(_IR_OP_PRIORITY_DEPRECATION_MESSAGE)
28162824

28172825
load_config = self.create_load_config()
28182826

0 commit comments

Comments
 (0)