From df05c6c01e6e50dfe230e41519ee0396e620e102 Mon Sep 17 00:00:00 2001 From: shikang-hangzhou <459956190@qq.com> Date: Tue, 12 Aug 2025 10:48:29 +0800 Subject: [PATCH 1/5] fix error info Signed-off-by: shikang-hangzhou <459956190@qq.com> --- vllm_ascend/platform.py | 5 +++++ vllm_ascend/worker/model_runner_v1.py | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/vllm_ascend/platform.py b/vllm_ascend/platform.py index ad7b9838f0..3f1fdcaa9e 100644 --- a/vllm_ascend/platform.py +++ b/vllm_ascend/platform.py @@ -29,6 +29,7 @@ from vllm_ascend.ascend_config import check_ascend_config, init_ascend_config from vllm_ascend.utils import ASCEND_QUATIZATION_METHOD, update_aclgraph_sizes +import vllm_ascend.envs as envs_ascend if TYPE_CHECKING: from vllm.config import ModelConfig, VllmConfig @@ -144,6 +145,10 @@ def check_and_update_config(cls, vllm_config: VllmConfig) -> None: check_ascend_config(vllm_config, enforce_eager) + if vllm_config.speculative_config and envs_ascend.VLLM_ASCEND_ENABLE_DBO: + raise NotImplementedError( + "DBO and mtp can't work at the same time. Please `export VLLM_ASCEND_ENABLE_DBO=0`") + if enforce_eager or compilation_config.level == CompilationLevel.NO_COMPILATION: logger.info("Compilation disabled, using eager mode by default") compilation_config.level = CompilationLevel.NO_COMPILATION diff --git a/vllm_ascend/worker/model_runner_v1.py b/vllm_ascend/worker/model_runner_v1.py index 9ad1191917..bd109ab1a1 100644 --- a/vllm_ascend/worker/model_runner_v1.py +++ b/vllm_ascend/worker/model_runner_v1.py @@ -220,9 +220,6 @@ def __init__(self, vllm_config: VllmConfig, device: torch.device): self.spec_token_num = 0 self.decode_token_per_req = 1 if self.speculative_config: - if envs_ascend.VLLM_ASCEND_ENABLE_DBO: - raise NotImplementedError( - "DBO and mtp can't work at the same currently") self.use_spec_decode = True self.spec_token_num = self.speculative_config.num_speculative_tokens assert self.spec_token_num > 0 From be9f82302c6628e16f9dfeaca4f00f3c9f67cdcb Mon Sep 17 00:00:00 2001 From: shikang-hangzhou <459956190@qq.com> Date: Tue, 12 Aug 2025 10:49:38 +0800 Subject: [PATCH 2/5] fix error info Signed-off-by: shikang-hangzhou <459956190@qq.com> --- vllm_ascend/platform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm_ascend/platform.py b/vllm_ascend/platform.py index 3f1fdcaa9e..82c049d355 100644 --- a/vllm_ascend/platform.py +++ b/vllm_ascend/platform.py @@ -27,9 +27,9 @@ from vllm.logger import logger from vllm.platforms import Platform, PlatformEnum +import vllm_ascend.envs as envs_ascend from vllm_ascend.ascend_config import check_ascend_config, init_ascend_config from vllm_ascend.utils import ASCEND_QUATIZATION_METHOD, update_aclgraph_sizes -import vllm_ascend.envs as envs_ascend if TYPE_CHECKING: from vllm.config import ModelConfig, VllmConfig From 94bd08af4494ba5a4b5b2ae969592a60fa6e0b9c Mon Sep 17 00:00:00 2001 From: shikang-hangzhou <459956190@qq.com> Date: Tue, 12 Aug 2025 10:57:39 +0800 Subject: [PATCH 3/5] fix error info Signed-off-by: shikang-hangzhou <459956190@qq.com> --- vllm_ascend/platform.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vllm_ascend/platform.py b/vllm_ascend/platform.py index 82c049d355..5994db86c4 100644 --- a/vllm_ascend/platform.py +++ b/vllm_ascend/platform.py @@ -147,8 +147,8 @@ def check_and_update_config(cls, vllm_config: VllmConfig) -> None: if vllm_config.speculative_config and envs_ascend.VLLM_ASCEND_ENABLE_DBO: raise NotImplementedError( - "DBO and mtp can't work at the same time. Please `export VLLM_ASCEND_ENABLE_DBO=0`") - + "DBO and mtp can't work at the same time. Please `export VLLM_ASCEND_ENABLE_DBO=0`" + ) if enforce_eager or compilation_config.level == CompilationLevel.NO_COMPILATION: logger.info("Compilation disabled, using eager mode by default") compilation_config.level = CompilationLevel.NO_COMPILATION From 1e16ad40040fa9d341f58a75913e90809631faab Mon Sep 17 00:00:00 2001 From: shikang-hangzhou <459956190@qq.com> Date: Tue, 12 Aug 2025 10:59:48 +0800 Subject: [PATCH 4/5] fix error info Signed-off-by: shikang-hangzhou <459956190@qq.com> --- vllm_ascend/platform.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vllm_ascend/platform.py b/vllm_ascend/platform.py index 5994db86c4..65a80c5a9d 100644 --- a/vllm_ascend/platform.py +++ b/vllm_ascend/platform.py @@ -146,9 +146,8 @@ def check_and_update_config(cls, vllm_config: VllmConfig) -> None: check_ascend_config(vllm_config, enforce_eager) if vllm_config.speculative_config and envs_ascend.VLLM_ASCEND_ENABLE_DBO: - raise NotImplementedError( - "DBO and mtp can't work at the same time. Please `export VLLM_ASCEND_ENABLE_DBO=0`" - ) + raise ValueError( + "DBO and mtp can't work at the same time. Please `export VLLM_ASCEND_ENABLE_DBO=0`") if enforce_eager or compilation_config.level == CompilationLevel.NO_COMPILATION: logger.info("Compilation disabled, using eager mode by default") compilation_config.level = CompilationLevel.NO_COMPILATION From bda896544a85b3c849f1406ac31b3630fd016001 Mon Sep 17 00:00:00 2001 From: shikang-hangzhou <459956190@qq.com> Date: Tue, 12 Aug 2025 11:19:58 +0800 Subject: [PATCH 5/5] fix error info Signed-off-by: shikang-hangzhou <459956190@qq.com> --- vllm_ascend/platform.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vllm_ascend/platform.py b/vllm_ascend/platform.py index 65a80c5a9d..a7c062305b 100644 --- a/vllm_ascend/platform.py +++ b/vllm_ascend/platform.py @@ -147,7 +147,8 @@ def check_and_update_config(cls, vllm_config: VllmConfig) -> None: if vllm_config.speculative_config and envs_ascend.VLLM_ASCEND_ENABLE_DBO: raise ValueError( - "DBO and mtp can't work at the same time. Please `export VLLM_ASCEND_ENABLE_DBO=0`") + "DBO and mtp can't work at the same time. Please `export VLLM_ASCEND_ENABLE_DBO=0`" + ) if enforce_eager or compilation_config.level == CompilationLevel.NO_COMPILATION: logger.info("Compilation disabled, using eager mode by default") compilation_config.level = CompilationLevel.NO_COMPILATION @@ -165,7 +166,7 @@ def check_and_update_config(cls, vllm_config: VllmConfig) -> None: logger.warning( "Ray distributed executor backend is not compatible with ACL Graph mode " "right now. Setting level to NO_COMPILATION") - compilation_config.level = CompilationLevel.NO_COMPILATION + compilation_config.level = CompilationLevel.NfvO_COMPILATION else: logger.info( "PIECEWISE compilation enabled on NPU. use_inductor not supported - "