Skip to content

Commit 8870966

Browse files
weijinqian0weijinqian_v1
andauthored
[bugfix] Fix warning bug: model config is None. (#3238)
Cleanup wrong warning log error: model config is None - vLLM version: v0.10.2 - vLLM main: vllm-project/vllm@releases/v0.11.0 --------- Signed-off-by: weijinqian_v1 <[email protected]> Co-authored-by: weijinqian_v1 <[email protected]>
1 parent 15b8aff commit 8870966

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

vllm_ascend/ascend_forward_context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def set_ascend_forward_context(
106106
# Currently, it is an empirical value. In normal scenarios, if the concurrency exceeds this threshold,
107107
# the performance benefits can be maximized. Conversely, if the concurrency is below the threshold,
108108
# the performance may degrade due to the switching of communication methods.
109-
sp_enabled = enable_sp() and \
109+
sp_enabled = enable_sp(vllm_config) and \
110110
tp_world_size > 1 and \
111111
num_tokens is not None and num_tokens > 1000
112112

vllm_ascend/utils.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -597,11 +597,12 @@ def dense_optim_enable() -> bool:
597597
return envs_ascend.VLLM_ASCEND_ENABLE_DENSE_OPTIMIZE
598598

599599

600-
def enable_sp() -> bool:
601-
from vllm.config import get_cached_compilation_config
602-
600+
def enable_sp(vllm_config=None) -> bool:
601+
if vllm_config is None:
602+
from vllm.config import get_current_vllm_config
603+
vllm_config = get_current_vllm_config()
603604
return (
604-
get_cached_compilation_config().pass_config.enable_sequence_parallelism
605+
vllm_config.compilation_config.pass_config.enable_sequence_parallelism
605606
or envs_ascend.VLLM_ASCEND_ENABLE_FLASHCOMM)
606607

607608

0 commit comments

Comments
 (0)