[Rust] Rename mem-cache to sglang-radix-tree (#37290)

This commit is contained in:
Jialin Ouyang
2026-09-01 03:03:44 -07:00
committed by GitHub
parent c16a8fc899
commit a77283fb02
30 changed files with 38 additions and 38 deletions
+3 -3
View File
@@ -5,12 +5,12 @@ members = [
"sglang-mm",
"sglang-server"
]
exclude = ["mem-cache"]
exclude = ["sglang-radix-tree"]
[workspace.metadata.sglang]
# Extension crates that intentionally cannot share this workspace's dependency
# graph (mem-cache currently uses the tch-compatible PyO3 0.22 API).
extension-manifests = ["mem-cache/Cargo.toml"]
# graph (sglang-radix-tree currently uses the tch-compatible PyO3 0.22 API).
extension-manifests = ["sglang-radix-tree/Cargo.toml"]
[workspace.package]
version = "0.1.0"
@@ -322,17 +322,6 @@ dependencies = [
"rawpointer",
]
[[package]]
name = "mem_cache"
version = "0.1.0"
dependencies = [
"hashbrown",
"pyo3",
"sha2",
"tch",
"thiserror",
]
[[package]]
name = "memchr"
version = "2.8.3"
@@ -653,6 +642,17 @@ dependencies = [
"zmij",
]
[[package]]
name = "sglang-radix-tree"
version = "0.1.0"
dependencies = [
"hashbrown",
"pyo3",
"sha2",
"tch",
"thiserror",
]
[[package]]
name = "sha1"
version = "0.10.7"
@@ -1,5 +1,5 @@
[package]
name = "mem_cache"
name = "sglang-radix-tree"
version = "0.1.0"
edition = "2024"
description = "Rust tree core for the Unified Radix Cache"
@@ -1,4 +1,4 @@
# mem-cache
# sglang-radix-tree
Rust tree core for the Unified Radix Cache, covering Full attention, sliding window attention, and Mamba components. It implements the tree side of the `UnifiedTreeCoreInterface` split — match/insert walks, node arena, locks, eviction walks, HiCache backup/load-back specs, and KV events — behind a PyO3 binding, while the cache orchestration stays in Python.
@@ -20,7 +20,7 @@ and `torch_2_13_compat.h` covers two alignment APIs removed in PyTorch 2.13.
```bash
# Build (libtorch from the installed torch package):
cd rust/mem-cache
cd rust/sglang-radix-tree
LIBTORCH_USE_PYTORCH=1 \
LIBTORCH_BYPASS_VERSION_CHECK=1 \
CXXFLAGS="-include $PWD/torch_2_13_compat.h" \