Skip to content

Commit ec8b76a

Browse files
committed
ROCm 1.9 and higher will contain a HIP with a proper function
definition. Hence, guard it. This addresses ROCm fork PR ROCm#7
1 parent 392d9e3 commit ec8b76a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

aten/src/THC/THCAtomics.cuh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,10 @@ static inline __device__ void atomicAdd(double *address, double val) {
138138
} while (assumed != old);
139139
}
140140
#elif !defined(__CUDA_ARCH__) && (CUDA_VERSION < 8000) || defined(__HIP_PLATFORM_HCC__)
141+
#if defined(__HIP_PLATFORM_HCC__) && __hcc_workwee__ < 18312
141142
// This needs to be defined for the host side pass
142143
static inline __device__ void atomicAdd(double *address, double val) { }
143144
#endif
145+
#endif
144146

145147
#endif // THC_ATOMICS_INC

0 commit comments

Comments
 (0)