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

Move conv to pten #39354

Merged
merged 47 commits into from
Mar 4, 2022
Merged

Move conv to pten #39354

merged 47 commits into from
Mar 4, 2022

Conversation

phlrain
Copy link
Collaborator

@phlrain phlrain commented Feb 6, 2022

PR types

Breaking changes

PR changes

OPs

Describe

move conv to pten

@paddle-bot-old
Copy link

paddle-bot-old bot commented Feb 6, 2022

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

wangxinxin08
wangxinxin08 previously approved these changes Feb 14, 2022
zyfncg
zyfncg previously approved these changes Mar 3, 2022
Comment on lines +208 to +215
// #ifndef PADDLE_WITH_ASCEND_CL
// if (input_data_type == framework::proto::VarType::FP16) {
// PADDLE_ENFORCE_EQ(
// library, framework::LibraryType::kCUDNN,
// platform::errors::InvalidArgument(
// "float16 can only be used when CUDNN or NPU is used"));
// }
// #endif
Copy link
Contributor

Choose a reason for hiding this comment

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

这里注释如果不需要的话后面可以删掉

@@ -0,0 +1,61 @@
// Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

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

double_grad的kernel可以和一阶grad放同一个文件里

} // namespace phi

PD_REGISTER_KERNEL(
conv2d_grad_grad, CPU, ALL_LAYOUT, phi::ConvGradGradKernel, float, double) {
Copy link
Contributor

Choose a reason for hiding this comment

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

xxx_grad_grad可以后面统一为xxx_double_grad

inline void TransToChannelFirst(const DeviceContext& context,
const Tensor* input,
Tensor* transformed_input) {
VLOG(5) << "Why am I called?";
Copy link
Contributor

Choose a reason for hiding this comment

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

??

@@ -0,0 +1,13 @@
// Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

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

这个文件是不可以删掉?

auto filter_dims = filter.dims();

DDim in_data_dims;
const paddle::framework::DataLayout data_layout =
Copy link
Contributor

Choose a reason for hiding this comment

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

paddle::framework::->phi::?


#include "paddle/fluid/operators/math/padding.h"
#include "paddle/fluid/platform/cudnn_workspace_helper.h"
#include "paddle/fluid/platform/float16.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

include "paddle/fluid/platform/float16.h" 可以去掉


#include "paddle/fluid/operators/math/padding.h"
#include "paddle/fluid/platform/cudnn_workspace_helper.h"
#include "paddle/fluid/platform/float16.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

include "paddle/fluid/platform/float16.h" 可去掉

auto blas = phi::funcs::GetBlas<Context, T>(dev_ctx);

if (input_grad) {
input_grad->mutable_data<T>(dev_ctx.GetPlace());
Copy link
Contributor

Choose a reason for hiding this comment

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

dev_ctx.Alloc

}

if (filter_grad) {
filter_grad->mutable_data<T>(dev_ctx.GetPlace());
Copy link
Contributor

Choose a reason for hiding this comment

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

同上

chenwhql
chenwhql previously approved these changes Mar 3, 2022
@phlrain phlrain dismissed stale reviews from chenwhql and zyfncg via 4dee03b March 3, 2022 08:22
@phlrain phlrain closed this Mar 4, 2022
@phlrain phlrain reopened this Mar 4, 2022
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

@phlrain phlrain merged commit d50fb43 into PaddlePaddle:develop Mar 4, 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