[Misc] Remove unnecessary fallback to prefill-decode attention (#19138)

Signed-off-by: vllmellm <vllm.ellm@embeddedllm.com>
This commit is contained in:
vllmellm
2025-06-05 16:08:26 +08:00
committed by GitHub
parent da40380214
commit 18093084be

View File

@ -171,10 +171,7 @@ class TritonAttentionImpl(AttentionImpl):
# Whenever making a change in this method, please benchmark the
# performance to make sure it does not introduce any overhead.
num_queries_per_kv = query.shape[1] // key.shape[1]
num_q_is_pow2 = (num_queries_per_kv & (num_queries_per_kv - 1)) == 0
use_prefill_decode_attn = (self.force_prefill_decode_attn
or not num_q_is_pow2)
use_prefill_decode_attn = self.force_prefill_decode_attn
num_actual_tokens = attn_metadata.num_actual_tokens
if use_prefill_decode_attn: