mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-06 09:07:10 +08:00
remove useless code (#3166)
This commit is contained in:
@@ -231,14 +231,12 @@ class ResourceManager:
|
|||||||
break
|
break
|
||||||
|
|
||||||
can_insert = False
|
can_insert = False
|
||||||
while allocated_position + 1 <= self.max_num_seqs:
|
while allocated_position < self.max_num_seqs:
|
||||||
if sum(self.stop_flags[allocated_position : allocated_position + 1]) == 1:
|
if sum(self.stop_flags[allocated_position : allocated_position + 1]) == 1:
|
||||||
can_insert = True
|
can_insert = True
|
||||||
break
|
break
|
||||||
allocated_position += 1
|
allocated_position += 1
|
||||||
if can_insert:
|
if can_insert:
|
||||||
if self.stop_flags[allocated_position]:
|
|
||||||
|
|
||||||
task = tasks[processing_task_index]
|
task = tasks[processing_task_index]
|
||||||
|
|
||||||
if task.get("seed") is None:
|
if task.get("seed") is None:
|
||||||
@@ -256,9 +254,7 @@ class ResourceManager:
|
|||||||
llm_logger.warning("req_id: {0} not enough blocks available".format(task["req_id"]))
|
llm_logger.warning("req_id: {0} not enough blocks available".format(task["req_id"]))
|
||||||
return
|
return
|
||||||
|
|
||||||
cached_len = self._record_request_cache_info(
|
cached_len = self._record_request_cache_info(task, common_block_ids, unique_block_ids, hit_info)
|
||||||
task, common_block_ids, unique_block_ids, hit_info
|
|
||||||
)
|
|
||||||
task.cache_prepare_time = time.time() - cache_prepare_time
|
task.cache_prepare_time = time.time() - cache_prepare_time
|
||||||
|
|
||||||
if task.disaggregate_info is not None:
|
if task.disaggregate_info is not None:
|
||||||
|
Reference in New Issue
Block a user