Tiny simplify evcition metrics collector (#12983)
This commit is contained in:
@@ -713,15 +713,16 @@ class Scheduler(
|
||||
page_size=self.page_size,
|
||||
)
|
||||
else:
|
||||
if os.environ.get("SGLANG_EXPERIMENTAL_CPP_RADIX_TREE") == "1":
|
||||
if envs.SGLANG_EXPERIMENTAL_CPP_RADIX_TREE.get():
|
||||
# lazy import to avoid JIT overhead
|
||||
from sglang.srt.mem_cache.radix_cache_cpp import RadixCacheCpp
|
||||
|
||||
logger.info("Using experimental C++ radix tree implementation.")
|
||||
self.tree_cache = RadixCacheCpp(
|
||||
disable=False,
|
||||
use_hicache=self.enable_hierarchical_cache,
|
||||
req_to_token_pool=self.req_to_token_pool,
|
||||
token_to_kv_pool=self.token_to_kv_pool_allocator,
|
||||
token_to_kv_pool_allocator=self.token_to_kv_pool_allocator,
|
||||
tp_cache_group=self.tp_cpu_group,
|
||||
page_size=self.page_size,
|
||||
hicache_ratio=server_args.hicache_ratio,
|
||||
|
||||
Reference in New Issue
Block a user