[misc] Keep req.kv non-optional and key KV ownership on req_pool_idx (#36958)

This commit is contained in:
Liangsheng Yin
2026-08-28 23:47:42 -07:00
committed by GitHub
parent 0e1146d04f
commit 24a3a63e6b
18 changed files with 59 additions and 67 deletions
@@ -6,6 +6,7 @@ from unittest.mock import MagicMock
import numpy as np
import torch
from sglang.srt.managers.schedule_batch import ReqKvInfo
from sglang.srt.mem_cache.allocator.hisparse import (
DeepSeekV4HiSparseTokenToKVPoolAllocator,
)
@@ -91,7 +92,7 @@ class TestDeepSeekV4HiSparseAllocator(CustomTestCase):
rid="req-0",
origin_input_ids=list(range(fill_len)),
output_ids=[],
kv=None,
kv=ReqKvInfo(),
)
def set_extend_range(start, end):