Allow optimistic prefill with L2 hierarchical cache and write-back policy (#33545)

Co-authored-by: cctry <cctry@meta.com>
This commit is contained in:
Lianmin Zheng
2026-08-04 13:23:08 -07:00
committed by GitHub
co-authored by cctry
parent abddb1c7e9
commit 34af3ff386
+8 -2
View File
@@ -8100,8 +8100,14 @@ class ServerArgs:
if self.pp_size > 1:
logger.warning("Optimistic prefill does not support pp_size > 1")
self.optimistic_prefill_attempts = 0
elif self.enable_hierarchical_cache:
logger.warning("Optimistic prefill does not support hierarchical cache")
elif self.enable_hierarchical_cache and (
self.hicache_storage_backend is not None
or self.hicache_write_policy != "write_back"
):
logger.warning(
"Optimistic prefill only supports L2 hierarchical cache "
"with write-back policy"
)
self.optimistic_prefill_attempts = 0
elif resolved_view(self).uses_mamba_radix_cache:
logger.warning(