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, 07:15 UTC
[Misc] Remove unnecessary fallback to prefill-decode attention (#19138)
Signed-off-by: vllmellm <vllm.ellm@embeddedllm.com>
vllmellm committed
Jun 5, 2025 at 16:08 UTC
18093084be935fe8aad11a45366bea060b33d60f
1 file changed
+1
-4
vllm/v1/attention/backends/triton_attn.py
+1
-4
@@ -171,10 +171,7 @@ class TritonAttentionImpl(AttentionImpl):
171
# Whenever making a change in this method, please benchmark the
172
# performance to make sure it does not introduce any overhead.
173
174
- num_queries_per_kv = query.shape[1] // key.shape[1]
175
- num_q_is_pow2 = (num_queries_per_kv & (num_queries_per_kv - 1)) == 0
176
- use_prefill_decode_attn = (self.force_prefill_decode_attn
177
- or not num_q_is_pow2)
174
+ use_prefill_decode_attn = self.force_prefill_decode_attn
175
num_actual_tokens = attn_metadata.num_actual_tokens
176
177
if use_prefill_decode_attn: