vllm-project/vllm · error · ValueError

custom_ops cannot both enable and disable the same operation

Error message

custom_ops cannot both enable and disable the same operation(s): {', '.join(conflicting_ops)}. Remove either the '+' or '-' directive

What it means

Error "custom_ops cannot both enable and disable the same operation(s): {', '.join(conflicting_ops)}. Remove either the '+' or '-' directive" thrown in vllm-project/vllm.

Source

Thrown at vllm/config/compilation.py:1016

        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'"
            )

        enabled_ops = {op[1:] for op in self.custom_ops if op.startswith("+")}
        disabled_ops = {op[1:] for op in self.custom_ops if op.startswith("-")}
        conflicting_ops = sorted(enabled_ops & disabled_ops)
        if conflicting_ops:
            raise ValueError(
                "custom_ops cannot both enable and disable the same operation(s): "
                f"{', '.join(conflicting_ops)}. Remove either the '+' or '-' directive"
            )

        # Currently only eager and inductor backend are supported.
        # for piecewise compilation. Custom backends are not supported for
        # piecewise compilation. Update when more backends are supported.
        if self.mode == CompilationMode.VLLM_COMPILE and self.backend not in [
            "",
            "eager",
            "inductor",
        ]:
            raise ValueError(
                f"Invalid backend for piecewise compilation: {self.backend}"
            )

        # Validate encoder CUDA graph configuration
        if (

View on GitHub (pinned to c794754062)

Solutions

  1. Remove either the '+op' or '-op' entry for each conflicting op so each op is enabled or disabled only once.
  2. Inspect the conflicting op names listed in the error and deduplicate your custom_ops list.

When it happens

Trigger: Raised at vllm/config/compilation.py:1016 when validation fails: custom_ops cannot both enable and disable the same operation(s). Typically triggered by an incompatible or incomplete vLLM configuration, an unsupported platform/backend combination, or a runtime resource/dependency that is missing.

Common situations: Commonly encountered at vllm/config/compilation.py:1016 during vLLM startup/config validation or runtime setup when: (1) conflicting CLI flags or config fields are combined, (2) the current platform (CUDA/ROCm/CPU/XPU) or installed optional packages do not support the requested feature, or (3) a required value is absent or out of range. Resolve by correcting the configuration as described in the message, or by selecting a supported alternative.


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