@@ -119,24 +119,14 @@ def mem_get_info(cls) -> Tuple[int, int]:
119
119
def check_and_update_config (cls , vllm_config : VllmConfig ) -> None :
120
120
from vllm .config import CompilationLevel # noqa: E402
121
121
compilation_config = vllm_config .compilation_config
122
+ model_config = vllm_config .model_config
122
123
123
- if vllm_config . model_config is None :
124
+ if model_config is None :
124
125
logger .warning ("Model config is missing. This may indicate "
125
126
"that we are running a test case" )
126
127
enforce_eager = False
127
128
else :
128
- enforce_eager = getattr (vllm_config .model_config , "enforce_eager" ,
129
- False )
130
- # TODO: revert this modification on compilation_config.level
131
- # when aclgraph is fully supported
132
- compilation_config .level = CompilationLevel .NO_COMPILATION
133
- logger .warning (
134
- "ACL Graph mode is currently experimental and disabled "
135
- "by default. 1. Adopt additional_config={'enable_aclgraph': True} to try"
136
- " with aclgraph on V1 engine to serve dense models. "
137
- "2. Adopt additional_config={'enable_graph_mode': True} "
138
- "to serve deepseek models with NPU graph mode on vllm-ascend with V0 engine."
139
- )
129
+ enforce_eager = getattr (model_config , "enforce_eager" , False )
140
130
141
131
if vllm_config .additional_config is not None :
142
132
enable_graph_mode = vllm_config .additional_config .get (
@@ -151,20 +141,20 @@ def check_and_update_config(cls, vllm_config: VllmConfig) -> None:
151
141
"NPU graph mode is still experimental and not supported for V1 without mla currently, "
152
142
"it has been disabled automatically." )
153
143
vllm_config .additional_config ["enable_graph_mode" ] = False
154
-
155
- enable_aclgraph = vllm_config . additional_config . get (
156
- "enable_aclgraph" , False )
157
- if enable_aclgraph :
158
- if envs . VLLM_USE_V1 :
159
- logger . info (
160
- "Enabling ACL graph mode, note it is still experimental currently, "
161
- "raise issue on https://github.com/vllm-project/vllm-ascend/issues if needed ."
162
- )
163
- compilation_config . level = CompilationLevel . PIECEWISE
164
- else :
165
- logger . warning (
166
- "ACL graph mode is only support on V1 engine. "
167
- "Disabling it as now running on V0 engine. " )
144
+ elif envs . VLLM_USE_V1 and not enforce_eager :
145
+ model_type = model_config . hf_config . model_type
146
+ if "deepseek" in model_type :
147
+ raise NotImplementedError (
148
+ "ACL Graph does not support deepseek. Please "
149
+ "adopt additional_config={'enable_graph_mode': True} "
150
+ "to serve deepseek models with NPU graph mode on vllm-ascend with V0 engine. "
151
+ " Or set `enforce_eager=True` to use eager mode on V1 engine ."
152
+ )
153
+ elif "qwen" not in model_type :
154
+ logger . warning (
155
+ "ACL Graph is currently experimental. Please "
156
+ "raise an issue on https://github.com/vllm-project/vllm-ascend/issues "
157
+ " if you encourage any Error " )
168
158
169
159
if enforce_eager or compilation_config .level == CompilationLevel .NO_COMPILATION :
170
160
logger .info ("Compilation disabled, using eager mode by default" )
0 commit comments