mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2026-04-23 00:17:25 +08:00
[XPU]MAX_BSZ aligns gpu settings and disable prefix cache in OCR VL (#5831)
This commit is contained in:
@@ -1031,6 +1031,11 @@ def initialize_fd_config(args, ranks: int = 1, local_rank: int = 0) -> FDConfig:
|
||||
architecture = fd_config.model_config.architectures[0]
|
||||
if "PaddleOCR" in architecture:
|
||||
envs.FD_ENABLE_MAX_PREFILL = 1
|
||||
# TODO XPU support PaddleOCR prefix caching
|
||||
if current_platform.is_xpu():
|
||||
fd_config.cache_config.enable_prefix_caching = False
|
||||
fd_config.cache_config.max_encoder_cache = 0
|
||||
|
||||
return fd_config
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user