From 3185826358a10c7d23eaae9b31d87d35045319b9 Mon Sep 17 00:00:00 2001 From: xiongkun Date: Wed, 16 Mar 2022 09:52:32 +0800 Subject: [PATCH] lgamma tranfer make xpu ci failed. fix compile error in xpu CI (#40581) --- paddle/phi/kernels/cpu/lgamma_kernel.cc | 2 ++ paddle/phi/kernels/funcs/activation_functor.h | 4 ++++ paddle/phi/kernels/impl/lgamma_grad_kernel_impl.h | 1 + 3 files changed, 7 insertions(+) diff --git a/paddle/phi/kernels/cpu/lgamma_kernel.cc b/paddle/phi/kernels/cpu/lgamma_kernel.cc index d0226894089..f849322174d 100644 --- a/paddle/phi/kernels/cpu/lgamma_kernel.cc +++ b/paddle/phi/kernels/cpu/lgamma_kernel.cc @@ -13,6 +13,8 @@ // limitations under the License. #include "paddle/phi/kernels/lgamma_kernel.h" + +#include #include "paddle/phi/backends/cpu/cpu_context.h" #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/kernels/funcs/for_range.h" diff --git a/paddle/phi/kernels/funcs/activation_functor.h b/paddle/phi/kernels/funcs/activation_functor.h index c8fb54bb102..7fe513a24ba 100644 --- a/paddle/phi/kernels/funcs/activation_functor.h +++ b/paddle/phi/kernels/funcs/activation_functor.h @@ -35,6 +35,10 @@ #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/kernels/funcs/eigen/common.h" +#ifdef PADDLE_WITH_XPU_KP +#define __forceinline__ __inline__ +#endif + namespace phi { namespace funcs { enum ActBwdOpFwdDeps { diff --git a/paddle/phi/kernels/impl/lgamma_grad_kernel_impl.h b/paddle/phi/kernels/impl/lgamma_grad_kernel_impl.h index a1b33f5a331..8fb1f1c4fa3 100644 --- a/paddle/phi/kernels/impl/lgamma_grad_kernel_impl.h +++ b/paddle/phi/kernels/impl/lgamma_grad_kernel_impl.h @@ -13,6 +13,7 @@ // limitations under the License. #pragma once +#include #include "paddle/phi/kernels/funcs/for_range.h" namespace phi { template -- GitLab