### What this PR does / why we need it? 1.In short, we renamed the existing MooncakeStoreConnector to AscendStoreConnector and extracted the storage engine interaction logic into a new Backend class. Associated RFC:https://github.com/vllm-project/vllm-ascend/issues/4329 2.Fixed the issue where the number of input parameters for the connector was incorrect, introduced in vllm 0.11.2 ### Does this PR introduce _any_ user-facing change? change MooncakeStoreConnector to AscendStoreConnector ### How was this patch tested? - vLLM version: v0.11.2 --------- Signed-off-by: fems14 <1804143737@qq.com>
30 lines
637 B
Python
30 lines
637 B
Python
from abc import ABC, abstractmethod
|
|
|
|
from vllm.config import ParallelConfig
|
|
|
|
|
|
class Backend(ABC):
|
|
|
|
def __init__(self, parallel_config: ParallelConfig):
|
|
pass
|
|
|
|
def set_device(self):
|
|
pass
|
|
|
|
def register_buffer(self, ptrs: list[int], lengths: list[int]):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def exists(self, keys: list[str]) -> list[int]:
|
|
pass
|
|
|
|
@abstractmethod
|
|
def put(self, keys: list[str], addrs: list[list[int]],
|
|
sizes: list[list[int]]):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def get(self, keys: list[str], addrs: list[list[int]],
|
|
sizes: list[list[int]]):
|
|
pass
|