Skip to content

Commit bc1aa41

Browse files
committed
remove dead cpp code for number of CUDA threads
__CUDA_ARCH__ is not defined in host code; the #if was vacuous and misleading.
1 parent a53fe0f commit bc1aa41

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

include/caffe/util/device_alternate.hpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,8 @@ namespace caffe {
8181
const char* cublasGetErrorString(cublasStatus_t error);
8282
const char* curandGetErrorString(curandStatus_t error);
8383

84-
// CUDA: thread number configuration.
85-
// Use 1024 threads per block, which requires cuda sm_2x or above,
86-
// or fall back to attempt compatibility (best of luck to you).
87-
#if __CUDA_ARCH__ >= 200
88-
const int CAFFE_CUDA_NUM_THREADS = 1024;
89-
#else
90-
const int CAFFE_CUDA_NUM_THREADS = 512;
91-
#endif
84+
// CUDA: use 512 threads per block
85+
const int CAFFE_CUDA_NUM_THREADS = 512;
9286

9387
// CUDA: number of blocks for threads.
9488
inline int CAFFE_GET_BLOCKS(const int N) {

0 commit comments

Comments
 (0)