From 88c56e3bf24125b80349585dcae4368afcab5b52 Mon Sep 17 00:00:00 2001 From: Li Wang Date: Thu, 12 Mar 2026 18:27:48 +0800 Subject: [PATCH] [Misc] Fix main lint to make CI happy (#7204) ### What this PR does / why we need it? Fix lint failed due to the merging of a previous PR. ### Does this PR introduce _any_ user-facing change? ### How was this patch tested? - vLLM version: v0.16.0 - vLLM main: https://github.com/vllm-project/vllm/commit/4034c3d32e30d01639459edd3ab486f56993876d --------- Signed-off-by: wangli --- .github/workflows/_pre_commit.yml | 1 - vllm_ascend/_310p/model_runner_310p.py | 10 +++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/_pre_commit.yml b/.github/workflows/_pre_commit.yml index 4cbfe3a2..9a15f4a3 100644 --- a/.github/workflows/_pre_commit.yml +++ b/.github/workflows/_pre_commit.yml @@ -76,7 +76,6 @@ jobs: run: | PYTHONPATH="$PYTHONPATH:$(pwd)/vllm-empty" export PYTHONPATH - env git config --global --add safe.directory /__w/vllm-ascend/vllm-ascend # Run mypy for Python 3.10, 3.11, 3.12 manually # Note: We are now separating mypy from pre-commit hooks for performance reasons. diff --git a/vllm_ascend/_310p/model_runner_310p.py b/vllm_ascend/_310p/model_runner_310p.py index d4a15785..9e1e3985 100644 --- a/vllm_ascend/_310p/model_runner_310p.py +++ b/vllm_ascend/_310p/model_runner_310p.py @@ -22,6 +22,7 @@ from contextlib import contextmanager, nullcontext import numpy as np import torch import torch_npu +from vllm.config import CUDAGraphMode from vllm.logger import logger from vllm.v1.core.sched.output import SchedulerOutput from vllm.v1.kv_cache_interface import AttentionSpec, KVCacheConfig, MambaSpec @@ -103,7 +104,14 @@ class NPUModelRunner310(NPUModelRunner): num_encoder_reqs=num_encoder_reqs, ) - def _pad_query_start_loc_for_fia(self, num_tokens_padded: int, num_reqs_padded: int, num_reqs: int) -> int: + def _pad_query_start_loc_for_fia( + self, + num_tokens_padded: int, + num_reqs_padded: int, + num_reqs: int, + cudagraph_runtime_mode: CUDAGraphMode | None = None, + batch_desc_num_reqs: int | None = None, + ) -> int: # Keep this aligned with the dispatcher because batch_desc.num_reqs is # generated by dispatcher._create_padded_batch_descriptor(). # For 310P ngram we intentionally set dispatcher q_len=1, while runner's