From 3b0551995a015f42f36d91b3d37239f01332380d Mon Sep 17 00:00:00 2001 From: csy0225 <78470701+csy0225@users.noreply.github.com> Date: Tue, 28 Mar 2023 09:41:10 +0800 Subject: [PATCH] Modify the registration information of the interpolate kernel (#52163) --- paddle/phi/kernels/xpu/interpolate_kernel.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/paddle/phi/kernels/xpu/interpolate_kernel.cc b/paddle/phi/kernels/xpu/interpolate_kernel.cc index 1730e76ba7d..091a8164ea4 100644 --- a/paddle/phi/kernels/xpu/interpolate_kernel.cc +++ b/paddle/phi/kernels/xpu/interpolate_kernel.cc @@ -223,11 +223,13 @@ void NearestInterpKernel( PD_REGISTER_KERNEL( bilinear_interp, XPU, ALL_LAYOUT, phi::BilinearInterpKernel, float) { + kernel->InputAt(1).SetBackend(phi::Backend::ALL_BACKEND); kernel->InputAt(2).SetBackend(phi::Backend::ALL_BACKEND); kernel->InputAt(3).SetBackend(phi::Backend::ALL_BACKEND); } PD_REGISTER_KERNEL( nearest_interp, XPU, ALL_LAYOUT, phi::NearestInterpKernel, float) { + kernel->InputAt(1).SetBackend(phi::Backend::ALL_BACKEND); kernel->InputAt(2).SetBackend(phi::Backend::ALL_BACKEND); kernel->InputAt(3).SetBackend(phi::Backend::ALL_BACKEND); } -- GitLab