From 9bae70b22549b68f5cdeece8b6c3b3de00c22714 Mon Sep 17 00:00:00 2001 From: AlexeyAB <alexeyab84@gmail.com> Date: Mon, 16 Apr 2018 23:51:11 +0000 Subject: [PATCH] Accelerated by another 5% using FP16/32 Batch-norm for Tensor Cores. --- Makefile | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2c5fdb6..b6119ae 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ GPU=0 CUDNN=0 +CUDNN_HALF=0 OPENCV=0 DEBUG=0 OPENMP=0 @@ -44,10 +45,12 @@ OPTS=-Ofast LDFLAGS= -lm -pthread COMMON= -CFLAGS=-Wall -Wfatal-errors +CFLAGS=-Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas ifeq ($(DEBUG), 1) -OPTS=-O0 -g +OPTS= -O0 -g +else +CFLAGS+= -ffp-contract=fast -mavx endif CFLAGS+=$(OPTS) @@ -85,6 +88,12 @@ endif endif +ifeq ($(CUDNN_HALF), 1) +COMMON+= -DCUDNN_HALF +CFLAGS+= -DCUDNN_HALF +ARCH+= -gencode arch=compute_70,code=[sm_70,compute_70] +endif + OBJ=http_stream.o gemm.o utils.o cuda.o convolutional_layer.o list.o image.o activations.o im2col.o col2im.o blas.o crop_layer.o dropout_layer.o maxpool_layer.o softmax_layer.o data.o matrix.o network.o connected_layer.o cost_layer.o parser.o option_list.o darknet.o detection_layer.o captcha.o route_layer.o writing.o box.o nightmare.o normalization_layer.o avgpool_layer.o coco.o dice.o yolo.o detector.o layer.o compare.o classifier.o local_layer.o swag.o shortcut_layer.o activation_layer.o rnn_layer.o gru_layer.o rnn.o rnn_vid.o crnn_layer.o demo.o tag.o cifar.o go.o batchnorm_layer.o art.o region_layer.o reorg_layer.o reorg_old_layer.o super.o voxel.o tree.o yolo_layer.o upsample_layer.o ifeq ($(GPU), 1) LDFLAGS+= -lstdc++ -- Gitblit v1.10.0