From 49f1ab2a342c476aae9dbd77d54eaf7cbb5f5be7 Mon Sep 17 00:00:00 2001 From: sneaxiy <32832641+sneaxiy@users.noreply.github.com> Date: Mon, 21 Mar 2022 15:06:18 +0800 Subject: [PATCH] fix compile error on CUDA 11.6 (#40694) --- paddle/phi/kernels/funcs/mode.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/phi/kernels/funcs/mode.h b/paddle/phi/kernels/funcs/mode.h index 1b7641762e2..3bd6c19545e 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, -- GitLab