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

[PTen]Refactor elementwise_sub grad / double grad Kernel and move them to pten #39225

Merged

Conversation

YuanRisheng
Copy link
Contributor

PR types

Others

PR changes

Others

Describe

将elementwise_sub 反向一阶导,二阶导Kernel迁移到Pten下

@paddle-bot-old
Copy link

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


namespace paddle {
namespace operators {

template <typename DeviceContext, typename T>
Copy link
Contributor

Choose a reason for hiding this comment

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

这把sub放在div里合适吗?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

之前的代码当中,div引用了sub_op头文件中的这个函数,但是迁移后,这个函数在sub_op头文件中已经移除,且为了适应pten下的写法,pten下这个函数稍微修改的有点不一样了,于是干脆为了避免对div的修改,将sub的这个函数写入到了div当中。不过这个是临时写法,后续迁移div会删掉。

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 ci op benchmark

@YuanRisheng YuanRisheng merged commit 7a1e119 into PaddlePaddle:develop Jan 27, 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.

3 participants