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
13403e81
Commit
13403e81
authored
Sep 11, 2022
by
Tri Dao
Browse files
Relax assert to allow both bf16 and fp16
parent
64f42cd0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
flash_attn/flash_attention.py
flash_attn/flash_attention.py
+1
-1
No files found.
flash_attn/flash_attention.py
View file @
13403e81
...
...
@@ -34,7 +34,7 @@ class FlashAttention(nn.Module):
key_padding_mask: a bool tensor of shape (B, S)
"""
assert
not
need_weights
assert
qkv
.
dtype
==
torch
.
float16
assert
qkv
.
dtype
in
[
torch
.
float16
,
torch
.
bfloat16
]
assert
qkv
.
is_cuda
if
cu_seqlens
is
None
:
...
...
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