diff --git a/paddle/phi/kernels/kps/reduce_sum_kernel.cu b/paddle/phi/kernels/kps/reduce_sum_kernel.cu index 1f88ea2cd111eff6a97f072144e7d398beacfd19..c5a30a6a634a8ea384c0dcb847b8cb77f16f197a 100644 --- a/paddle/phi/kernels/kps/reduce_sum_kernel.cu +++ b/paddle/phi/kernels/kps/reduce_sum_kernel.cu @@ -16,11 +16,14 @@ #include #include "paddle/phi/core/enforce.h" #include "paddle/phi/core/kernel_registry.h" -#include "paddle/phi/kernels/funcs/eigen/common.h" #include "paddle/phi/kernels/gpu/reduce.h" +#ifndef PADDLE_WITH_XPU_KP +#include "paddle/phi/kernels/funcs/eigen/common.h" +#endif namespace phi { +#ifndef PADDLE_WITH_XPU_KP template Resize(origin_out_dims); } +#endif template void SumRawKernel(const Context& dev_ctx,