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
c65146e7
Unverified
Commit
c65146e7
authored
Jun 05, 2024
by
Woosuk Kwon
Committed by
GitHub
Jun 05, 2024
Browse files
[Misc] Fix docstring of get_attn_backend (#5271)
parent
41ca62cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
vllm/attention/selector.py
vllm/attention/selector.py
+2
-3
No files found.
vllm/attention/selector.py
View file @
c65146e7
...
@@ -31,15 +31,14 @@ def get_attn_backend(
...
@@ -31,15 +31,14 @@ def get_attn_backend(
block_size
:
int
,
block_size
:
int
,
is_blocksparse
:
bool
=
False
,
is_blocksparse
:
bool
=
False
,
)
->
Type
[
AttentionBackend
]:
)
->
Type
[
AttentionBackend
]:
"""Selects which attention backend to use and lazily imports it."""
if
is_blocksparse
:
if
is_blocksparse
:
logger
.
info
(
"Using BlocksparseFlashAttention backend."
)
logger
.
info
(
"Using BlocksparseFlashAttention backend."
)
from
vllm.attention.backends.blocksparse_attn
import
(
from
vllm.attention.backends.blocksparse_attn
import
(
BlocksparseFlashAttentionBackend
)
BlocksparseFlashAttentionBackend
)
return
BlocksparseFlashAttentionBackend
return
BlocksparseFlashAttentionBackend
"""Determine which attention backend to use and only import
the selected backend module.
"""
backend
=
which_attn_to_use
(
num_heads
,
head_size
,
num_kv_heads
,
backend
=
which_attn_to_use
(
num_heads
,
head_size
,
num_kv_heads
,
sliding_window
,
dtype
,
kv_cache_dtype
,
sliding_window
,
dtype
,
kv_cache_dtype
,
block_size
)
block_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