From f919d4cb8faac8c869ab87ee705dbd340fae4679 Mon Sep 17 00:00:00 2001 From: Eugene Cheah Date: Sun, 10 Aug 2025 22:52:31 -0700 Subject: [PATCH] [BugFix] Fix logits repetition penalty cuda check (#22592) --- vllm/_custom_ops.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm/_custom_ops.py b/vllm/_custom_ops.py index 92de394180..70605d3c5f 100644 --- a/vllm/_custom_ops.py +++ b/vllm/_custom_ops.py @@ -311,7 +311,7 @@ def apply_repetition_penalties(logits: torch.Tensor, prompt_mask: torch.Tensor, output_mask: A boolean tensor indicating which tokens appear in the output. repetition_penalties: The repetition penalties of shape (num_seqs, ). """ - if current_platform.is_cuda() and logits.is_contiguous(): + if logits.is_cuda and logits.is_contiguous(): apply_repetition_penalties_cuda(logits, prompt_mask, output_mask, repetition_penalties) else: