Register SWA unit tests under unit/mem_cache (#24974)

This commit is contained in:
Ke Bao
2026-05-11 20:21:05 +08:00
committed by GitHub
parent 6b6963f426
commit 36ba60ad49
2 changed files with 6 additions and 0 deletions
@@ -12,8 +12,11 @@ from unittest.mock import MagicMock
import torch
from sglang.srt.mem_cache.swa_memory_pool import SWATokenToKVPoolAllocator
from sglang.test.ci.ci_register import register_cpu_ci
from sglang.test.test_utils import CustomTestCase
register_cpu_ci(est_time=2, suite="stage-a-test-cpu")
def _make_self(*, page_size: int, full_available: int, swa_available: int):
full_indices = torch.tensor([10, 11], dtype=torch.int64)
@@ -27,8 +27,11 @@ from sglang.srt.mem_cache.radix_cache import RadixKey
from sglang.srt.mem_cache.swa_memory_pool import SWAKVPool, SWATokenToKVPoolAllocator
from sglang.srt.mem_cache.swa_radix_cache import SWARadixCache
from sglang.srt.utils import get_device
from sglang.test.ci.ci_register import register_cuda_ci
from sglang.test.test_utils import CustomTestCase
register_cuda_ci(est_time=12, suite="stage-b-test-1-gpu-small")
def _build_tree(
*,