diff --git a/paddle/phi/kernels/funcs/mode.h b/paddle/phi/kernels/funcs/mode.h index 1b7641762e2639acf3db540280891b518f22eed2..3bd6c19545e16c1bca2881c4804db43af2b0b227 100644 --- a/paddle/phi/kernels/funcs/mode.h +++ b/paddle/phi/kernels/funcs/mode.h @@ -14,7 +14,7 @@ #pragma once -#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) +#if defined(__NVCC__) || defined(__HIPCC__) #include #include #include @@ -143,7 +143,7 @@ static void ModeAssign(const Type& input_height, } } -#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) +#if defined(__NVCC__) || defined(__HIPCC__) template static void GetModebySort(const phi::GPUContext& dev_ctx, const DenseTensor* input_tensor,