From bc1aa41af7d0ba46da4d7c71fc9109baea651ce0 Mon Sep 17 00:00:00 2001 From: Jonathan L Long Date: Wed, 4 Nov 2015 20:48:43 -0800 Subject: [PATCH] remove dead cpp code for number of CUDA threads __CUDA_ARCH__ is not defined in host code; the #if was vacuous and misleading. --- include/caffe/util/device_alternate.hpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/include/caffe/util/device_alternate.hpp b/include/caffe/util/device_alternate.hpp index 6ea595d..e3fe4fe 100644 --- a/include/caffe/util/device_alternate.hpp +++ b/include/caffe/util/device_alternate.hpp @@ -81,14 +81,8 @@ namespace caffe { const char* cublasGetErrorString(cublasStatus_t error); const char* curandGetErrorString(curandStatus_t error); -// CUDA: thread number configuration. -// Use 1024 threads per block, which requires cuda sm_2x or above, -// or fall back to attempt compatibility (best of luck to you). -#if __CUDA_ARCH__ >= 200 - const int CAFFE_CUDA_NUM_THREADS = 1024; -#else - const int CAFFE_CUDA_NUM_THREADS = 512; -#endif +// CUDA: use 512 threads per block +const int CAFFE_CUDA_NUM_THREADS = 512; // CUDA: number of blocks for threads. inline int CAFFE_GET_BLOCKS(const int N) { -- 2.7.4