A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 15, 13:30 UTC
[Perf] Optimize `_update_states` for GPU model runner (#16910)
Signed-off-by: snowcharm <snowcharmqq@gmail.com>
SnowCharm committed
Apr 22, 2025 at 14:01 UTC
a114bf20a3ef3c03ee6fc127cde0d1422de4be6c
1 file changed
+1
-1
vllm/v1/worker/gpu_model_runner.py
+1
-1
@@ -454,7 +454,7 @@ class GPUModelRunner(LoRAModelRunnerMixin):
454
455
# Add the new or resumed requests to the persistent batch.
456
# The smaller empty indices are filled first.
457
- removed_req_indices = sorted(removed_req_indices, reverse=True)
457
+ removed_req_indices.sort(reverse=True)
458
for req_id in req_ids_to_add:
459
req_state = self.requests[req_id]
460
if removed_req_indices: