From 2a719e0865d68ef930c53f9b46f718c31ed39377 Mon Sep 17 00:00:00 2001 From: Wentao Ye <44945378+yewentao256@users.noreply.github.com> Date: Mon, 12 Jan 2026 23:11:37 -0500 Subject: [PATCH] [Perf] Optimize requests abort (#32211) Signed-off-by: yewentao256 --- vllm/v1/engine/async_llm.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/vllm/v1/engine/async_llm.py b/vllm/v1/engine/async_llm.py index 380a1567b..454e20ad1 100644 --- a/vllm/v1/engine/async_llm.py +++ b/vllm/v1/engine/async_llm.py @@ -525,9 +525,10 @@ class AsyncLLM(EngineClient): await asyncio.sleep(0) # 3) Abort any reqs that finished due to stop strings. - await engine_core.abort_requests_async( - processed_outputs.reqs_to_abort - ) + if processed_outputs.reqs_to_abort: + await engine_core.abort_requests_async( + processed_outputs.reqs_to_abort + ) output_processor.update_scheduler_stats(outputs.scheduler_stats)