From 27e14caba119ef2d29a5eb50d543f7c785f66727 Mon Sep 17 00:00:00 2001 From: Dmitry Mikushin Date: Tue, 22 Oct 2019 23:52:18 +0300 Subject: [PATCH] Patching THCAtomics.cuh as shown here https://github.com/torch/cutorch/issues/834 --- lib/THC/THCAtomics.cuh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/THC/THCAtomics.cuh b/lib/THC/THCAtomics.cuh index 400875ca..ccb7a1c5 100644 --- a/lib/THC/THCAtomics.cuh +++ b/lib/THC/THCAtomics.cuh @@ -94,6 +94,7 @@ static inline __device__ void atomicAdd(long *address, long val) { } #ifdef CUDA_HALF_TENSOR +#if !(__CUDA_ARCH__ >= 700 || !defined(__CUDA_ARCH__) ) static inline __device__ void atomicAdd(half *address, half val) { unsigned int * address_as_ui = (unsigned int *) ((char *)address - ((size_t)address & 2)); @@ -117,6 +118,7 @@ static inline __device__ void atomicAdd(half *address, half val) { } while (assumed != old); } #endif +#endif #if defined(__CUDA_ARCH__) && (__CUDA_ARCH__ < 600 || CUDA_VERSION < 8000) // from CUDA C Programmic Guide