Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
fc7b8d1e
Unverified
Commit
fc7b8d1e
authored
Aug 09, 2024
by
Alexander Matveev
Committed by
GitHub
Aug 09, 2024
Browse files
[Performance] e2e overheads reduction: Small followup diff (#7364)
parent
67abdbb4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
vllm/core/block_manager_v1.py
vllm/core/block_manager_v1.py
+2
-2
vllm/sequence.py
vllm/sequence.py
+3
-0
No files found.
vllm/core/block_manager_v1.py
View file @
fc7b8d1e
...
...
@@ -336,9 +336,9 @@ class BlockSpaceManagerV1(BlockSpaceManager):
# Assign the self-attention block tables for each sequence.
if
len
(
wait_seqs
)
==
1
:
self
.
block_tables
[
wait_seqs
[
0
]
.
seq_id
]
=
block_table
self
.
block_tables
[
seq
.
seq_id
]
=
block_table
else
:
for
seq
in
seq_group
.
get_seqs
(
status
=
SequenceStatus
.
WAITING
)
:
for
seq
in
wait_seqs
:
self
.
block_tables
[
seq
.
seq_id
]
=
block_table
.
copy
()
# Allocate encoder sequence
...
...
vllm/sequence.py
View file @
fc7b8d1e
...
...
@@ -655,6 +655,9 @@ class SequenceGroup:
return
[
seq
for
seq
in
self
.
seqs
if
not
seq
.
is_finished
()]
def
get_finished_seqs
(
self
)
->
List
[
Sequence
]:
if
self
.
is_single_seq
:
return
self
.
seqs
if
self
.
seqs
[
0
].
is_finished
()
else
[]
return
[
seq
for
seq
in
self
.
seqs
if
seq
.
is_finished
()]
def
update_num_computed_tokens
(
self
,
num_new_computed_tokens
:
int
):
...
...
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