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
xdb4_94051
vllm
Commits
c8848191
"examples/vscode:/vscode.git/clone" did not exist on "a7a3ef947471525873bb8b1bf20e5966bfb8c69b"
Unverified
Commit
c8848191
authored
Jan 08, 2024
by
Woosuk Kwon
Committed by
GitHub
Jan 08, 2024
Browse files
Fix eager mode performance (#2377)
parent
05921a9a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
vllm/worker/model_runner.py
vllm/worker/model_runner.py
+3
-1
No files found.
vllm/worker/model_runner.py
View file @
c8848191
...
@@ -235,9 +235,11 @@ class ModelRunner:
...
@@ -235,9 +235,11 @@ class ModelRunner:
input_block_tables
[
i
,
:
len
(
block_table
)]
=
block_table
input_block_tables
[
i
,
:
len
(
block_table
)]
=
block_table
block_tables
=
torch
.
tensor
(
input_block_tables
,
device
=
"cuda"
)
block_tables
=
torch
.
tensor
(
input_block_tables
,
device
=
"cuda"
)
else
:
else
:
max_block_table_len
=
(
max_context_len
+
self
.
block_size
-
1
)
//
self
.
block_size
block_tables
=
_make_tensor_with_pad
(
block_tables
=
_make_tensor_with_pad
(
block_tables
,
block_tables
,
max_len
=
max_
context
_len
,
max_len
=
max_
block_table
_len
,
pad
=
0
,
pad
=
0
,
dtype
=
torch
.
int
,
dtype
=
torch
.
int
,
device
=
"cuda"
,
device
=
"cuda"
,
...
...
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