Skip to content

Commit

Permalink
do not use cached chunks for prompt_logprobs
Browse files Browse the repository at this point in the history
  • Loading branch information
50h100a committed Dec 16, 2024
1 parent d69273b commit bc1a2bd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions aphrodite/processing/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1046,9 +1046,6 @@ def schedule(self) -> Tuple[List[SequenceGroupMetadata], SchedulerOutputs]:
scheduler_outputs = self._schedule()
now = time.time()

if not self.cache_config.enable_prefix_caching:
common_computed_block_nums = []

# Create input data structures.
seq_group_metadata_list: List[SequenceGroupMetadata] = []
for i, scheduled_seq_group in enumerate(
Expand Down Expand Up @@ -1079,10 +1076,14 @@ def schedule(self) -> Tuple[List[SequenceGroupMetadata], SchedulerOutputs]:
block_tables[seq_id] = self.block_manager.get_block_table(seq)
self.block_manager.access_all_blocks_in_seq(seq, now)

if self.cache_config.enable_prefix_caching:

if (self.cache_config.enable_prefix_caching and
not seq_group.sampling_params.prompt_logprobs):
common_computed_block_nums = (
self.block_manager.get_common_computed_block_ids(
seq_group.get_seqs(status=SequenceStatus.RUNNING)))
else:
common_computed_block_nums = []

do_sample = True
is_prompt = seq_group.is_prefill()
Expand Down

0 comments on commit bc1a2bd

Please sign in to comment.