[diffusion] refactor: move SLA to attention_backend folder (#17020)

This commit is contained in:
HuangJi
2026-01-15 21:36:48 +08:00
committed by GitHub
parent e997995037
commit e7df8bdc5c
6 changed files with 422 additions and 296 deletions
@@ -245,6 +245,9 @@ class CudaPlatformBase(Platform):
elif selected_backend == AttentionBackendEnum.TORCH_SDPA:
logger.info("Using Torch SDPA backend")
return "sglang.multimodal_gen.runtime.layers.attention.backends.sdpa.SDPABackend"
elif selected_backend == AttentionBackendEnum.SLA_ATTN:
logger.info("Using Sparse Linear Attention backend")
return "sglang.multimodal_gen.runtime.layers.attention.backends.sparse_linear_attn.SparseLinearAttentionBackend"
elif selected_backend in [
AttentionBackendEnum.FA,
]:
@@ -33,6 +33,7 @@ class AttentionBackendEnum(enum.Enum):
VIDEO_SPARSE_ATTN = enum.auto()
VMOBA_ATTN = enum.auto()
AITER = enum.auto()
SLA_ATTN = enum.auto()
NO_ATTENTION = enum.auto()
def __str__(self):