Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions vllm_fl/dispatch/backends/vendor/gcu/gcu.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,11 @@ def rotary_embedding(
)

def attention_backend(self, use_mla: bool = False, use_sparse: bool = False) -> str:
from vllm.v1.attention.backends.registry import AttentionBackendEnum

if use_mla:
if use_sparse:
raise NotImplementedError("GCU does not support sparse attention yet")
raise NotImplementedError("GCU does not support MLA yet")

import flash_attn.vllm_flash_attn

sys.modules["vllm.vllm_flash_attn"] = flash_attn.vllm_flash_attn

return AttentionBackendEnum.FLASH_ATTN.get_path()
# GCU uses a standalone flash_attn backend (AttentionGCUBackend) that calls
# Enflame's native flash_attn_varlen_func directly, without depending on
# vllm upstream FlashAttentionBackend / FlashAttentionImpl.
return "vllm_fl.dispatch.backends.vendor.gcu.impl.attention.AttentionGCUBackend"
Loading
Loading