diff --git a/include/caffe/common.cuh b/include/caffe/common.cuh old mode 100644 new mode 100755 index 63e7399..8eeb9e8 --- a/include/caffe/common.cuh +++ b/include/caffe/common.cuh @@ -6,6 +6,7 @@ #include // CUDA: atomicAdd is not defined for doubles +#if defined(__CUDA_ARCH__) && __CUDA_ARCH__ < 600 static __inline__ __device__ double atomicAdd(double *address, double val) { unsigned long long int* address_as_ull = (unsigned long long int*)address; unsigned long long int old = *address_as_ull, assumed; @@ -17,5 +18,6 @@ static __inline__ __device__ double atomicAdd(double *address, double val) { } while (assumed != old); return __longlong_as_double(old); } +#endif #endif