[UnifiedTree]: move /mem_cache/unifed_cache_component dir to /mem_cache/unified_cache (#32484)

This commit is contained in:
Zhangheng
2026-07-28 16:28:21 +08:00
committed by GitHub
parent fc8b328f5c
commit 60d6914f17
23 changed files with 62 additions and 62 deletions
@@ -14,13 +14,13 @@ import torch
from test_unified_radix_cache_unittest import CacheConfig, UnifiedRadixCacheSuite
from sglang.srt.mem_cache.unified_cache.cache_action import MambaEvictExcessPathStates
from sglang.srt.mem_cache.unified_cache.unified_tree_core import UnifiedTreeCore
from sglang.srt.mem_cache.unified_cache_components.mamba_component import (
from sglang.srt.mem_cache.unified_cache.components.mamba_component import (
MambaComponent,
)
from sglang.srt.mem_cache.unified_cache_components.tree_component import (
from sglang.srt.mem_cache.unified_cache.components.tree_component import (
ComponentType,
)
from sglang.srt.mem_cache.unified_cache.unified_tree_core import UnifiedTreeCore
from sglang.srt.mem_cache.unified_radix_cache import UnifiedLRUList, UnifiedTreeNode
from sglang.srt.server_args import ServerArgs
from sglang.test.test_utils import CustomTestCase
@@ -227,7 +227,7 @@ class TestDefaultRadixCacheFactory(CustomTestCase):
patch.dict(
"sys.modules",
{
"sglang.srt.mem_cache.unified_cache_components": fake_components,
"sglang.srt.mem_cache.unified_cache.components": fake_components,
"sglang.srt.mem_cache.unified_radix_cache": fake_radix,
},
),
@@ -261,7 +261,7 @@ class TestDefaultRadixCacheFactory(CustomTestCase):
with patch.dict(
"sys.modules",
{
"sglang.srt.mem_cache.unified_cache_components": fake_components,
"sglang.srt.mem_cache.unified_cache.components": fake_components,
"sglang.srt.mem_cache.unified_radix_cache": fake_radix,
},
):
@@ -281,7 +281,7 @@ class TestDefaultRadixCacheFactory(CustomTestCase):
with patch.dict(
"sys.modules",
{
"sglang.srt.mem_cache.unified_cache_components": fake_components,
"sglang.srt.mem_cache.unified_cache.components": fake_components,
"sglang.srt.mem_cache.unified_radix_cache": fake_radix,
},
):
@@ -302,7 +302,7 @@ class TestDefaultRadixCacheFactory(CustomTestCase):
with patch.dict(
"sys.modules",
{
"sglang.srt.mem_cache.unified_cache_components": fake_components,
"sglang.srt.mem_cache.unified_cache.components": fake_components,
"sglang.srt.mem_cache.unified_radix_cache": fake_radix,
},
):
@@ -322,7 +322,7 @@ class TestDefaultRadixCacheFactory(CustomTestCase):
with patch.dict(
"sys.modules",
{
"sglang.srt.mem_cache.unified_cache_components": fake_components,
"sglang.srt.mem_cache.unified_cache.components": fake_components,
"sglang.srt.mem_cache.unified_radix_cache": fake_radix,
},
):
@@ -348,7 +348,7 @@ class TestDefaultRadixCacheFactory(CustomTestCase):
with patch.dict(
"sys.modules",
{
"sglang.srt.mem_cache.unified_cache_components": fake_components,
"sglang.srt.mem_cache.unified_cache.components": fake_components,
"sglang.srt.mem_cache.unified_radix_cache": fake_radix,
},
):
@@ -7,6 +7,10 @@ from sglang.srt.environ import envs
from sglang.srt.mem_cache.cache_init_params import CacheInitParams
from sglang.srt.mem_cache.memory_pool import ReqToTokenPool
from sglang.srt.mem_cache.unified_cache.component_type import ComponentType
from sglang.srt.mem_cache.unified_cache.components.tree_component import (
EvictLayer,
TreeComponent,
)
from sglang.srt.mem_cache.unified_cache.tree_core_registry import (
_TREE_CORE_REGISTRY,
create_tree_core,
@@ -14,10 +18,6 @@ from sglang.srt.mem_cache.unified_cache.tree_core_registry import (
registered_tree_core_backends,
)
from sglang.srt.mem_cache.unified_cache.unified_tree_core import UnifiedTreeCore
from sglang.srt.mem_cache.unified_cache_components.tree_component import (
EvictLayer,
TreeComponent,
)
from sglang.srt.mem_cache.unified_radix_cache import UnifiedRadixCache
from sglang.test.ci.ci_register import register_cpu_ci
from sglang.test.test_utils import CustomTestCase
@@ -34,7 +34,7 @@ from sglang.srt.mem_cache.mamba_radix_cache import MambaRadixCache
from sglang.srt.mem_cache.memory_pool import HybridLinearKVPool, HybridReqToTokenPool
from sglang.srt.mem_cache.radix_cache import RadixKey
from sglang.srt.mem_cache.swa_radix_cache import SWARadixCache
from sglang.srt.mem_cache.unified_cache_components.tree_component import ComponentType
from sglang.srt.mem_cache.unified_cache.components.tree_component import ComponentType
from sglang.srt.mem_cache.unified_radix_cache import UnifiedRadixCache
from sglang.srt.server_args import ServerArgs, set_global_server_args_for_scheduler
from sglang.srt.utils import get_device
@@ -59,6 +59,12 @@ from sglang.srt.mem_cache.unified_cache.cache_action import (
ReplaceWriteThroughOnNodeSplit,
SWARebuild,
)
from sglang.srt.mem_cache.unified_cache.components.tree_component import (
CacheTransferPhase,
ComponentType,
EvictLayer,
TreeComponent,
)
from sglang.srt.mem_cache.unified_cache.unified_tree_core_interface import (
DecSwaLockOnlyResult,
DemoteResult,
@@ -67,12 +73,6 @@ from sglang.srt.mem_cache.unified_cache.unified_tree_core_interface import (
EvictDeviceLeafResult,
EvictDeviceNextNodeResult,
)
from sglang.srt.mem_cache.unified_cache_components.tree_component import (
CacheTransferPhase,
ComponentType,
EvictLayer,
TreeComponent,
)
from sglang.srt.mem_cache.unified_radix_cache import (
COMPONENT_REGISTRY,
UnifiedLRUList,
@@ -17,7 +17,7 @@ from sglang.srt.mem_cache.hybrid_cache.hybrid_pool_assembler import (
_SwaStrategy,
register_stack_strategy,
)
from sglang.srt.mem_cache.unified_cache_components import ComponentType
from sglang.srt.mem_cache.unified_cache.components import ComponentType
from sglang.test.ci.ci_register import register_cpu_ci
register_cpu_ci(est_time=2, suite="base-a-test-cpu")