Skip to content

Commit ce8edb6

Browse files
added levels default
Signed-off-by: morrison-turnansky <mturnans@redhat.com>
1 parent 61f71a8 commit ce8edb6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

vllm/config/compilation.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from pydantic import TypeAdapter, field_validator
1212
from pydantic.dataclasses import dataclass
1313

14+
import vllm.envs as envs
1415
from vllm.compilation.inductor_pass import CallableInductorPass, InductorPass
1516
from vllm.config.utils import config
1617
from vllm.logger import init_logger
@@ -532,6 +533,15 @@ def __post_init__(self) -> None:
532533
if self.backend == "":
533534
self.backend = "inductor"
534535

536+
# Come back to!
537+
if self.level is None:
538+
if envs.VLLM_USE_V1:
539+
self.level = CompilationLevel.PIECEWISE
540+
else:
541+
# NB: Passing both --enforce-eager and a compilation level
542+
# in V0 means the compilation level wins out.
543+
self.level = CompilationLevel.NO_COMPILATION
544+
535545
if count_none + count_all == 0:
536546
if self.level > 0 and self.backend != "eager":
537547
self.custom_ops.insert(0, "none")

0 commit comments

Comments
 (0)