Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
norm
vllm
Commits
263e91b3
"git@developer.sourcefind.cn:OpenDAS/torchaudio.git" did not exist on "7ba7cf4d24a2967b8fa4aaff437116524281f8fd"
Commit
263e91b3
authored
Feb 14, 2023
by
Woosuk Kwon
Browse files
Minor
parent
be1e2163
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
cacheflow/master/block_manager.py
cacheflow/master/block_manager.py
+4
-4
No files found.
cacheflow/master/block_manager.py
View file @
263e91b3
...
@@ -210,8 +210,8 @@ class BlockSpaceManager:
...
@@ -210,8 +210,8 @@ class BlockSpaceManager:
}
}
return
block_number_mapping
return
block_number_mapping
def
_free_block
s
(
self
,
block
s
:
Iterable
[
PhysicalTokenBlock
]
)
->
None
:
def
_free_block
_table
(
self
,
block
_table
:
BlockTable
)
->
None
:
for
block
in
block
s
:
for
block
in
block
_table
:
if
block
.
device
==
Device
.
GPU
:
if
block
.
device
==
Device
.
GPU
:
self
.
gpu_allocator
.
free
(
block
)
self
.
gpu_allocator
.
free
(
block
)
else
:
else
:
...
@@ -219,10 +219,10 @@ class BlockSpaceManager:
...
@@ -219,10 +219,10 @@ class BlockSpaceManager:
def
free
(
self
,
seq
:
Sequence
)
->
None
:
def
free
(
self
,
seq
:
Sequence
)
->
None
:
block_table
=
self
.
block_tables
[
seq
.
seq_id
]
block_table
=
self
.
block_tables
[
seq
.
seq_id
]
self
.
_free_block
s
(
block_table
)
self
.
_free_block
_table
(
block_table
)
del
self
.
block_tables
[
seq
.
seq_id
]
del
self
.
block_tables
[
seq
.
seq_id
]
def
reset
(
self
)
->
None
:
def
reset
(
self
)
->
None
:
for
block_table
in
self
.
block_tables
.
values
():
for
block_table
in
self
.
block_tables
.
values
():
self
.
_free_block
s
(
block_table
)
self
.
_free_block
_table
(
block_table
)
self
.
block_tables
.
clear
()
self
.
block_tables
.
clear
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment