Tiny simplify evcition metrics collector (#12983)

This commit is contained in:
Liangsheng Yin
2025-11-11 23:23:48 +08:00
committed by GitHub
parent e38994dd71
commit f09eee036d
8 changed files with 34 additions and 36 deletions
+3 -2
View File
@@ -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,