From f7e6bd4dfb8816bf29cce8dd81575e74c74ca3cf Mon Sep 17 00:00:00 2001 From: Yangqing Jia Date: Mon, 14 Oct 2013 10:47:59 -0700 Subject: [PATCH] require sm_2x and above --- src/Makefile | 2 +- src/caffe/common.hpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Makefile b/src/Makefile index bbbfd27..60aa139 100644 --- a/src/Makefile +++ b/src/Makefile @@ -31,7 +31,7 @@ TEST_BINS := ${TEST_OBJS:.o=.testbin} # define third-party library paths CUDA_DIR := /usr/local/cuda -CUDA_ARCH := -arch=sm_20 +CUDA_ARCH := -arch=sm_30 MKL_DIR := /opt/intel/mkl CUDA_INCLUDE_DIR := $(CUDA_DIR)/include diff --git a/src/caffe/common.hpp b/src/caffe/common.hpp index c28ad57..8eb7987 100644 --- a/src/caffe/common.hpp +++ b/src/caffe/common.hpp @@ -49,8 +49,8 @@ namespace caffe { using boost::shared_ptr; -// For backward compatibility we will just use 512 threads per block -const int CAFFE_CUDA_NUM_THREADS = 512; +// We will use 1024 threads per block, which requires cuda sm_2x or above. +const int CAFFE_CUDA_NUM_THREADS = 1024; inline int CAFFE_GET_BLOCKS(const int N) { -- 2.7.4