2024-01-25 09:01:48 +00:00
|
|
|
from .flash_attention_dao_cuda import FlashAttentionDaoCudaExtension
|
|
|
|
from .flash_attention_npu import FlashAttentionNpuExtension
|
2024-03-27 03:19:32 +00:00
|
|
|
from .flash_attention_sdpa_cuda import FlashAttentionSdpaCudaExtension
|
2024-01-25 09:01:48 +00:00
|
|
|
|
|
|
|
try:
|
2024-03-27 03:19:32 +00:00
|
|
|
# TODO: remove this after updating openmoe example
|
2024-01-25 09:01:48 +00:00
|
|
|
import flash_attention # noqa
|
|
|
|
|
|
|
|
HAS_FLASH_ATTN = True
|
|
|
|
except:
|
|
|
|
HAS_FLASH_ATTN = False
|
|
|
|
|
|
|
|
|
2024-03-27 03:19:32 +00:00
|
|
|
__all__ = ["FlashAttentionDaoCudaExtension", "FlashAttentionSdpaCudaExtension", "FlashAttentionNpuExtension"]
|