diff --git a/paddle/cuda/include/hl_device_functions.cuh b/paddle/cuda/include/hl_device_functions.cuh old mode 100644 new mode 100755 index 27e3f450c5c1c987f4b3fbc2eb1e52a1696c7320..2fbc2cfb50221efae90d96270602585007633d5c --- a/paddle/cuda/include/hl_device_functions.cuh +++ b/paddle/cuda/include/hl_device_functions.cuh @@ -16,6 +16,8 @@ limitations under the License. */ #ifndef HL_DEVICE_FUNCTIONS_CUH_ #define HL_DEVICE_FUNCTIONS_CUH_ +#if defined(__CUDA_ARCH__) && __CUDA_ARCH__ < 600 + namespace hppl { static __inline__ __device__ double atomicAdd(double* address, double val) { @@ -40,4 +42,6 @@ static __inline__ __device__ double atomicAdd(double* address, double val) { using hppl::atomicAdd; #endif +#endif + #endif /* HL_DEVICE_FUNCTIONS_CUH_ */