-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feat] add flash attention #1762
Conversation
@triton.jit | ||
def _fwd_kernel( | ||
Q, K, V, sm_scale, | ||
TMP, L, M, # NOTE: TMP is a scratchpad buffer to workaround a compiler bug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add type hints for each parameter?
for example
TMP : torch.Tensor, L : int
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about some param. Will update it with alphafold version flash attention
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
add cuda and triton flash attention