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

Refactor softmax_cudnn kernel impl for code reuse. #35350

Merged
merged 4 commits into from
Sep 8, 2021

Conversation

limin2021
Copy link
Contributor

PR types

Performance optimization

PR changes

OPs

Describe

Refactor softmax_cudnn kernel impl for code reuse.
(1) move the cuda kernel impl in softmax_cudnn_op.cu to softmax_cudnn_op.cu.h for code reuse in future fused attention op.

Unittest results of softmax op:
d21f337727b9d62120ebdbf29adfe21c

@paddle-bot-old
Copy link

paddle-bot-old bot commented Sep 1, 2021

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@xingfeng01
Copy link
Contributor

LGTM. CI 恢复后 rerun 一下.


constexpr int max_dim = 320;
constexpr int warps_per_block = 4;
// auto* dx_data = dx->data<T>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这行注释删掉

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

zhangting2020
zhangting2020 previously approved these changes Sep 3, 2021
Copy link
Contributor

@zhangting2020 zhangting2020 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@Xreki Xreki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

4 participants