Skip to content
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

Test PR #410

Closed
wants to merge 0 commits into from
Closed

Test PR #410

wants to merge 0 commits into from

Conversation

serach24
Copy link
Contributor

@serach24 serach24 commented Jan 9, 2024

No description provided.

@serach24 serach24 closed this Jan 9, 2024
vadiklyutiy pushed a commit that referenced this pull request Dec 19, 2024
- add a primitive of exp2 for float types.  

This primitive could be useful when optimizing the flash attention.
Specifically, flash attention rewrites the exponential function as
```
# log2_e = 1.44269504
exp(a) = exp2(a * log2_e)
```
The transformation can hint the nvcc compiler to generate better code
(more ffma instructions instead of fmuls and fadds) .

---------

Co-authored-by: xiaocenxiaocen <xiao.zhang@centml.ai>
vadiklyutiy pushed a commit that referenced this pull request Dec 20, 2024
- add a primitive of exp2 for float types.  

This primitive could be useful when optimizing the flash attention.
Specifically, flash attention rewrites the exponential function as
```
# log2_e = 1.44269504
exp(a) = exp2(a * log2_e)
```
The transformation can hint the nvcc compiler to generate better code
(more ffma instructions instead of fmuls and fadds) .

---------

Co-authored-by: xiaocenxiaocen <xiao.zhang@centml.ai>
vadiklyutiy pushed a commit that referenced this pull request Dec 26, 2024
- add a primitive of exp2 for float types.  

This primitive could be useful when optimizing the flash attention.
Specifically, flash attention rewrites the exponential function as
```
# log2_e = 1.44269504
exp(a) = exp2(a * log2_e)
```
The transformation can hint the nvcc compiler to generate better code
(more ffma instructions instead of fmuls and fadds) .

---------

Co-authored-by: xiaocenxiaocen <xiao.zhang@centml.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant