diff --git a/paddle/phi/kernels/xpu/interpolate_kernel.cc b/paddle/phi/kernels/xpu/interpolate_kernel.cc index 1730e76ba7d66acd8e4977ce34c0b74059101a82..091a8164ea4ec94016126b8635571197ac08db02 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); }