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

[Phi] Migrate gelu/log_softmax/prelu op kernel and infershape #40393

Merged
merged 24 commits into from
Mar 18, 2022

Conversation

shentanyue
Copy link
Contributor

@shentanyue shentanyue commented Mar 10, 2022

PR types

New features

PR changes

OPs

Describe

migrate gelu/log_softmax cpu and gpu kernel

@paddle-bot-old
Copy link

paddle-bot-old bot commented Mar 10, 2022

✅ This PR's description meets the template requirements!
Please wait for other CI results.

@CLAassistant
Copy link

CLAassistant commented Mar 10, 2022

CLA assistant check
All committers have signed the CLA.

@paddle-bot-old
Copy link

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

@shentanyue shentanyue changed the title [Phi] Migrate gelu/log_softmax p kernel [Phi] Migrate gelu/log_softmax/prelu op kernel and infershape Mar 10, 2022
paddle/phi/kernels/funcs/log_softmax_functor.h Outdated Show resolved Hide resolved
paddle/phi/kernels/cpu/log_softmax_functor.h Outdated Show resolved Hide resolved
#include "paddle/phi/kernels/funcs/blas/blas_impl.h"
#include "paddle/phi/kernels/funcs/eigen/common.h"
#include "paddle/phi/kernels/funcs/eigen/eigen_function.h"
#include "paddle/phi/kernels/gelu_kernel.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

好像没有用到前向kernel?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

用到gelu前向kernel定义的 #define GELU_CONSTANT 0.044715

paddle/phi/kernels/funcs/log_softmax_functor.h Outdated Show resolved Hide resolved
paddle/phi/kernels/funcs/log_softmax_functor.h Outdated Show resolved Hide resolved
paddle/phi/kernels/gelu_grad_kernel.h Outdated Show resolved Hide resolved
paddle/phi/kernels/gpu/gelu_grad_kernel.cu Outdated Show resolved Hide resolved
paddle/phi/kernels/gpu/gelu_kernel.h Outdated Show resolved Hide resolved
paddle/phi/kernels/gpu/gelu_kernel.cu Outdated Show resolved Hide resolved
paddle/phi/kernels/prelu_grad_kernel.h Show resolved Hide resolved
paddle/phi/ops/compat/gelu_sig.cc Outdated Show resolved Hide resolved
paddle/phi/ops/compat/gelu_sig.cc Show resolved Hide resolved
paddle/phi/ops/compat/log_softmax_sig.cc Outdated Show resolved Hide resolved
paddle/phi/ops/compat/prelu_sig.cc Outdated Show resolved Hide resolved
Copy link
Contributor

@MingMingShangTian MingMingShangTian left a comment

Choose a reason for hiding this comment

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

LGTM

typename OutT,
typename Functor,
int NumOuts = 1>
void LaunchElementwiseCudaKernel(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

这个文件忘删除。这里可以忽略,会再提个commit移除

Copy link
Contributor

Choose a reason for hiding this comment

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

好的

zyfncg
zyfncg previously approved these changes Mar 17, 2022
YuanRisheng
YuanRisheng previously approved these changes Mar 17, 2022
Copy link
Contributor

@ZzSean ZzSean left a comment

Choose a reason for hiding this comment

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

LGTM for op benchmark

Copy link
Contributor

@XiaoguangHu01 XiaoguangHu01 left a comment

Choose a reason for hiding this comment

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

LGTM

@chenwhql chenwhql merged commit aed6faf into PaddlePaddle:develop Mar 18, 2022
@shentanyue shentanyue deleted the migrate_phi_op branch March 18, 2022 11:32
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.

9 participants