@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 906a8c15d0
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 5, 04:45 UTC

[Core][Metrics] Remove unused `SchedulerStats.encoder_cache_usage` (#39693)

Signed-off-by: Mark McLoughlin <markmc@redhat.com>

Mark McLoughlin committed Apr 14, 2026 at 17:53 UTC 906a8c15d0beded2cca8b357877266c631340f74
2 files changed -10
vllm/v1/core/sched/scheduler.py
-9
@@ -1961,7 +1961,6 @@ class Scheduler(SchedulerInterface):
1961 num_waiting_reqs=len(self.waiting),
1962 num_skipped_waiting_reqs=len(self.skipped_waiting),
1963 kv_cache_usage=self.kv_cache_manager.usage,
1964 - encoder_cache_usage=self._get_encoder_cache_usage(),
1964 prefix_cache_stats=prefix_cache_stats,
1965 connector_prefix_cache_stats=connector_prefix_cache_stats,
1966 kv_cache_eviction_events=eviction_events,
@@ -1971,14 +1970,6 @@ class Scheduler(SchedulerInterface):
1970 perf_stats=perf_stats,
1971 )
1972
1974 - def _get_encoder_cache_usage(self) -> float:
1975 - """Get encoder cache usage as a fraction (0.0 to 1.0)."""
1976 - ecm = self.encoder_cache_manager
1977 - if ecm.cache_size == 0:
1978 - return 0.0
1979 - used_slots = ecm.cache_size - ecm.num_free_slots
1980 - return used_slots / ecm.cache_size
1981 -
1973 def make_spec_decoding_stats(
1974 self,
1975 spec_decoding_stats: SpecDecodingStats | None,
vllm/v1/metrics/stats.py
-1
@@ -181,7 +181,6 @@ class SchedulerStats:
181 current_wave: int = 0
182
183 kv_cache_usage: float = 0.0
184 - encoder_cache_usage: float = 0.0
184
185 prefix_cache_stats: PrefixCacheStats = field(default_factory=PrefixCacheStats)
186 connector_prefix_cache_stats: PrefixCacheStats | None = None