MCPcopy Create free account
hub / github.com/AI-Hypercomputer/maxtext / release_pages

Method release_pages

src/MaxText/maxengine.py:1469–1477  ·  view source on GitHub ↗

Releases pages associated with a specific slot (page group) via the PageManager.

(self, slot: int)

Source from the content-addressed store, hash-verified

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 {

Callers 8

mainFunction · 0.95
mainFunction · 0.95
test_release_pagesMethod · 0.45
_run_generation_loopMethod · 0.45

Calls

no outgoing calls