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 11, 11:15 UTC
[Bugfix] Fix ViT with FlashAttention on ROCm (#30703)
Signed-off-by: Matthew Bonanni <mbonanni@redhat.com>
Matthew Bonanni committed
Dec 15, 2025 at 14:45 UTC
51e5b3e3c422cdd81e3c1bd2b9abd025e53ae986
1 file changed
+4
-1
vllm/attention/layer.py
+4
-1
@@ -464,7 +464,10 @@ class MultiHeadAttention(nn.Module):
464
}
465
466
self.fa_version = None
467
- if self.attn_backend == AttentionBackendEnum.FLASH_ATTN:
467
+ if (
468
+ self.attn_backend == AttentionBackendEnum.FLASH_ATTN
469
+ and current_platform.is_cuda()
470
+ ):
471
self.fa_version = get_flash_attn_version()
472
assert self._flash_attn_varlen_func is not None
473
self._flash_attn_varlen_func = functools.partial(