[HICache]: Support 3FS-Store with page_first_direct layout (#11460)
This commit is contained in:
@@ -170,7 +170,7 @@ class StorageBackendFactory:
|
||||
return backend
|
||||
elif backend_name == "hf3fs":
|
||||
# Calculate bytes_per_page based on memory pool layout
|
||||
if mem_pool_host.layout == "page_first":
|
||||
if mem_pool_host.layout in ["page_first", "page_first_direct"]:
|
||||
bytes_per_page = (
|
||||
mem_pool_host.get_ksize_per_token() * mem_pool_host.page_size
|
||||
)
|
||||
|
||||
@@ -501,8 +501,12 @@ class HiCacheHF3FS(HiCacheStorage):
|
||||
|
||||
def register_mem_pool_host(self, mem_pool_host: HostKVCache):
|
||||
super().register_mem_pool_host(mem_pool_host)
|
||||
self.is_zero_copy = self.mem_pool_host.layout == "page_first"
|
||||
logger.info(f"{self.is_zero_copy=}")
|
||||
self.is_zero_copy = self.mem_pool_host.layout in [
|
||||
"page_first",
|
||||
"page_first_direct",
|
||||
]
|
||||
|
||||
logger.info(f"{self.is_zero_copy=}, layout={self.mem_pool_host.layout}")
|
||||
|
||||
def _get_mha_zero_copy_keys(self, keys: List[str]) -> List[str]:
|
||||
_keys = []
|
||||
|
||||
Reference in New Issue
Block a user