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

rename_conv2d_grad_grad #52374

Merged
merged 1 commit into from
Mar 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion paddle/phi/api/yaml/legacy_backward.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
func : GeneralTernaryGradInferMeta
param: [input, filter, grad_out]
kernel :
func : conv2d_grad_grad
func : conv2d_double_grad
optional : grad_input_grad, grad_filter_grad

- backward_op : conv2d_transpose_double_grad
Expand Down
9 changes: 6 additions & 3 deletions paddle/phi/kernels/cpu/conv_grad_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,12 @@ PD_REGISTER_KERNEL(depthwise_conv2d_grad,
PD_REGISTER_KERNEL(
conv3d_grad, CPU, ALL_LAYOUT, phi::Conv3DGradKernel, float, double) {}

PD_REGISTER_KERNEL(
conv2d_grad_grad, CPU, ALL_LAYOUT, phi::ConvGradGradKernel, float, double) {
}
PD_REGISTER_KERNEL(conv2d_double_grad,
CPU,
ALL_LAYOUT,
phi::ConvGradGradKernel,
float,
double) {}

PD_REGISTER_KERNEL(conv3d_double_grad,
CPU,
Expand Down
9 changes: 6 additions & 3 deletions paddle/phi/kernels/gpu/conv_grad_kernel.cu
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ PD_REGISTER_KERNEL(
PD_REGISTER_KERNEL(
conv3d_grad, GPU, ALL_LAYOUT, phi::Conv3DGradKernel, float, double) {}

PD_REGISTER_KERNEL(
conv2d_grad_grad, GPU, ALL_LAYOUT, phi::ConvGradGradKernel, float, double) {
}
PD_REGISTER_KERNEL(conv2d_double_grad,
GPU,
ALL_LAYOUT,
phi::ConvGradGradKernel,
float,
double) {}
6 changes: 3 additions & 3 deletions paddle/phi/kernels/gpudnn/conv_grad_kernel.cu
Original file line number Diff line number Diff line change
Expand Up @@ -1473,7 +1473,7 @@ PD_REGISTER_KERNEL(depthwise_conv2d_grad,
phi::DepthwiseConvCudnnGradKernel,
float,
phi::dtype::float16) {}
PD_REGISTER_KERNEL(conv2d_grad_grad,
PD_REGISTER_KERNEL(conv2d_double_grad,
GPUDNN,
ALL_LAYOUT,
phi::ConvCudnnGradGradKernel,
Expand Down Expand Up @@ -1512,7 +1512,7 @@ PD_REGISTER_KERNEL(conv3d_grad,
double,
phi::dtype::float16,
phi::dtype::bfloat16) {}
PD_REGISTER_KERNEL(conv2d_grad_grad,
PD_REGISTER_KERNEL(conv2d_double_grad,
GPUDNN,
ALL_LAYOUT,
phi::ConvCudnnGradGradKernel,
Expand Down Expand Up @@ -1555,7 +1555,7 @@ PD_REGISTER_KERNEL(conv3d_grad,
double,
phi::dtype::float16) {}

PD_REGISTER_KERNEL(conv2d_grad_grad,
PD_REGISTER_KERNEL(conv2d_double_grad,
GPUDNN,
ALL_LAYOUT,
phi::ConvCudnnGradGradKernel,
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/ops/compat/conv2d_sig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ KernelSignature Conv2dGradOpArgumentMapping(const ArgumentMappingContext& ctx) {

KernelSignature Conv2dDoubleGradOpArgumentMapping(
const ArgumentMappingContext& ctx) {
return KernelSignature("conv2d_grad_grad",
return KernelSignature("conv2d_double_grad",
{"Input", "Filter", "DOutput", "DDInput", "DDFilter"},
{"strides",
"paddings",
Expand Down