Fork自 PaddlePaddle / Paddle
#ifdef PADDLE_WITH_XPU_KP // Please do not modify the following code #if defined(__CUDA_ARCH__) #undef __CUDA_ARCH__ #endif #if defined(__CUDACC__) #undef __CUDACC__ #endif #if defined(__CUDA__) #undef __CUDA__ #endif #if defined(__NVCC__) #undef __NVCC__ #endif #include "paddle/fluid/operators/collective/c_allreduce_op.h" namespace ops = paddle::operators; namespace plat = paddle::platform; REGISTER_OP_KERNEL(mp_allreduce_sum, KP, plat::XPUPlace, ops::CAllReduceOpXPUKernel<ops::kRedSum, float>); #endif