From e2b05dcc79bb3c763da44cd914544bd435fcb570 Mon Sep 17 00:00:00 2001 From: hong <43953930+phlrain@users.noreply.github.com> Date: Wed, 6 Sep 2023 09:45:24 +0800 Subject: [PATCH] refine bilinear interp grad register (#56976) --- paddle/phi/kernels/gpu/interpolate_grad_kernel.cu | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/paddle/phi/kernels/gpu/interpolate_grad_kernel.cu b/paddle/phi/kernels/gpu/interpolate_grad_kernel.cu index ebc12bc7706..da633b73bf6 100644 --- a/paddle/phi/kernels/gpu/interpolate_grad_kernel.cu +++ b/paddle/phi/kernels/gpu/interpolate_grad_kernel.cu @@ -1572,6 +1572,7 @@ PD_REGISTER_KERNEL(bilinear_interp_grad, double, phi::dtype::float16, phi::dtype::bfloat16) { + kernel->InputAt(1).SetBackend(phi::Backend::CPU); kernel->InputAt(2).SetBackend(phi::Backend::ALL_BACKEND); kernel->InputAt(3).SetBackend(phi::Backend::ALL_BACKEND); } @@ -1583,6 +1584,7 @@ PD_REGISTER_KERNEL(nearest_interp_grad, double, phi::dtype::float16, phi::dtype::bfloat16) { + kernel->InputAt(1).SetBackend(phi::Backend::CPU); kernel->InputAt(2).SetBackend(phi::Backend::ALL_BACKEND); kernel->InputAt(3).SetBackend(phi::Backend::ALL_BACKEND); } @@ -1594,6 +1596,7 @@ PD_REGISTER_KERNEL(trilinear_interp_grad, double, phi::dtype::float16, phi::dtype::bfloat16) { + kernel->InputAt(1).SetBackend(phi::Backend::CPU); kernel->InputAt(2).SetBackend(phi::Backend::ALL_BACKEND); kernel->InputAt(3).SetBackend(phi::Backend::ALL_BACKEND); } @@ -1605,6 +1608,7 @@ PD_REGISTER_KERNEL(linear_interp_grad, double, phi::dtype::float16, phi::dtype::bfloat16) { + kernel->InputAt(1).SetBackend(phi::Backend::CPU); kernel->InputAt(2).SetBackend(phi::Backend::ALL_BACKEND); kernel->InputAt(3).SetBackend(phi::Backend::ALL_BACKEND); } @@ -1616,6 +1620,7 @@ PD_REGISTER_KERNEL(bicubic_interp_grad, double, phi::dtype::float16, phi::dtype::bfloat16) { + kernel->InputAt(1).SetBackend(phi::Backend::CPU); kernel->InputAt(2).SetBackend(phi::Backend::ALL_BACKEND); kernel->InputAt(3).SetBackend(phi::Backend::ALL_BACKEND); } -- GitLab