[Misc]: Implement CPU/GPU swapping in BlockManagerV2 (#3834)

This commit is contained in:
Kaiyang Chen
2024-06-03 13:37:11 -07:00
committed by GitHub
parent cafb8e06c5
commit 10c38e3e46
16 changed files with 529 additions and 49 deletions
+4
View File
@@ -283,6 +283,10 @@ class BlockTable:
def _is_allocated(self) -> bool:
return len(self._blocks) > 0
@property
def blocks(self) -> Optional[List[Block]]:
return self._blocks
@property
def _num_empty_slots(self) -> int:
assert self._is_allocated