Releases pages associated with a specific slot (page group) via the PageManager.
(self, slot: int)
| 1467 | } |
| 1468 | |
| 1469 | def release_pages(self, slot: int): |
| 1470 | """Releases pages associated with a specific slot (page group) via the PageManager.""" |
| 1471 | if self.config.attention != "paged" or self.page_manager is None or self.page_state is None: |
| 1472 | print(f"Warning: release_pages called for slot {slot} but paged attention is not configured or state is missing.") |
| 1473 | return |
| 1474 | new_page_state = self.page_manager.release_pages( |
| 1475 | page_state=self.page_state, page_group_id=slot |
| 1476 | ) # pytype: disable=attribute-error |
| 1477 | self.page_state = new_page_state |
| 1478 | |
| 1479 | def get_prefix_destination_sharding(self) -> Any: |
| 1480 | return { |
no outgoing calls