From ed7bc2bde71a5b0bc7ce771484f73cbfbd9ba718 Mon Sep 17 00:00:00 2001 From: Ghost Screaming Date: Tue, 20 Sep 2022 09:20:19 +0800 Subject: [PATCH] Fix bug of reduce sum kp operator compilation (#46204) --- paddle/phi/kernels/kps/reduce_sum_kernel.cu | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/paddle/phi/kernels/kps/reduce_sum_kernel.cu b/paddle/phi/kernels/kps/reduce_sum_kernel.cu index 1f88ea2cd11..c5a30a6a634 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, -- GitLab