mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-07-25 05:27:09 +08:00
Add get_block_table
This commit is contained in:
parent
331fa0b042
commit
4f6f4967f6
@ -228,3 +228,7 @@ class BlockSpaceManager:
|
|||||||
for block_table in self.block_tables.values():
|
for block_table in self.block_tables.values():
|
||||||
self._free_block_table(block_table)
|
self._free_block_table(block_table)
|
||||||
self.block_tables.clear()
|
self.block_tables.clear()
|
||||||
|
|
||||||
|
def get_block_table(self, seq: Sequence) -> List[int]:
|
||||||
|
block_table = self.block_tables[seq.seq_id]
|
||||||
|
return [block.block_number for block in block_table]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user