Parametrice CUDA path

In some distros CUDA is not installed in /usr/local/cuda, i.e. in ArchLinux it's installed in /opt/cuda/.
This commit is contained in:
Ismael Barros² 2018-04-01 14:10:50 +02:00 committed by GitHub
parent 259be3217b
commit 642564a97e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,7 @@ CUDNN=0
OPENCV=0 OPENCV=0
OPENMP=0 OPENMP=0
DEBUG=0 DEBUG=0
CUDAPATH=/usr/local/cuda
ARCH= -gencode arch=compute_30,code=sm_30 \ ARCH= -gencode arch=compute_30,code=sm_30 \
-gencode arch=compute_35,code=sm_35 \ -gencode arch=compute_35,code=sm_35 \
@ -46,9 +47,9 @@ COMMON+= `pkg-config --cflags opencv`
endif endif
ifeq ($(GPU), 1) ifeq ($(GPU), 1)
COMMON+= -DGPU -I/usr/local/cuda/include/ COMMON+= -DGPU -I$(CUDAPATH)/include/
CFLAGS+= -DGPU CFLAGS+= -DGPU
LDFLAGS+= -L/usr/local/cuda/lib64 -lcuda -lcudart -lcublas -lcurand LDFLAGS+= -L$(CUDAPATH)/lib64 -lcuda -lcudart -lcublas -lcurand
endif endif
ifeq ($(CUDNN), 1) ifeq ($(CUDNN), 1)