5
5
6
6
import torch .nn as nn
7
7
8
- from vllm .config import get_current_vllm_config
8
+ from vllm .config import get_cached_compilation_config
9
9
from vllm .logger import init_logger
10
10
from vllm .platforms import current_platform
11
11
@@ -86,7 +86,7 @@ def forward_oot(self, *args, **kwargs):
86
86
def dispatch_forward (self ):
87
87
# NOTE(woosuk): Here we assume that vLLM was built for only one
88
88
# specific backend. Currently, we do not support dynamic dispatching.
89
- compilation_config = get_current_vllm_config (). compilation_config
89
+ compilation_config = get_cached_compilation_config ()
90
90
enabled = self .enabled ()
91
91
if enabled :
92
92
compilation_config .enabled_custom_ops .update ([self .__class__ .name ])
@@ -115,7 +115,7 @@ def dispatch_forward(self):
115
115
@classmethod
116
116
def enabled (cls ) -> bool :
117
117
# if no name, then it was not registered
118
- compilation_config = get_current_vllm_config (). compilation_config
118
+ compilation_config = get_cached_compilation_config ()
119
119
custom_ops = compilation_config .custom_ops
120
120
if not hasattr (cls , "name" ):
121
121
logger .warning_once (
@@ -138,7 +138,7 @@ def default_on() -> bool:
138
138
Specifying 'all' or 'none' in custom_op takes precedence.
139
139
"""
140
140
from vllm .config import CompilationLevel
141
- compilation_config = get_current_vllm_config (). compilation_config
141
+ compilation_config = get_cached_compilation_config ()
142
142
default_on = (compilation_config .level < CompilationLevel .PIECEWISE
143
143
or not compilation_config .use_inductor )
144
144
count_none = compilation_config .custom_ops .count ("none" )
0 commit comments