[Misc] Add get_name method to attention backends (#4685)

This commit is contained in:
Woosuk Kwon
2024-05-08 09:59:31 -07:00
committed by GitHub
parent 0f9a6e3d22
commit 5510cf0e8a
7 changed files with 30 additions and 12 deletions
+5
View File
@@ -9,6 +9,11 @@ import torch
class AttentionBackend(ABC):
"""Abstract class for attention backends."""
@staticmethod
@abstractmethod
def get_name() -> str:
raise NotImplementedError
@staticmethod
@abstractmethod
def get_impl_cls() -> Type["AttentionImpl"]: