mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-06 00:57:33 +08:00
[Bug Fix] Fix mm performance degradation (#3942)
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
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
* [Bug Fix] Fix mm performance degradation * formate --------- Co-authored-by: Jiang-Jia-Jun <163579578+Jiang-Jia-Jun@users.noreply.github.com> Co-authored-by: chenjian <1435317881@qq.com>
This commit is contained in:
@@ -527,8 +527,14 @@ class EngineSevice:
|
|||||||
self.cfg.max_prefill_batch,
|
self.cfg.max_prefill_batch,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if self.cfg.model_config.enable_mm:
|
||||||
|
self.resource_manager.check_and_free_block_tables()
|
||||||
|
available_blocks = self.resource_manager.available_block_num()
|
||||||
|
else:
|
||||||
|
available_blocks = self.cfg.cache_config.max_block_num_per_seq
|
||||||
|
|
||||||
tasks = self.scheduler.get_requests(
|
tasks = self.scheduler.get_requests(
|
||||||
available_blocks=self.cfg.cache_config.max_block_num_per_seq,
|
available_blocks=available_blocks,
|
||||||
block_size=self.cfg.cache_config.block_size,
|
block_size=self.cfg.cache_config.block_size,
|
||||||
reserved_output_blocks=self.cfg.cache_config.enc_dec_block_num,
|
reserved_output_blocks=self.cfg.cache_config.enc_dec_block_num,
|
||||||
max_num_batched_tokens=self.cfg.max_model_len,
|
max_num_batched_tokens=self.cfg.max_model_len,
|
||||||
|
Reference in New Issue
Block a user