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
38ed06a8
Commit
38ed06a8
authored
Feb 09, 2023
by
Woosuk Kwon
Browse files
Minor
parent
0a11a2e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
cacheflow/master/block_manager.py
cacheflow/master/block_manager.py
+3
-3
No files found.
cacheflow/master/block_manager.py
View file @
38ed06a8
...
@@ -119,10 +119,10 @@ class BlockSpaceManager:
...
@@ -119,10 +119,10 @@ class BlockSpaceManager:
else
:
else
:
# The last block is shared with other sequences.
# The last block is shared with other sequences.
# Copy on Write: Allocate a new block and copy the tokens.
# Copy on Write: Allocate a new block and copy the tokens.
block
=
self
.
gpu_allocator
.
allocate
()
new_
block
=
self
.
gpu_allocator
.
allocate
()
block_table
.
append
(
block
)
block_table
.
append
(
new_
block
)
self
.
gpu_allocator
.
free
(
last_block
)
self
.
gpu_allocator
.
free
(
last_block
)
return
last_block
.
block_number
,
block
.
block_number
return
last_block
.
block_number
,
new_
block
.
block_number
def
fork
(
self
,
src_seq
:
Sequence
,
child_seq
:
Sequence
)
->
None
:
def
fork
(
self
,
src_seq
:
Sequence
,
child_seq
:
Sequence
)
->
None
:
# NOTE: fork does not allocate a new physical block.
# NOTE: fork does not allocate a new physical block.
...
...
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