Skip to content

Commit 2e7b7a4

Browse files
authored
[XPU] xpu currently disable prefix cache for VL model (#4694)
Co-authored-by: ddchenhao66 <dhaochen163.com>
1 parent 40b8706 commit 2e7b7a4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

fastdeploy/engine/args_utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,6 +1078,10 @@ def create_engine_config(self, port_availability_check=True) -> FDConfig:
10781078
all_dict = asdict(self)
10791079
model_cfg = ModelConfig(all_dict)
10801080

1081+
# XPU currently disable prefix cache for VL model
1082+
if current_platform.is_xpu() and (self.enable_mm or model_cfg.enable_mm):
1083+
self.enable_prefix_caching = False
1084+
10811085
if not model_cfg.is_unified_ckpt and hasattr(model_cfg, "tensor_parallel_size"):
10821086
self.tensor_parallel_size = model_cfg.tensor_parallel_size
10831087

0 commit comments

Comments
 (0)