feat(kv-events): Add medium field to KV event types for storage tier tracking (#18205)

This commit is contained in:
ishandhanani
2026-02-09 14:39:15 -06:00
committed by GitHub
parent 316f9cbb35
commit 01e3f4682e
2 changed files with 12 additions and 1 deletions

View File

@@ -35,6 +35,7 @@ import torch
logger = logging.getLogger(__name__)
from sglang.srt.disaggregation.kv_events import (
MEDIUM_GPU,
AllBlocksCleared,
BlockRemoved,
BlockStored,
@@ -822,6 +823,7 @@ class RadixCache(BasePrefixCache):
token_ids=page_tokens,
block_size=len(page_tokens),
lora_id=None,
medium=MEDIUM_GPU,
)
)
@@ -843,7 +845,9 @@ class RadixCache(BasePrefixCache):
block_hash = hash_str_to_int64(node.hash_value[page_index])
self.kv_event_queue.append(BlockRemoved(block_hashes=[block_hash]))
self.kv_event_queue.append(
BlockRemoved(block_hashes=[block_hash], medium=MEDIUM_GPU)
)
page_index += 1