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
e2df3544
Commit
e2df3544
authored
Jun 20, 2024
by
zhuwenwen
Browse files
update triton fa
parent
21c06ecb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
vllm/attention/ops/triton_flash_attention.py
vllm/attention/ops/triton_flash_attention.py
+9
-9
vllm/envs.py
vllm/envs.py
+1
-1
No files found.
vllm/attention/ops/triton_flash_attention.py
View file @
e2df3544
...
...
@@ -213,7 +213,7 @@ def _attn_fwd_inner(
{
"BLOCK_M"
:
256
,
"BLOCK_N"
:
64
,
"waves_per_eu"
:
2
,
"waves_per_eu"
:
0
,
"PRE_LOAD_V"
:
False
,
},
num_stages
=
1
,
...
...
@@ -223,7 +223,7 @@ def _attn_fwd_inner(
{
"BLOCK_M"
:
128
,
"BLOCK_N"
:
128
,
"waves_per_eu"
:
2
,
"waves_per_eu"
:
0
,
"PRE_LOAD_V"
:
False
,
},
num_stages
=
1
,
...
...
@@ -233,7 +233,7 @@ def _attn_fwd_inner(
{
"BLOCK_M"
:
256
,
"BLOCK_N"
:
128
,
"waves_per_eu"
:
2
,
"waves_per_eu"
:
0
,
"PRE_LOAD_V"
:
False
,
},
num_stages
=
1
,
...
...
@@ -243,7 +243,7 @@ def _attn_fwd_inner(
{
"BLOCK_M"
:
128
,
"BLOCK_N"
:
64
,
"waves_per_eu"
:
1
,
"waves_per_eu"
:
0
,
"PRE_LOAD_V"
:
False
,
},
num_stages
=
1
,
...
...
@@ -253,7 +253,7 @@ def _attn_fwd_inner(
{
"BLOCK_M"
:
128
,
"BLOCK_N"
:
64
,
"waves_per_eu"
:
3
,
"waves_per_eu"
:
0
,
"PRE_LOAD_V"
:
True
,
},
num_stages
=
1
,
...
...
@@ -263,7 +263,7 @@ def _attn_fwd_inner(
{
"BLOCK_M"
:
128
,
"BLOCK_N"
:
64
,
"waves_per_eu"
:
3
,
"waves_per_eu"
:
0
,
"PRE_LOAD_V"
:
False
,
},
num_stages
=
1
,
...
...
@@ -273,7 +273,7 @@ def _attn_fwd_inner(
{
"BLOCK_M"
:
64
,
"BLOCK_N"
:
64
,
"waves_per_eu"
:
4
,
"waves_per_eu"
:
0
,
"PRE_LOAD_V"
:
False
,
},
num_stages
=
1
,
...
...
@@ -283,7 +283,7 @@ def _attn_fwd_inner(
{
"BLOCK_M"
:
32
,
"BLOCK_N"
:
32
,
"waves_per_eu"
:
4
,
"waves_per_eu"
:
0
,
"PRE_LOAD_V"
:
False
,
},
num_stages
=
1
,
...
...
@@ -296,7 +296,7 @@ def _attn_fwd_inner(
{
"BLOCK_M"
:
16
,
"BLOCK_N"
:
16
,
"waves_per_eu"
:
1
,
"waves_per_eu"
:
0
,
"PRE_LOAD_V"
:
False
,
},
num_stages
=
1
,
...
...
vllm/envs.py
View file @
e2df3544
...
...
@@ -130,7 +130,7 @@ environment_variables: Dict[str, Callable[[], Any]] = {
# flag to control if vllm should use triton flash attention
"VLLM_USE_TRITON_FLASH_ATTN"
:
lambda
:
(
os
.
environ
.
get
(
"VLLM_USE_TRITON_FLASH_ATTN"
,
"
Tru
e"
).
lower
()
in
lambda
:
(
os
.
environ
.
get
(
"VLLM_USE_TRITON_FLASH_ATTN"
,
"
Fals
e"
).
lower
()
in
(
"true"
,
"1"
)),
# local rank of the process in the distributed setting, used to determine
...
...
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