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 5, 04:45 UTC
[ROCm] Align AiterFlashAttentionImpl attn_type check with backend (#39119)
Signed-off-by: Bortlesboat <bortstheboat@gmail.com>
Andrew Barnes committed
Apr 14, 2026 at 13:36 UTC
e64b39ea7114d7294db1da9766f5f9a88ef4ed25
1 file changed
+6
-2
vllm/v1/attention/backends/rocm_aiter_fa.py
+6
-2
@@ -844,9 +844,13 @@ class AiterFlashAttentionImpl(AttentionImpl):
844
assert self.num_heads % self.num_kv_heads == 0
845
self.num_queries_per_kv = self.num_heads // self.num_kv_heads
846
847
- if attn_type not in [AttentionType.DECODER, AttentionType.ENCODER_DECODER]:
847
+ if attn_type != AttentionType.DECODER:
848
raise NotImplementedError(
849
- "Encoder self-attention is not implemented for AiterFlashAttentionImpl"
849
+ "Only decoder self-attention is supported for "
850
+ "AiterFlashAttentionImpl. ENCODER_DECODER is not supported "
851
+ "because the prefill path uses cu_seqlens_k set to decoder "
852
+ "query_start_loc with causal=True, which is incorrect for "
853
+ "cross-attention."
854
)
855
856
def extend_for_sliding_window(