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 12, 13:30 UTC
Scheduled removal of `CompilationConfig.use_inductor` (#29323)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Harry Mellor committed
Nov 25, 2025 at 12:55 UTC
51fc9e017a721c7fb283cecf3231bbe6e358132b
4 files changed
+13
-41
tests/compile/fullgraph/test_simple.py
+6
-6
@@ -55,7 +55,7 @@ class SillyModel(nn.Module):
55
def _run_simple_model(
56
splitting_ops,
57
use_inductor_graph_partition,
58
- use_inductor,
58
+ backend,
59
expected_num_piecewise_graphs_seen,
60
expected_num_piecewise_capturable_graphs_seen,
61
expected_num_backend_compilations,
@@ -64,7 +64,7 @@ def _run_simple_model(
64
vllm_config = VllmConfig(
65
compilation_config=CompilationConfig(
66
mode=CompilationMode.VLLM_COMPILE,
67
- use_inductor=use_inductor,
67
+ backend=backend,
68
splitting_ops=splitting_ops,
69
use_inductor_graph_partition=use_inductor_graph_partition,
70
cudagraph_copy_inputs=True,
@@ -124,14 +124,14 @@ def _run_simple_model(
124
assert torch.allclose(output.cpu(), torch.tensor([19.0, 19.0]))
125
126
127
-@pytest.mark.parametrize("use_inductor", [True, False])
127
+@pytest.mark.parametrize("backend", ["inductor", "eager"])
128
@torch.inference_mode()
129
@create_new_process_for_each_test("spawn")
130
-def test_simple_piecewise_compile(use_inductor):
130
+def test_simple_piecewise_compile(backend):
131
_run_simple_model(
132
splitting_ops=["silly::attention"],
133
use_inductor_graph_partition=False,
134
- use_inductor=use_inductor,
134
+ backend=backend,
135
# 2 * num_layers + 1
136
expected_num_piecewise_graphs_seen=5,
137
# 1 + num_layers
@@ -155,7 +155,7 @@ def test_simple_inductor_graph_partition(monkeypatch):
155
_run_simple_model(
156
splitting_ops=["silly::attention"],
157
use_inductor_graph_partition=True,
158
- use_inductor=True,
158
+ backend="inductor",
159
# Since not splitting at fx graph level
160
expected_num_piecewise_graphs_seen=1,
161
# Since not splitting at fx graph level
tests/engine/test_arg_utils.py
+4
-5
@@ -249,14 +249,13 @@ def test_compilation_config():
249
args = parser.parse_args(
250
[
251
"-O",
252
- '{"mode": 3, "cudagraph_capture_sizes": [1, 2, 4, 8], '
253
- '"use_inductor": false}',
252
+ '{"mode": 3, "cudagraph_capture_sizes": [1, 2, 4, 8], "backend": "eager"}',
253
]
254
)
255
assert (
256
args.compilation_config.mode == 3
257
and args.compilation_config.cudagraph_capture_sizes == [1, 2, 4, 8]
259
- and not args.compilation_config.use_inductor
258
+ and args.compilation_config.backend == "eager"
259
)
260
261
# set to string form of a dict
@@ -264,13 +263,13 @@ def test_compilation_config():
263
[
264
"--compilation-config="
265
'{"mode": 3, "cudagraph_capture_sizes": [1, 2, 4, 8], '
267
- '"use_inductor": true}',
266
+ '"backend": "inductor"}',
267
]
268
)
269
assert (
270
args.compilation_config.mode == 3
271
and args.compilation_config.cudagraph_capture_sizes == [1, 2, 4, 8]
273
- and args.compilation_config.use_inductor
272
+ and args.compilation_config.backend == "inductor"
273
)
274
275
tests/utils_/test_argparse_utils.py
+2
-2
@@ -166,7 +166,7 @@ def test_dict_args(parser):
166
"--hf-overrides.key2.key4",
167
"val3",
168
# Test compile config and compilation mode
169
- "-O.use_inductor=true",
169
+ "-O.use_inductor_graph_partition=true",
170
"-O.backend",
171
"custom",
172
"-O1",
@@ -219,7 +219,7 @@ def test_dict_args(parser):
219
}
220
assert parsed_args.compilation_config == {
221
"mode": 1,
222
- "use_inductor": True,
222
+ "use_inductor_graph_partition": True,
223
"backend": "custom",
224
"custom_ops": ["-quant_fp8", "+silu_mul", "-rms_norm"],
225
}
vllm/config/compilation.py
+1
-28
@@ -264,7 +264,6 @@ class CompilationConfig:
264
- [`cudagraph_copy_inputs`]
265
[vllm.config.CompilationConfig.cudagraph_copy_inputs]
266
- Inductor compilation:
267
- - [`use_inductor`][vllm.config.CompilationConfig.use_inductor]
267
- [`compile_sizes`][vllm.config.CompilationConfig.compile_sizes]
268
- [`inductor_compile_config`]
269
[vllm.config.CompilationConfig.inductor_compile_config]
@@ -348,7 +347,7 @@ class CompilationConfig:
347
- 'none,+op1,+op2' to enable only op1 and op2
348
349
By default, all custom ops are enabled when running without Inductor and
351
- disabled when running with Inductor: mode>=VLLM_COMPILE and use_inductor=True.
350
+ disabled when running with Inductor: mode>=VLLM_COMPILE and backend="inductor".
351
Inductor generates (fused) Triton kernels for disabled custom ops."""
352
splitting_ops: list[str] | None = None
353
"""A list of ops to exclude from cudagraphs, used in piecewise compilation.
@@ -374,24 +373,6 @@ class CompilationConfig:
373
Disabled by default until more models are supported/tested to work."""
374
375
# Inductor capture
377
- use_inductor: bool | None = None
378
- """
379
- Whether to use inductor compilation.
380
-
381
- This flag is deprecated and will be removed in the next release 0.12.0.
382
- Please use the 'backend' option instead.
383
-
384
- - False: inductor compilation is not used. graph runs in eager
385
- (custom_ops enabled by default).
386
- - True: inductor compilation is used (custom_ops disabled by default).
387
- One graph for symbolic shape and one graph per size in compile_sizes
388
- are compiled using configurations in inductor_compile_config.
389
-
390
- This setting is ignored if mode<VLLM_COMPILE.
391
-
392
- For future compatibility:
393
- If use_inductor is True, backend="inductor" otherwise backend="eager".
394
- """
376
compile_sizes: list[int | str] | None = None
377
"""Sizes to compile for inductor. In addition
378
to integers, it also supports "cudagraph_capture_sizes" to
@@ -759,14 +740,6 @@ class CompilationConfig:
740
f"Invalid backend for piecewise compilation: {self.backend}"
741
)
742
762
- if self.use_inductor is not None:
763
- logger.warning_once(
764
- "The 'use_inductor' flag is deprecated and will be "
765
- "removed in the next release (v0.12.0). "
766
- "Please use the 'backend' option instead.",
767
- )
768
- self.backend = "inductor" if self.use_inductor else "eager"
769
-
743
if self.backend == "":
744
self.backend = current_platform.get_compile_backend()
745