From ff1860bd813401ea435e1a696f0f25cfdde20fdd Mon Sep 17 00:00:00 2001 From: Wang Kunpeng <1289706727@qq.com> Date: Wed, 25 Mar 2026 18:48:10 +0800 Subject: [PATCH] [CI]fix lint (#7641) ### What this PR does / why we need it? This pull request addresses a linting issue by reordering a specific configuration assignment within the `apply_config_platform_defaults` method in `vllm_ascend/platform.py`. This change ensures compliance with code style guidelines without altering the functional behavior of the system. ### Does this PR introduce _any_ user-facing change? ### How was this patch tested? - vLLM version: v0.18.0 - vLLM main: https://github.com/vllm-project/vllm/commit/ed359c497a728f08b5b41456c07a688ccd510fbc Signed-off-by: Wang Kunpeng <1289706727@qq.com> --- vllm_ascend/platform.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/vllm_ascend/platform.py b/vllm_ascend/platform.py index 324b693a..0034a653 100644 --- a/vllm_ascend/platform.py +++ b/vllm_ascend/platform.py @@ -189,12 +189,6 @@ class NPUPlatform(Platform): return min(max_num_seqs * decode_query_len, 512) - @classmethod - def apply_config_platform_defaults(cls, vllm_config: VllmConfig) -> None: - default_max_cg_capture_size = cls._get_default_max_cudagraph_capture_size(vllm_config) - if default_max_cg_capture_size is not None: - vllm_config.compilation_config.max_cudagraph_capture_size = default_max_cg_capture_size - @classmethod def get_device_capability(cls, device_id: int = 0): return None @@ -209,6 +203,10 @@ class NPUPlatform(Platform): pass_config.sp_min_token_num = get_sp_min_token_num(vllm_config) logger.info(f"set sp_min_token_num to {pass_config.sp_min_token_num}") + default_max_cg_capture_size = cls._get_default_max_cudagraph_capture_size(vllm_config) + if default_max_cg_capture_size is not None: + vllm_config.compilation_config.max_cudagraph_capture_size = default_max_cg_capture_size + @classmethod def get_device_name(cls, device_id: int = 0) -> str: return torch.npu.get_device_name(device_id)