mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
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:
parent
259be3217b
commit
642564a97e
5
Makefile
5
Makefile
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user