mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
Added flag AVX to the Makefile
This commit is contained in:
10
Makefile
10
Makefile
@ -2,10 +2,16 @@ GPU=0
|
|||||||
CUDNN=0
|
CUDNN=0
|
||||||
CUDNN_HALF=0
|
CUDNN_HALF=0
|
||||||
OPENCV=0
|
OPENCV=0
|
||||||
DEBUG=0
|
AVX=0
|
||||||
OPENMP=0
|
OPENMP=0
|
||||||
LIBSO=0
|
LIBSO=0
|
||||||
|
|
||||||
|
# set GPU=1 and CUDNN=1 to speedup on GPU
|
||||||
|
# set CUDNN_HALF=1 to further speedup 3 x times (Mixed-precision using Tensor Cores) on GPU Tesla V100, Titan V, DGX-2
|
||||||
|
# set AVX=1 and OPENMP=1 to speedup on CPU (if error occurs then set AVX=0)
|
||||||
|
|
||||||
|
DEBUG=0
|
||||||
|
|
||||||
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 \
|
||||||
-gencode arch=compute_50,code=[sm_50,compute_50] \
|
-gencode arch=compute_50,code=[sm_50,compute_50] \
|
||||||
@ -50,8 +56,10 @@ CFLAGS=-Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas
|
|||||||
ifeq ($(DEBUG), 1)
|
ifeq ($(DEBUG), 1)
|
||||||
OPTS= -O0 -g
|
OPTS= -O0 -g
|
||||||
else
|
else
|
||||||
|
ifeq ($(AVX), 1)
|
||||||
CFLAGS+= -ffp-contract=fast -mavx
|
CFLAGS+= -ffp-contract=fast -mavx
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
CFLAGS+=$(OPTS)
|
CFLAGS+=$(OPTS)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user