Compatibility with Sapporo
This commit is contained in:
parent
21bba88d27
commit
c6c95c393c
5 changed files with 96 additions and 8 deletions
54
sapporo2/patch.diff
Normal file
54
sapporo2/patch.diff
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
diff -ruN
|
||||
--- lib/CUDAKernels/kernels.cu
|
||||
+++
|
||||
@@ -206,7 +206,7 @@
|
||||
// template<> __device__ __forceinline__ double RSQRT(double val) { return 1.0/sqrt(val); }
|
||||
|
||||
|
||||
-
|
||||
+#if (CUDART_VERSION <= 8000)
|
||||
__device__ double atomicAdd(double* address, double val)
|
||||
{
|
||||
unsigned long long int* address_as_ull =
|
||||
@@ -220,7 +220,7 @@
|
||||
} while (assumed != old);
|
||||
return __longlong_as_double(old);
|
||||
}
|
||||
-
|
||||
+#endif
|
||||
|
||||
__device__ __forceinline__ double atomicMin(double *address, double val)
|
||||
{
|
||||
diff -ruN
|
||||
--- lib/Makefile
|
||||
+++
|
||||
@@ -5,7 +5,8 @@
|
||||
|
||||
.SUFFIXES: .o .cpp .ptx .cu
|
||||
|
||||
-CUDA_TK ?= /usr/local/cuda
|
||||
+CUDAHOME ?= /usr/local/cuda
|
||||
+CUDA_TK = $(CUDAHOME)
|
||||
|
||||
|
||||
testRunFlags1=
|
||||
@@ -36,17 +37,8 @@
|
||||
NVCC = $(CUDA_TK)/bin/nvcc
|
||||
|
||||
|
||||
-# Support older CUDA versions out of the box
|
||||
-NVCCVERSION=$(shell "${NVCC}" --version | grep ^Cuda | sed 's/^.* //g')
|
||||
-ifeq "${NVCCVERSION}" "V5.5.22"
|
||||
- NVCCFLAGS ?= -arch sm_20
|
||||
-else
|
||||
- NVCCFLAGS ?= -arch sm_30
|
||||
-endif
|
||||
-
|
||||
-#NVCCFLAGS = -arch sm_35
|
||||
-#NVCCFLAGS ?= -arch sm_30
|
||||
-#NVCCFLAGS = -arch sm_20
|
||||
+GPUARCH ?= sm_75
|
||||
+NVCCFLAGS = -arch $(GPUARCH)
|
||||
NVCCFLAGS += ${testRunFlags}
|
||||
|
||||
# Use with Mac OS X
|
||||
Loading…
Add table
Add a link
Reference in a new issue