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
gaoqiong
flash-attention
Commits
4360cfc6
Commit
4360cfc6
authored
Mar 22, 2023
by
Tri Dao
Browse files
[Triton] Fix benchmark_causal.py
parent
5d079fdd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
benchmarks/benchmark_causal.py
benchmarks/benchmark_causal.py
+2
-2
No files found.
benchmarks/benchmark_causal.py
View file @
4360cfc6
...
...
@@ -93,8 +93,8 @@ benchmark_all(flash_attn_unpadded_qkvpacked_func, rearrange(qkv, 'b s ... -> (b
benchmark_all
(
attention_pytorch
,
qkv
,
dropout_p
,
causal
=
causal
,
repeats
=
repeats
,
desc
=
'PyTorch Attention'
)
benchmark_all
(
flash_attn_qkvpacked_func
,
qkv
,
causal
=
causal
,
repeats
=
repeats
,
desc
=
'FlashAttention Triton'
)
pytorch_profiler
(
flash_attn_qkvpacked_func
,
qkv
,
causal
=
causal
,
backward
=
True
)
benchmark_all
(
flash_attn_qkvpacked_func
,
qkv
,
None
,
causal
,
repeats
=
repeats
,
desc
=
'FlashAttention Triton'
)
pytorch_profiler
(
flash_attn_qkvpacked_func
,
qkv
,
None
,
causal
,
backward
=
True
)
q
,
k
,
v
=
[
torch
.
randn
(
batch_size
,
nheads
,
seqlen
,
headdim
,
device
=
device
,
dtype
=
dtype
,
requires_grad
=
True
)
for
_
in
range
(
3
)]
...
...
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