vllm-project/vllm · error · ValueError

use_inductor_graph_partition is only supported with torch>=2

Error message

use_inductor_graph_partition is only supported with torch>=2.9.0.dev. Set use_inductor_graph_partition=False instead.

What it means

use_inductor_graph_partition routes graph splitting to torch inductor's partitioner, which only exists from PyTorch 2.9.0.dev onwards. The post-init validator checks the torch version via is_torch_equal_or_newer('2.9.0.dev') and raises ValueError on older torch telling you to disable the flag.

Source

Thrown at vllm/config/compilation.py:992

        ):
            self.custom_ops.append("+rotary_embedding")

        if (
            is_torch_equal_or_newer("2.9.0.dev")
            and "combo_kernels" not in self.inductor_compile_config
            and "benchmark_combo_kernel" not in self.inductor_compile_config
            # (fixme @boyuan) combo kernel does not support cpu yet.
            and not current_platform.is_cpu()
        ):
            # use horizontal fusion, which is useful for fusing qk-norm and
            # qk-rope when query and key have different shapes.
            self.inductor_compile_config["combo_kernels"] = True
            self.inductor_compile_config["benchmark_combo_kernel"] = True

        if self.use_inductor_graph_partition and not is_torch_equal_or_newer(
            "2.9.0.dev"
        ):
            raise ValueError(
                "use_inductor_graph_partition is only "
                "supported with torch>=2.9.0.dev. Set "
                "use_inductor_graph_partition=False instead."
            )

        for op in self.custom_ops:
            if op not in {"all", "none"} and (len(op) < 2 or op[0] not in {"+", "-"}):
                raise ValueError(
                    f"Invalid syntax '{op}' for custom op, "
                    "must be 'all', 'none', '+op' or '-op' "
                    "(where 'op' is the registered op name)"
                )

        base_modes = [op for op in self.custom_ops if op in {"all", "none"}]
        if len(base_modes) > 1:
            raise ValueError(
                "custom_ops can contain only one base mode: 'all' or 'none'"
            )

View on GitHub (pinned to c794754062)

Solutions

  1. Set use_inductor_graph_partition=False.
  2. Or upgrade PyTorch to >=2.9 (nightly/newer stable) if you need inductor graph partitioning.

Example fix

# before  # torch==2.8.0
CompilationConfig(use_inductor_graph_partition=True)
# after
CompilationConfig(use_inductor_graph_partition=False)
Defensive patterns

Strategy: validation

Validate before calling

from vllm.utils import is_torch_equal_or_newer

def inductor_partition_ok(flag: bool) -> bool:
    return not flag or is_torch_equal_or_newer('2.9.0.dev')

Prevention

When it happens

Trigger: Passing CompilationConfig(use_inductor_graph_partition=True) while running torch < 2.9 (e.g. stable 2.7/2.8 wheels, or older nightly pins).

Common situations: Copying a config from CI running torch nightly into an environment pinned to stable torch; default flips in newer vLLM combined with an older installed torch.

Related errors


AI-assisted analysis of vllm-project/vllm@c794754062 (2026-08-14). Data as JSON: /api/errors/7c5a1c804d1054ba. Report an issue: GitHub.