[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: https://github.com/vllm-project/vllm/commit/releases/v0.11.0 --------- Signed-off-by: weijinqian_v1 <weijinqian@huawei.com> Co-authored-by: weijinqian_v1 <weijinqian@huawei.com>
This commit is contained in:
@@ -106,7 +106,7 @@ def set_ascend_forward_context(
|
||||
# Currently, it is an empirical value. In normal scenarios, if the concurrency exceeds this threshold,
|
||||
# the performance benefits can be maximized. Conversely, if the concurrency is below the threshold,
|
||||
# the performance may degrade due to the switching of communication methods.
|
||||
sp_enabled = enable_sp() and \
|
||||
sp_enabled = enable_sp(vllm_config) and \
|
||||
tp_world_size > 1 and \
|
||||
num_tokens is not None and num_tokens > 1000
|
||||
|
||||
|
||||
@@ -597,11 +597,12 @@ def dense_optim_enable() -> bool:
|
||||
return envs_ascend.VLLM_ASCEND_ENABLE_DENSE_OPTIMIZE
|
||||
|
||||
|
||||
def enable_sp() -> bool:
|
||||
from vllm.config import get_cached_compilation_config
|
||||
|
||||
def enable_sp(vllm_config=None) -> bool:
|
||||
if vllm_config is None:
|
||||
from vllm.config import get_current_vllm_config
|
||||
vllm_config = get_current_vllm_config()
|
||||
return (
|
||||
get_cached_compilation_config().pass_config.enable_sequence_parallelism
|
||||
vllm_config.compilation_config.pass_config.enable_sequence_parallelism
|
||||
or envs_ascend.VLLM_ASCEND_ENABLE_FLASHCOMM)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user