vllm-project/vllm · error · ValueError
No compilation mode is set.
Error message
No compilation mode is set.
What it means
Error "No compilation mode is set." thrown in vllm-project/vllm.
Source
Thrown at vllm/config/compilation.py:1086
) -> str | Callable:
"""
Initialize the backend for the compilation config from a vllm config.
Arguments:
vllm_config: The vllm config to initialize the backend from.
prefix: Cache directory prefix for this compiled module.
is_encoder: Whether this module is used in an encoder (as
opposed to a text backbone).
Returns:
The backend for the compilation config.
"""
if self.mode is None:
raise ValueError(
"No compilation mode is set. This method should only be "
"called via vllm config where the level is set if none is "
"provided."
)
if self.mode == CompilationMode.NONE:
raise ValueError("No compilation mode is set.")
from torch._dynamo.backends.registry import list_backends
torch_backends = list_backends(exclude_tags=tuple())
if self.mode in [
CompilationMode.STOCK_TORCH_COMPILE,
CompilationMode.DYNAMO_TRACE_ONCE,
]:
if self.backend in torch_backends:
return self.backend
return resolve_obj_by_qualname(self.backend)
assert self.mode == CompilationMode.VLLM_COMPILE
if self.backend not in ["eager", "inductor"]:
logger.info("Using OOT custom backend for compilation.")
from vllm.compilation.backends import VllmBackend
View on GitHub (pinned to c794754062)
Solutions
- Set a compilation mode (e.g. -O0 through -O3 or --compilation-config level=N) before calling this method.
When it happens
Trigger: Raised at vllm/config/compilation.py:1086 when validation fails: No compilation mode is set.. 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:1086 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/adc3e8650e5996df.
Report an issue: GitHub.