Skip to content

Test PR#410

Closed
serach24 wants to merge 0 commit intohidet-org:mainfrom
serach24:Chenhao/test
Closed

Test PR#410
serach24 wants to merge 0 commit intohidet-org:mainfrom
serach24:Chenhao/test

Conversation

@serach24
Copy link
Copy Markdown
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