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 408ff35d963c65bd995b688dbc76b7520647a03f..e7481b90e1a9cb01ce81c1a3cfeabe1ac288fe8a --- 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) { @@ -38,4 +40,6 @@ static __inline__ __device__ double atomicAdd(double* address, double val) { using hppl::atomicAdd; +#endif + #endif /* HL_DEVICE_FUNCTIONS_CUH_ */