fix: synchronize CP HiCache host eviction semantics

This commit is contained in:
2026-05-08 03:20:47 +08:00
parent eecc8e21ec
commit 8844c303e2
4 changed files with 144 additions and 6 deletions
@@ -246,6 +246,13 @@ class TestHiCacheControllerCPWrite(CustomTestCase):
self.assertEqual(config.model_name, "test-model")
self.assertEqual(config.tp_lcm_size, 8)
def test_attach_storage_backend_rejects_cp_hicache(self):
host_pool = FakeHostPool(torch.tensor([], dtype=torch.int64))
controller = self.make_controller(host_pool)
with self.assertRaisesRegex(RuntimeError, "CP shared KV.*storage backend"):
controller.attach_storage_backend("mooncake")
class TestHiCacheControllerCPLoad(TestHiCacheControllerCPWrite):
def test_cp_load_allocates_full_logical_locs_and_transfers_owned_physical_locs(self):