-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Refactor softmax_cudnn kernel impl for code reuse. #35350
Conversation
Thanks for your contribution! |
LGTM. CI 恢复后 rerun 一下. |
|
||
constexpr int max_dim = 320; | ||
constexpr int warps_per_block = 4; | ||
// auto* dx_data = dx->data<T>(); |
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.
这行注释删掉
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.
Done.
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.
LGTM
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.
LGTM
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: