Skip to content

Commit cc3caf5

Browse files
committed
Use hipAtomicAdd - hip-clang needs it.
Retrieved from: ROCm#7
1 parent e64bed0 commit cc3caf5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aten/src/THC/THCAtomics.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ static inline __device__ void atomicAdd(double *address, double val) {
140140
// Note: uses integer comparison to avoid hang in case of NaN (since NaN != NaN)
141141
} while (assumed != old);
142142
}
143-
#elif !defined(__CUDA_ARCH__) && (CUDA_VERSION < 8000) || defined(__HIP_PLATFORM_HCC__)
143+
#elif !defined(__CUDA_ARCH__) && (CUDA_VERSION < 8000) && !defined(__HIP_PLATFORM_HCC__)
144144
// This needs to be defined for the host side pass
145145
static inline __device__ void atomicAdd(double *address, double val) { }
146146
#endif

0 commit comments

Comments
 (0)