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]Move Tanh/BRelu/LeakyRelu/ThresholdedRelu Kernels to Phi #40385

Merged
merged 20 commits into from
Mar 15, 2022

Conversation

YuanRisheng
Copy link
Contributor

@YuanRisheng YuanRisheng commented Mar 9, 2022

PR types

Others

PR changes

Others

Describe

将activation op下的 Tanh/BRelu/LeakyRelu/ThresholdedRelu移动到Phi下。

@paddle-bot-old
Copy link

paddle-bot-old bot commented Mar 9, 2022

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

@YuanRisheng YuanRisheng reopened this Mar 10, 2022
@YuanRisheng YuanRisheng changed the title Move activation4 [Phi]Move Tanh/BRelu/LeakyRelu/ThresholdedRelu Kernels to Phi Mar 10, 2022
@PaddlePaddle PaddlePaddle locked and limited conversation to collaborators Mar 12, 2022
@PaddlePaddle PaddlePaddle unlocked this conversation Mar 12, 2022
@PaddlePaddle PaddlePaddle locked and limited conversation to collaborators Mar 12, 2022
@PaddlePaddle PaddlePaddle unlocked this conversation Mar 12, 2022
Copy link
Contributor

@DannyIsFunny DannyIsFunny 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

@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

const ArgumentMappingContext& ctx) { \
return KernelSignature( \
op_name "_grad", {"X", GradVarName("Out")}, {}, {GradVarName("X")}); \
#define DefineActGradDepXOpArgMap(func_name, op_name, attrs) \
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.

好的下个PR修改

dev_ctx, &x, nullptr, &dout, dx, functor); \
}

#define DEFINE_CPU_ACT_GRAD_KERNEL_WITH_ONE_ATTRS_DepX( \
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.

下个pr修复

@YuanRisheng YuanRisheng merged commit d711218 into PaddlePaddle:develop Mar 15, 2022
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.

5 participants