Skip to content

Commit eb70ff2

Browse files
author
赵江江
committed
fix: dbo fit on 0.9.1
Signed-off-by: 赵江江 <[email protected]>
1 parent 3f65494 commit eb70ff2

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

vllm_ascend/platform.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
from vllm.logger import logger
2828
from vllm.platforms import Platform, PlatformEnum
2929

30+
import vllm_ascend.envs as envs_ascend
3031
from vllm_ascend.ascend_config import check_ascend_config, init_ascend_config
3132
from vllm_ascend.utils import (ASCEND_QUATIZATION_METHOD,
3233
check_torchair_cache_exist,
@@ -147,14 +148,19 @@ def check_and_update_config(cls, vllm_config: VllmConfig) -> None:
147148

148149
check_ascend_config(vllm_config, enforce_eager)
149150

151+
if vllm_config.speculative_config and envs_ascend.VLLM_ASCEND_ENABLE_DBO:
152+
raise ValueError(
153+
"DBO and mtp can't work at the same time. Please `export VLLM_ASCEND_ENABLE_DBO=0`"
154+
)
155+
150156
if enforce_eager or compilation_config.level == CompilationLevel.NO_COMPILATION:
151157
logger.info("Compilation disabled, using eager mode by default")
152158
compilation_config.level = CompilationLevel.NO_COMPILATION
153159
elif compilation_config.level != CompilationLevel.PIECEWISE:
154160
logger.warning(
155161
"NPU does not support %s compilation level. Setting level to NO_COMPILATION",
156162
compilation_config.level)
157-
compilation_config.level = CompilationLevel.NO_COMPILATION
163+
compilation_config.level = CompilationLevel.NfvO_COMPILATION
158164
elif ascend_config.torchair_graph_config.enabled:
159165
logger.info(
160166
"Torchair compilation enabled on NPU. Setting level to NO_COMPILATION"

vllm_ascend/worker/model_runner_v1.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,6 @@ def __init__(self, vllm_config: VllmConfig, device: torch.device):
219219
self.spec_token_num = 0
220220
self.decode_token_per_req = 1
221221
if self.speculative_config:
222-
if envs_ascend.VLLM_ASCEND_ENABLE_DBO:
223-
raise NotImplementedError(
224-
"DBO and mtp can't work at the same currently")
225222
self.use_spec_decode = True
226223
self.spec_token_num = self.speculative_config.num_speculative_tokens
227224
assert self.spec_token_num > 0

0 commit comments

Comments
 (0)