diff --git a/paddle/phi/api/yaml/legacy_backward.yaml b/paddle/phi/api/yaml/legacy_backward.yaml index 7bf61e29931f25a2240ef6a02f788242300811de..6736c379dfcdd107c8a836f947f2767eaca6be88 100755 --- a/paddle/phi/api/yaml/legacy_backward.yaml +++ b/paddle/phi/api/yaml/legacy_backward.yaml @@ -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 diff --git a/paddle/phi/kernels/cpu/conv_grad_kernel.cc b/paddle/phi/kernels/cpu/conv_grad_kernel.cc index 273b04df887fdc04b9c5e952e9cbb443c22fe020..0b4480b7bd4496e7440f98dd31a92a0afb130a53 100644 --- a/paddle/phi/kernels/cpu/conv_grad_kernel.cc +++ b/paddle/phi/kernels/cpu/conv_grad_kernel.cc @@ -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, diff --git a/paddle/phi/kernels/gpu/conv_grad_kernel.cu b/paddle/phi/kernels/gpu/conv_grad_kernel.cu index 037a619b7a29b9bc54f01f88e536ef5da2e8632e..af54f82025ac6cd51c2e07fd7ba0bd397f27e730 100644 --- a/paddle/phi/kernels/gpu/conv_grad_kernel.cu +++ b/paddle/phi/kernels/gpu/conv_grad_kernel.cu @@ -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) {} diff --git a/paddle/phi/kernels/gpudnn/conv_grad_kernel.cu b/paddle/phi/kernels/gpudnn/conv_grad_kernel.cu index d81c03ceabb5c663c309670258324b6f0758bcf5..a41144c5ee736178937f3a969ab4d3ba51d66c1c 100644 --- a/paddle/phi/kernels/gpudnn/conv_grad_kernel.cu +++ b/paddle/phi/kernels/gpudnn/conv_grad_kernel.cu @@ -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, @@ -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, @@ -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, diff --git a/paddle/phi/ops/compat/conv2d_sig.cc b/paddle/phi/ops/compat/conv2d_sig.cc index 6963d6a06d8203388a3de0fa3bbcd40cdc6a90bf..4e63ee19580ed4aebeeef24cecbffdfcf02008b5 100644 --- a/paddle/phi/ops/compat/conv2d_sig.cc +++ b/paddle/phi/ops/compat/conv2d_sig.cc @@ -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",