[Unified Cache][9/N] add opt-in MLA load deduplication for Mooncake Linker (#39565)
Co-authored-by: Zhangheng <hzh0425@apache.org>
This commit is contained in:
co-authored by
Zhangheng
parent
d903351a66
commit
e9300f643e
@@ -1995,6 +1995,25 @@ class TestSSLArgs(unittest.TestCase):
|
||||
|
||||
|
||||
class TestHiCacheArgs(unittest.TestCase):
|
||||
def test_linker_mla_dedup_requires_mooncake_linker(self):
|
||||
for enabled, linker, backend in (
|
||||
(False, False, "mooncake"),
|
||||
(True, True, "mooncake"),
|
||||
(True, False, "mooncake"),
|
||||
(True, True, "mori"),
|
||||
):
|
||||
with self.subTest(enabled=enabled, linker=linker, backend=backend):
|
||||
args = self._make_args(
|
||||
enable_linker_mla_dedup=enabled,
|
||||
enable_unified_cache_external_linker=linker,
|
||||
unified_cache_external_linker_backend=backend,
|
||||
)
|
||||
if enabled and (not linker or backend != "mooncake"):
|
||||
with self.assertRaisesRegex(ValueError, "requires the Mooncake"):
|
||||
handle_hicache(args)
|
||||
else:
|
||||
handle_hicache(args)
|
||||
|
||||
def _make_args(self, **overrides) -> ServerArgs:
|
||||
# Not resolved: a dummy model path takes the pipeline's early return,
|
||||
# so `_handle_hicache` would never run. Its one prerequisite (the
|
||||
|
||||
Reference in New Issue
Block a user