[Optimize] optimize prefix cache in release22 (#3889)
Some checks failed
CE Compile Job / ce_job_pre_check (push) Has been cancelled
CE Compile Job / print_ce_job_pre_check_outputs (push) Has been cancelled
CE Compile Job / FD-Clone-Linux (push) Has been cancelled
CE Compile Job / Show Code Archive Output (push) Has been cancelled
CE Compile Job / BUILD_SM8090 (push) Has been cancelled
CE Compile Job / BUILD_SM8689 (push) Has been cancelled
CE Compile Job / CE_UPLOAD (push) Has been cancelled

* optimize prefix cache in release22

* optimize prefix cache in release22

* fix worker

* fix

* fix

---------

Co-authored-by: Jiang-Jia-Jun <163579578+Jiang-Jia-Jun@users.noreply.github.com>
This commit is contained in:
chenjian
2025-09-06 09:52:01 +08:00
committed by GitHub
parent 41cd3e24c9
commit 8d77c1cb51
4 changed files with 44 additions and 44 deletions

View File

@@ -1347,6 +1347,7 @@ class GPUModelRunner(ModelRunnerBase):
if (
not self.cache_config.enable_chunked_prefill
or self.guided_backend is None
or model_forward_batch is None
or envs.ENABLE_V1_KVCACHE_SCHEDULER
):
return skip_idx_list
@@ -1549,7 +1550,7 @@ class GPUModelRunner(ModelRunnerBase):
"""
Add cache for guided decoding.
"""
if self.guided_backend is None:
if self.guided_backend is None or model_forward_batch is None:
return
for request in model_forward_batch: