[Core][Refactor] Move KV cache planning logic to kv_cache_planning.py (#61183)

Signed-off-by: Dakai An <dakaian108@gmail.com>
Signed-off-by: Yifan Qiao <yifanqiao@inferact.ai>
Co-authored-by: Yifan Qiao <yifanqiao@inferact.ai>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Dakai An
2026-10-13 03:05:39 +00:00
committed by GitHub
co-authored by Yifan Qiao Claude Opus 5.5
parent c077dc663d
commit df6c7ad031
21 changed files with 4043 additions and 3935 deletions
+1 -1
View File
@@ -394,7 +394,7 @@ def test_k3_dspark_mla_kv_cache_spec_groups_with_target_mla():
"""The draft's MLA layers must share a KV cache group with the target's."""
from vllm.model_executor.layers.attention.mla_attention import MLAAttention
from vllm.models.kimi_k3.nvidia.mla import MultiHeadLatentAttention
from vllm.v1.core.kv_cache_utils import _get_kv_cache_groups_uniform_page_size
from vllm.v1.core.kv_cache_planning import _get_kv_cache_groups_uniform_page_size
vllm_config = SimpleNamespace(
model_config=None, cache_config=SimpleNamespace(block_size=64)
+2 -4
View File
@@ -14,10 +14,8 @@ from vllm.logger import init_logger
from vllm.platforms import current_platform
from vllm.utils.mem_constants import GiB_bytes
from vllm.v1.attention.backends.utils import resolve_kv_cache_layout
from vllm.v1.core.kv_cache_utils import (
generate_scheduler_kv_cache_config,
get_kv_cache_configs,
)
from vllm.v1.core.kv_cache_planning import get_kv_cache_configs
from vllm.v1.core.kv_cache_utils import generate_scheduler_kv_cache_config
from vllm.v1.engine.core import EngineCore as V1EngineCore
from ..utils import (