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
130d5fd8
Unverified
Commit
130d5fd8
authored
May 04, 2023
by
Woosuk Kwon
Committed by
GitHub
May 04, 2023
Browse files
Fix a bug in attention kernel (#68)
parent
e070829a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
csrc/attention/attention_kernels.cu
csrc/attention/attention_kernels.cu
+1
-1
No files found.
csrc/attention/attention_kernels.cu
View file @
130d5fd8
...
...
@@ -345,7 +345,7 @@ void single_query_cached_kv_attention_launcher(
constexpr
int
NUM_WARPS
=
NUM_THREADS
/
WARP_SIZE
;
int
padded_max_context_len
=
((
max_context_len
+
BLOCK_SIZE
-
1
)
/
BLOCK_SIZE
)
*
BLOCK_SIZE
;
int
logits_size
=
padded_max_context_len
*
sizeof
(
T
);
int
logits_size
=
padded_max_context_len
*
sizeof
(
float
);
int
outputs_size
=
(
NUM_WARPS
/
2
)
*
head_size
*
sizeof
(
float
);
int
shared_mem_size
=
std
::
max
(
logits_size
,
outputs_size
);
...
...
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