Add interface_v1 option for dynamic HiCache backend (#13140)
Co-authored-by: Zhiqiang Xie <xiezhq@stanford.edu>
This commit is contained in:
co-authored by
Zhiqiang Xie
parent
e2c9a59023
commit
d879e37f1b
@@ -182,6 +182,7 @@ python3 -m sglang.launch_server \
|
|||||||
- `backend_name`: Custom backend identifier
|
- `backend_name`: Custom backend identifier
|
||||||
- `module_path`: Python module path to your implementation
|
- `module_path`: Python module path to your implementation
|
||||||
- `class_name`: Your HiCache implementation class name
|
- `class_name`: Your HiCache implementation class name
|
||||||
|
- `interface_v1`: 0 (disable) or 1 (enable) to control usage of batch_get_v1 and batch_set_v1 methods
|
||||||
|
|
||||||
|
|
||||||
## Community and Support
|
## Community and Support
|
||||||
|
|||||||
@@ -318,7 +318,10 @@ class HiCacheController:
|
|||||||
self.page_get_func = self._generic_page_get
|
self.page_get_func = self._generic_page_get
|
||||||
self.page_set_func = self._generic_page_set
|
self.page_set_func = self._generic_page_set
|
||||||
|
|
||||||
if self.storage_backend_type in ["hf3fs", "mooncake", "eic"]:
|
if (self.storage_backend_type in ["hf3fs", "mooncake", "eic"]) or (
|
||||||
|
self.storage_backend_type == "dynamic"
|
||||||
|
and bool(self.storage_config.extra_config.get("interface_v1", 0))
|
||||||
|
):
|
||||||
self.page_get_func = self._page_get_zero_copy
|
self.page_get_func = self._page_get_zero_copy
|
||||||
self.page_set_func = self._page_set_zero_copy
|
self.page_set_func = self._page_set_zero_copy
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user