From 3a100b9278d1d2b27537fc86f14fb88d8c27466f Mon Sep 17 00:00:00 2001 From: Varun Sundar Rabindranath Date: Sun, 6 Apr 2025 10:04:50 -0400 Subject: [PATCH] [Bugfix] LoRA : Fix the order in which the kernels process LoRAs (#16040) Signed-off-by: Varun Sundar Rabindranath Co-authored-by: Varun Sundar Rabindranath --- vllm/lora/ops/triton_ops/lora_kernel_metadata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm/lora/ops/triton_ops/lora_kernel_metadata.py b/vllm/lora/ops/triton_ops/lora_kernel_metadata.py index 1dcdfc814a891..055e78f406f3e 100644 --- a/vllm/lora/ops/triton_ops/lora_kernel_metadata.py +++ b/vllm/lora/ops/triton_ops/lora_kernel_metadata.py @@ -111,7 +111,7 @@ class LoRAKernelMeta: # active_lora_ids, num_tokens_per_lora lora_ids, num_tokens_per_lora = torch.unique(token_lora_mapping, - sorted=False, + sorted=True, return_counts=True) self.active_lora_ids[:lora_ids.size(0)].copy_(lora_ids, non_blocking=True)