[Fix] mem_cache: Skip linker L3 lookup on PD decode (#45538)
This commit is contained in:
@@ -111,7 +111,12 @@ from sglang.srt.observability.metrics_collector import (
|
||||
StorageMetrics,
|
||||
StorageMetricsCollector,
|
||||
)
|
||||
from sglang.srt.runtime_context import get_memory, get_model, get_observability
|
||||
from sglang.srt.runtime_context import (
|
||||
get_disagg,
|
||||
get_memory,
|
||||
get_model,
|
||||
get_observability,
|
||||
)
|
||||
from sglang.srt.session.streaming_session import StreamingSession, is_virtual_node
|
||||
from sglang.srt.utils.common import ceil_align
|
||||
from sglang.srt.utils.poll_timer import PollTimer
|
||||
@@ -620,7 +625,12 @@ class UnifiedRadixCache(BasePrefixCache):
|
||||
result = component.finalize_match_result_in_cache(params, result)
|
||||
# Finalizers must not emit actions; the walk's were applied above.
|
||||
assert not result.cache_actions
|
||||
if self.linker is not None and params.req is not None:
|
||||
# PD decode has no linker load-back path, so it only offloads.
|
||||
if (
|
||||
self.linker is not None
|
||||
and params.req is not None
|
||||
and get_disagg().disaggregation_mode != "decode"
|
||||
):
|
||||
result = self.linker.match(params.key, params.req, result)
|
||||
return result
|
||||
|
||||
|
||||
Reference in New Issue
Block a user