From acdc53c2f6b480f23f40ea9e72356182386e0bac Mon Sep 17 00:00:00 2001 From: weiguihua2 Date: Wed, 27 Aug 2025 10:36:23 +0800 Subject: [PATCH] [Bugfix] Fix the bug of cos invalid shape when dp (#2558) ### What this PR does / why we need it? Fix the bug of cos invalid shape when dp ### How was this patch tested? - vLLM version: v0.10.1.1 - vLLM main: https://github.com/vllm-project/vllm/commit/1fdc732419d9b9eb00e003f38d6e02c480131ac8 Signed-off-by: weiguihua2 --- vllm_ascend/torchair/torchair_model_runner.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vllm_ascend/torchair/torchair_model_runner.py b/vllm_ascend/torchair/torchair_model_runner.py index 268e56e..c8e0bf1 100644 --- a/vllm_ascend/torchair/torchair_model_runner.py +++ b/vllm_ascend/torchair/torchair_model_runner.py @@ -419,3 +419,7 @@ class NPUTorchairModelRunner(NPUModelRunner): def _build_drafter_prepare_inputs_torchair_param(self): return True + + def get_dp_padding(self, num_tokens): + """Override from NPUModelRunner to get dp padding""" + return 0, None