Skip to content

Commit

Permalink
another small fix for efficiency. Thanks stephen!
Browse files Browse the repository at this point in the history
  • Loading branch information
renxida committed Nov 27, 2024
1 parent 3a474c4 commit b9d0f42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shortfin/python/shortfin_apps/llm/components/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def reset(self, phase: InferencePhase):
def cache_page_indices(self, max_len: int) -> list[int]:
if not self.allocation:
return []
indices = [p.index for p in self.allocation.pages]
return indices[:max_len]
indices = [p.index for p in self.allocation.pages[:max_len]]
return indices

def publish_allocated_pages(self, up_to_page_index: int):
assert self.allocation
Expand Down

0 comments on commit b9d0f42

Please sign in to comment.