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_add grad / double grad / triple grad Kernel and move them to pten #39048

Merged

Conversation

YuanRisheng
Copy link
Contributor

PR types

Others

PR changes

Others

Describe

将fluid下elementwise add的一阶、二阶、三阶导数迁移到pten下边

@paddle-bot-old
Copy link

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

@@ -18,35 +18,13 @@ limitations under the License. */
#include <utility>
#include "paddle/fluid/operators/elementwise/elementwise_op.h"

// only can include the headers in paddle/pten/include dirs
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处理

@@ -52,6 +53,18 @@ template struct SetConstant<platform::CPUDeviceContext,
template struct SetConstant<platform::CPUDeviceContext,
platform::complex<double>>;

template struct SetConstant<pten::CPUContext, platform::float16>;
Copy link
Contributor

Choose a reason for hiding this comment

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

这里为什么增加了pten::CPUContext的实例化?pten::CPUContextplatform::CPUDeviceContext不是一样的吗?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

被改了,不一样了,可参考相关代码

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

@YuanRisheng YuanRisheng merged commit 3bf3a6e into PaddlePaddle:develop Jan 24, 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.

4 participants