Problems installing with CUDNN

2,630 views
Skip to first unread message

Ihor Menshykov

unread,
May 5, 2016, 9:32:36 AM5/5/16
to Caffe Users
Getting this when trying to compile on Ubuntu 14.04 with CUDNN on.



................................................................................
CXX/LD -o .build_release/examples/cifar10/convert_cifar_data.bin
CXX/LD -o .build_release/examples/cpp_classification/classification.bin
.build_release/lib/libcaffe.so: undefined reference to `cudnnConvolutionBackwardFilter_v3'
.build_release/lib/libcaffe.so: undefined reference to `cudnnConvolutionBackwardData_v3'
collect2: error: ld returned 1 exit status
make: *** [.build_release/tools/upgrade_net_proto_text.bin] Error 1
make: *** Waiting for unfinished jobs....
.build_release/lib/libcaffe.so: undefined reference to `cudnnConvolutionBackwardFilter_v3'
.build_release/lib/libcaffe.so: undefined reference to `cudnnConvolutionBackwardData_v3'
collect2: error: ld returned 1 exit status
make: *** [.build_release/tools/upgrade_solver_proto_text.bin] Error 1
.build_release/lib/libcaffe.so: undefined reference to `cudnnConvolutionBackwardFilter_v3'
.build_release/lib/libcaffe.so: undefined reference to `cudnnConvolutionBackwardData_v3'
collect2: error: ld returned 1 exit status
make: *** [.build_release/tools/caffe.bin] Error 1
.build_release/lib/libcaffe.so: undefined reference to `cudnnConvolutionBackwardFilter_v3'
.build_release/lib/libcaffe.so: undefined reference to `cudnnConvolutionBackwardData_v3'
collect2: error: ld returned 1 exit status
make: *** [.build_release/tools/extract_features.bin] Error 1
.build_release/lib/libcaffe.so: undefined reference to `cudnnConvolutionBackwardFilter_v3'
.build_release/lib/libcaffe.so: undefined reference to `cudnnConvolutionBackwardData_v3'
collect2: error: ld returned 1 exit status
make: *** [.build_release/tools/upgrade_net_proto_binary.bin] Error 1
.build_release/lib/libcaffe.so: undefined reference to `cudnnConvolutionBackwardFilter_v3'
.build_release/lib/libcaffe.so: undefined reference to `cudnnConvolutionBackwardData_v3'
collect2: error: ld returned 1 exit status
make: *** [.build_release/examples/cifar10/convert_cifar_data.bin] Error 1

Meanwhile cuda 7.5 and cudnn v4 (also tried v5 and v3 with same results) is installed correctly
$ echo $LD_LIBRARY_PATH
/home/sharpy/torch/install/lib:/usr/local/cuda-7.5/lib64:/usr/local/cuda/:/home/sharpy/torch/install/lib:/usr/local/cuda-7.5/lib64:/usr/local/cuda/:


Makefile is added to this message.

Compiles successfully without CuDNN, but chokes with
.build_release/lib/libcaffe.so: undefined reference to `cudnnConvolutionBackwardFilter_v3'
.build_release/lib/libcaffe.so: undefined reference to `cudnnConvolutionBackwardData_v3'
when using CuDNN.
Makefile.config
Message has been deleted
Message has been deleted

Ihor Menshykov

unread,
May 5, 2016, 9:36:34 AM5/5/16
to Caffe Users
PS, using Anaconda Python 2.7. 
USE_OPENCV := 0
USE_LEVELDB := 0
USE_LMDB := 0
-- I tried with and without those - same result.

Lee Yoongu

unread,
May 5, 2016, 12:02:14 PM5/5/16
to Caffe Users
I got the error before. I just remove the current cudnn and reinstall cudnn R1. I hope it run for you

Vào 22:32:36 UTC+9 Thứ Năm, ngày 05 tháng 5 năm 2016, Ihor Menshykov đã viết:

Ihor Menshykov

unread,
May 5, 2016, 5:42:48 PM5/5/16
to Caffe Users
You mean CuDNN v1? It's way outdated, should be pretty slow, I think.

Lee Yoongu

unread,
May 5, 2016, 9:34:30 PM5/5/16
to Caffe Users
Yes, But your caffe version may be used that version. Just check it 

Vào 06:42:48 UTC+9 Thứ Sáu, ngày 06 tháng 5 năm 2016, Ihor Menshykov đã viết:

Ihor Menshykov

unread,
May 6, 2016, 7:12:41 AM5/6/16
to Caffe Users
That's for v1

....     ^
./include/caffe/util/cudnn.hpp: In function ‘void caffe::cudnn::setConvolutionDesc(cudnnConvolutionStruct**, int, cudnnFilterDescriptor_t, int, int, int, int)’:
./include/caffe/util/cudnn.hpp:108:70: error: there are no arguments to ‘cudnnSetConvolution2dDescriptor’ that depend on a template parameter, so a declaration of ‘cudnnSetConvolution2dDescriptor’ must be available [-fpermissive]
       pad_h, pad_w, stride_h, stride_w, 1, 1, CUDNN_CROSS_CORRELATION));
                                                                      ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
./include/caffe/util/cudnn.hpp:108:70: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
       pad_h, pad_w, stride_h, stride_w, 1, 1, CUDNN_CROSS_CORRELATION));
                                                                      ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
./include/caffe/util/cudnn.hpp: In function ‘void caffe::cudnn::createPoolingDesc(cudnnPoolingStruct**, caffe::PoolingParameter_PoolMethod, cudnnPoolingMode_t*, int, int, int, int, int, int)’:
./include/caffe/util/cudnn.hpp:120:13: error: ‘CUDNN_POOLING_AVERAGE_COUNT_INCLUDE_PADDING’ was not declared in this scope
     *mode = CUDNN_POOLING_AVERAGE_COUNT_INCLUDE_PADDING;
             ^
./include/caffe/util/cudnn.hpp:127:41: error: there are no arguments to ‘cudnnSetPooling2dDescriptor’ that depend on a template parameter, so a declaration of ‘cudnnSetPooling2dDescriptor’ must be available [-fpermissive]
         pad_h, pad_w, stride_h, stride_w));
                                         ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
make: *** [.build_release/src/caffe/common.o] Error 1
In file included from ./include/caffe/util/device_alternate.hpp:40:0,
                 from ./include/caffe/common.hpp:19,
                 from ./include/caffe/internal_thread.hpp:4,
                 from src/caffe/internal_thread.cpp:4:
./include/caffe/util/cudnn.hpp:67:32: error: variable or field ‘createTensor4dDesc’ declared void
 inline void createTensor4dDesc(cudnnTensorDescriptor_t* desc) {
                                ^
./include/caffe/util/cudnn.hpp:67:32: error: ‘cudnnTensorDescriptor_t’ was not declared in this scope
./include/caffe/util/cudnn.hpp:67:57: error: ‘desc’ was not declared in this scope
 inline void createTensor4dDesc(cudnnTensorDescriptor_t* desc) {
                                                         ^
./include/caffe/util/cudnn.hpp:72:29: error: variable or field ‘setTensor4dDesc’ declared void
 inline void setTensor4dDesc(cudnnTensorDescriptor_t* desc,
                             ^
./include/caffe/util/cudnn.hpp:72:29: error: ‘cudnnTensorDescriptor_t’ was not declared in this scope
./include/caffe/util/cudnn.hpp:72:54: error: ‘desc’ was not declared in this scope
 inline void setTensor4dDesc(cudnnTensorDescriptor_t* desc,
                                                      ^
./include/caffe/util/cudnn.hpp:73:5: error: expected primary-expression before ‘int’
     int n, int c, int h, int w,
     ^
./include/caffe/util/cudnn.hpp:73:12: error: expected primary-expression before ‘int’
     int n, int c, int h, int w,
            ^
./include/caffe/util/cudnn.hpp:73:19: error: expected primary-expression before ‘int’
     int n, int c, int h, int w,
                   ^
./include/caffe/util/cudnn.hpp:73:26: error: expected primary-expression before ‘int’
     int n, int c, int h, int w,
                          ^
./include/caffe/util/cudnn.hpp:74:5: error: expected primary-expression before ‘int’
     int stride_n, int stride_c, int stride_h, int stride_w) {
     ^
./include/caffe/util/cudnn.hpp:74:19: error: expected primary-expression before ‘int’
     int stride_n, int stride_c, int stride_h, int stride_w) {
                   ^
./include/caffe/util/cudnn.hpp:74:33: error: expected primary-expression before ‘int’
     int stride_n, int stride_c, int stride_h, int stride_w) {
                                 ^
./include/caffe/util/cudnn.hpp:74:47: error: expected primary-expression before ‘int’
     int stride_n, int stride_c, int stride_h, int stride_w) {
                                               ^
./include/caffe/util/cudnn.hpp:80:29: error: variable or field ‘setTensor4dDesc’ declared void
 inline void setTensor4dDesc(cudnnTensorDescriptor_t* desc,
                             ^
./include/caffe/util/cudnn.hpp:80:29: error: ‘cudnnTensorDescriptor_t’ was not declared in this scope
./include/caffe/util/cudnn.hpp:80:54: error: ‘desc’ was not declared in this scope
 inline void setTensor4dDesc(cudnnTensorDescriptor_t* desc,
                                                      ^
./include/caffe/util/cudnn.hpp:81:5: error: expected primary-expression before ‘int’
     int n, int c, int h, int w) {
     ^
./include/caffe/util/cudnn.hpp:81:12: error: expected primary-expression before ‘int’
     int n, int c, int h, int w) {
            ^
./include/caffe/util/cudnn.hpp:81:19: error: expected primary-expression before ‘int’
     int n, int c, int h, int w) {
                   ^
./include/caffe/util/cudnn.hpp:81:26: error: expected primary-expression before ‘int’
     int n, int c, int h, int w) {
                          ^
./include/caffe/util/cudnn.hpp:105:5: error: ‘cudnnTensorDescriptor_t’ has not been declared
     cudnnTensorDescriptor_t bottom, cudnnFilterDescriptor_t filter,
     ^
./include/caffe/util/cudnn.hpp: In function ‘void caffe::cudnn::setConvolutionDesc(cudnnConvolutionStruct**, int, cudnnFilterDescriptor_t, int, int, int, int)’:
./include/caffe/util/cudnn.hpp:108:70: error: there are no arguments to ‘cudnnSetConvolution2dDescriptor’ that depend on a template parameter, so a declaration of ‘cudnnSetConvolution2dDescriptor’ must be available [-fpermissive]
       pad_h, pad_w, stride_h, stride_w, 1, 1, CUDNN_CROSS_CORRELATION));
                                                                      ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
./include/caffe/util/cudnn.hpp:108:70: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
       pad_h, pad_w, stride_h, stride_w, 1, 1, CUDNN_CROSS_CORRELATION));
                                                                      ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
./include/caffe/util/cudnn.hpp: In function ‘void caffe::cudnn::createPoolingDesc(cudnnPoolingStruct**, caffe::PoolingParameter_PoolMethod, cudnnPoolingMode_t*, int, int, int, int, int, int)’:
./include/caffe/util/cudnn.hpp:120:13: error: ‘CUDNN_POOLING_AVERAGE_COUNT_INCLUDE_PADDING’ was not declared in this scope
     *mode = CUDNN_POOLING_AVERAGE_COUNT_INCLUDE_PADDING;
             ^
./include/caffe/util/cudnn.hpp:127:41: error: there are no arguments to ‘cudnnSetPooling2dDescriptor’ that depend on a template parameter, so a declaration of ‘cudnnSetPooling2dDescriptor’ must be available [-fpermissive]
         pad_h, pad_w, stride_h, stride_w));
                                         ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
make: *** [.build_release/src/caffe/internal_thread.o] Error 1
In file included from ./include/caffe/util/device_alternate.hpp:40:0,
                 from ./include/caffe/common.hpp:19,
                 from src/caffe/data_reader.cpp:6:
./include/caffe/util/cudnn.hpp:67:32: error: variable or field ‘createTensor4dDesc’ declared void
 inline void createTensor4dDesc(cudnnTensorDescriptor_t* desc) {
                                ^
./include/caffe/util/cudnn.hpp:67:32: error: ‘cudnnTensorDescriptor_t’ was not declared in this scope
./include/caffe/util/cudnn.hpp:67:57: error: ‘desc’ was not declared in this scope
 inline void createTensor4dDesc(cudnnTensorDescriptor_t* desc) {
                                                         ^
./include/caffe/util/cudnn.hpp:72:29: error: variable or field ‘setTensor4dDesc’ declared void
 inline void setTensor4dDesc(cudnnTensorDescriptor_t* desc,
                             ^
./include/caffe/util/cudnn.hpp:72:29: error: ‘cudnnTensorDescriptor_t’ was not declared in this scope
./include/caffe/util/cudnn.hpp:72:54: error: ‘desc’ was not declared in this scope
 inline void setTensor4dDesc(cudnnTensorDescriptor_t* desc,
                                                      ^
./include/caffe/util/cudnn.hpp:73:5: error: expected primary-expression before ‘int’
     int n, int c, int h, int w,
     ^
./include/caffe/util/cudnn.hpp:73:12: error: expected primary-expression before ‘int’
     int n, int c, int h, int w,
            ^
./include/caffe/util/cudnn.hpp:73:19: error: expected primary-expression before ‘int’
     int n, int c, int h, int w,
                   ^
./include/caffe/util/cudnn.hpp:73:26: error: expected primary-expression before ‘int’
     int n, int c, int h, int w,
                          ^
./include/caffe/util/cudnn.hpp:74:5: error: expected primary-expression before ‘int’
     int stride_n, int stride_c, int stride_h, int stride_w) {
     ^
./include/caffe/util/cudnn.hpp:74:19: error: expected primary-expression before ‘int’
     int stride_n, int stride_c, int stride_h, int stride_w) {
                   ^
./include/caffe/util/cudnn.hpp:74:33: error: expected primary-expression before ‘int’
     int stride_n, int stride_c, int stride_h, int stride_w) {
                                 ^
./include/caffe/util/cudnn.hpp:74:47: error: expected primary-expression before ‘int’
     int stride_n, int stride_c, int stride_h, int stride_w) {
                                               ^
./include/caffe/util/cudnn.hpp:80:29: error: variable or field ‘setTensor4dDesc’ declared void
 inline void setTensor4dDesc(cudnnTensorDescriptor_t* desc,
                             ^
./include/caffe/util/cudnn.hpp:80:29: error: ‘cudnnTensorDescriptor_t’ was not declared in this scope
./include/caffe/util/cudnn.hpp:80:54: error: ‘desc’ was not declared in this scope
 inline void setTensor4dDesc(cudnnTensorDescriptor_t* desc,
                                                      ^
./include/caffe/util/cudnn.hpp:81:5: error: expected primary-expression before ‘int’
     int n, int c, int h, int w) {
     ^
./include/caffe/util/cudnn.hpp:81:12: error: expected primary-expression before ‘int’
     int n, int c, int h, int w) {
            ^
./include/caffe/util/cudnn.hpp:81:19: error: expected primary-expression before ‘int’
     int n, int c, int h, int w) {
                   ^
./include/caffe/util/cudnn.hpp:81:26: error: expected primary-expression before ‘int’
     int n, int c, int h, int w) {
                          ^
./include/caffe/util/cudnn.hpp:105:5: error: ‘cudnnTensorDescriptor_t’ has not been declared
     cudnnTensorDescriptor_t bottom, cudnnFilterDescriptor_t filter,
     ^
./include/caffe/util/cudnn.hpp: In function ‘void caffe::cudnn::setConvolutionDesc(cudnnConvolutionStruct**, int, cudnnFilterDescriptor_t, int, int, int, int)’:
./include/caffe/util/cudnn.hpp:108:70: error: there are no arguments to ‘cudnnSetConvolution2dDescriptor’ that depend on a template parameter, so a declaration of ‘cudnnSetConvolution2dDescriptor’ must be available [-fpermissive]
       pad_h, pad_w, stride_h, stride_w, 1, 1, CUDNN_CROSS_CORRELATION));
                                                                      ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
./include/caffe/util/cudnn.hpp:108:70: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
       pad_h, pad_w, stride_h, stride_w, 1, 1, CUDNN_CROSS_CORRELATION));
                                                                      ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
./include/caffe/util/cudnn.hpp: In function ‘void caffe::cudnn::createPoolingDesc(cudnnPoolingStruct**, caffe::PoolingParameter_PoolMethod, cudnnPoolingMode_t*, int, int, int, int, int, int)’:
./include/caffe/util/cudnn.hpp:120:13: error: ‘CUDNN_POOLING_AVERAGE_COUNT_INCLUDE_PADDING’ was not declared in this scope
     *mode = CUDNN_POOLING_AVERAGE_COUNT_INCLUDE_PADDING;
             ^
./include/caffe/util/cudnn.hpp:127:41: error: there are no arguments to ‘cudnnSetPooling2dDescriptor’ that depend on a template parameter, so a declaration of ‘cudnnSetPooling2dDescriptor’ must be available [-fpermissive]
         pad_h, pad_w, stride_h, stride_w));
                                         ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
make: *** [.build_release/src/caffe/data_reader.o] Error 1
In file included from ./include/caffe/util/device_alternate.hpp:40:0,
                 from ./include/caffe/common.hpp:19,
                 from ./include/caffe/blob.hpp:8,
                 from ./include/caffe/layer.hpp:8,
                 from src/caffe/layer.cpp:2:
./include/caffe/util/cudnn.hpp:67:32: error: variable or field ‘createTensor4dDesc’ declared void
 inline void createTensor4dDesc(cudnnTensorDescriptor_t* desc) {
                                ^
./include/caffe/util/cudnn.hpp:67:32: error: ‘cudnnTensorDescriptor_t’ was not declared in this scope
./include/caffe/util/cudnn.hpp:67:57: error: ‘desc’ was not declared in this scope
 inline void createTensor4dDesc(cudnnTensorDescriptor_t* desc) {
                                                         ^
./include/caffe/util/cudnn.hpp:72:29: error: variable or field ‘setTensor4dDesc’ declared void
 inline void setTensor4dDesc(cudnnTensorDescriptor_t* desc,
                             ^
./include/caffe/util/cudnn.hpp:72:29: error: ‘cudnnTensorDescriptor_t’ was not declared in this scope
./include/caffe/util/cudnn.hpp:72:54: error: ‘desc’ was not declared in this scope
 inline void setTensor4dDesc(cudnnTensorDescriptor_t* desc,
                                                      ^
./include/caffe/util/cudnn.hpp:73:5: error: expected primary-expression before ‘int’
     int n, int c, int h, int w,
     ^
./include/caffe/util/cudnn.hpp:73:12: error: expected primary-expression before ‘int’
     int n, int c, int h, int w,
            ^
./include/caffe/util/cudnn.hpp:73:19: error: expected primary-expression before ‘int’
     int n, int c, int h, int w,
                   ^
./include/caffe/util/cudnn.hpp:73:26: error: expected primary-expression before ‘int’
     int n, int c, int h, int w,
                          ^
./include/caffe/util/cudnn.hpp:74:5: error: expected primary-expression before ‘int’
     int stride_n, int stride_c, int stride_h, int stride_w) {
     ^
./include/caffe/util/cudnn.hpp:74:19: error: expected primary-expression before ‘int’
     int stride_n, int stride_c, int stride_h, int stride_w) {
                   ^
./include/caffe/util/cudnn.hpp:74:33: error: expected primary-expression before ‘int’
     int stride_n, int stride_c, int stride_h, int stride_w) {
                                 ^
./include/caffe/util/cudnn.hpp:74:47: error: expected primary-expression before ‘int’
     int stride_n, int stride_c, int stride_h, int stride_w) {
                                               ^
./include/caffe/util/cudnn.hpp:80:29: error: variable or field ‘setTensor4dDesc’ declared void
 inline void setTensor4dDesc(cudnnTensorDescriptor_t* desc,
                             ^
./include/caffe/util/cudnn.hpp:80:29: error: ‘cudnnTensorDescriptor_t’ was not declared in this scope
./include/caffe/util/cudnn.hpp:80:54: error: ‘desc’ was not declared in this scope
 inline void setTensor4dDesc(cudnnTensorDescriptor_t* desc,
                                                      ^
./include/caffe/util/cudnn.hpp:81:5: error: expected primary-expression before ‘int’
     int n, int c, int h, int w) {
     ^
./include/caffe/util/cudnn.hpp:81:12: error: expected primary-expression before ‘int’
     int n, int c, int h, int w) {
            ^
./include/caffe/util/cudnn.hpp:81:19: error: expected primary-expression before ‘int’
     int n, int c, int h, int w) {
                   ^
./include/caffe/util/cudnn.hpp:81:26: error: expected primary-expression before ‘int’
     int n, int c, int h, int w) {
                          ^
./include/caffe/util/cudnn.hpp:105:5: error: ‘cudnnTensorDescriptor_t’ has not been declared
     cudnnTensorDescriptor_t bottom, cudnnFilterDescriptor_t filter,
     ^
./include/caffe/util/cudnn.hpp: In function ‘void caffe::cudnn::setConvolutionDesc(cudnnConvolutionStruct**, int, cudnnFilterDescriptor_t, int, int, int, int)’:
./include/caffe/util/cudnn.hpp:108:70: error: there are no arguments to ‘cudnnSetConvolution2dDescriptor’ that depend on a template parameter, so a declaration of ‘cudnnSetConvolution2dDescriptor’ must be available [-fpermissive]
       pad_h, pad_w, stride_h, stride_w, 1, 1, CUDNN_CROSS_CORRELATION));
                                                                      ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
./include/caffe/util/cudnn.hpp:108:70: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
       pad_h, pad_w, stride_h, stride_w, 1, 1, CUDNN_CROSS_CORRELATION));
                                                                      ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
./include/caffe/util/cudnn.hpp: In function ‘void caffe::cudnn::createPoolingDesc(cudnnPoolingStruct**, caffe::PoolingParameter_PoolMethod, cudnnPoolingMode_t*, int, int, int, int, int, int)’:
./include/caffe/util/cudnn.hpp:120:13: error: ‘CUDNN_POOLING_AVERAGE_COUNT_INCLUDE_PADDING’ was not declared in this scope
     *mode = CUDNN_POOLING_AVERAGE_COUNT_INCLUDE_PADDING;
             ^
./include/caffe/util/cudnn.hpp:127:41: error: there are no arguments to ‘cudnnSetPooling2dDescriptor’ that depend on a template parameter, so a declaration of ‘cudnnSetPooling2dDescriptor’ must be available [-fpermissive]
         pad_h, pad_w, stride_h, stride_w));
                                         ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
make: *** [.build_release/src/caffe/layer.o] Error 1
In file included from ./include/caffe/util/device_alternate.hpp:40:0,
                 from ./include/caffe/common.hpp:19,
                 from ./include/caffe/blob.hpp:8,
                 from ./include/caffe/caffe.hpp:7,
                 from src/caffe/parallel.cpp:12:
./include/caffe/util/cudnn.hpp:67:32: error: variable or field ‘createTensor4dDesc’ declared void
 inline void createTensor4dDesc(cudnnTensorDescriptor_t* desc) {
                                ^
./include/caffe/util/cudnn.hpp:67:32: error: ‘cudnnTensorDescriptor_t’ was not declared in this scope
./include/caffe/util/cudnn.hpp:67:57: error: ‘desc’ was not declared in this scope
 inline void createTensor4dDesc(cudnnTensorDescriptor_t* desc) {
                                                         ^
./include/caffe/util/cudnn.hpp:72:29: error: variable or field ‘setTensor4dDesc’ declared void
 inline void setTensor4dDesc(cudnnTensorDescriptor_t* desc,
                             ^
./include/caffe/util/cudnn.hpp:72:29: error: ‘cudnnTensorDescriptor_t’ was not declared in this scope
./include/caffe/util/cudnn.hpp:72:54: error: ‘desc’ was not declared in this scope
 inline void setTensor4dDesc(cudnnTensorDescriptor_t* desc,
                                                      ^
./include/caffe/util/cudnn.hpp:73:5: error: expected primary-expression before ‘int’
     int n, int c, int h, int w,
     ^
./include/caffe/util/cudnn.hpp:73:12: error: expected primary-expression before ‘int’
     int n, int c, int h, int w,
            ^
./include/caffe/util/cudnn.hpp:73:19: error: expected primary-expression before ‘int’
     int n, int c, int h, int w,
                   ^
./include/caffe/util/cudnn.hpp:73:26: error: expected primary-expression before ‘int’
     int n, int c, int h, int w,
                          ^
./include/caffe/util/cudnn.hpp:74:5: error: expected primary-expression before ‘int’
     int stride_n, int stride_c, int stride_h, int stride_w) {
     ^
./include/caffe/util/cudnn.hpp:74:19: error: expected primary-expression before ‘int’
     int stride_n, int stride_c, int stride_h, int stride_w) {
                   ^
./include/caffe/util/cudnn.hpp:74:33: error: expected primary-expression before ‘int’
     int stride_n, int stride_c, int stride_h, int stride_w) {
                                 ^
./include/caffe/util/cudnn.hpp:74:47: error: expected primary-expression before ‘int’
     int stride_n, int stride_c, int stride_h, int stride_w) {
                                               ^
./include/caffe/util/cudnn.hpp:80:29: error: variable or field ‘setTensor4dDesc’ declared void
 inline void setTensor4dDesc(cudnnTensorDescriptor_t* desc,
                             ^
./include/caffe/util/cudnn.hpp:80:29: error: ‘cudnnTensorDescriptor_t’ was not declared in this scope
./include/caffe/util/cudnn.hpp:80:54: error: ‘desc’ was not declared in this scope
 inline void setTensor4dDesc(cudnnTensorDescriptor_t* desc,
                                                      ^
./include/caffe/util/cudnn.hpp:81:5: error: expected primary-expression before ‘int’
     int n, int c, int h, int w) {
     ^
./include/caffe/util/cudnn.hpp:81:12: error: expected primary-expression before ‘int’
     int n, int c, int h, int w) {
            ^
./include/caffe/util/cudnn.hpp:81:19: error: expected primary-expression before ‘int’
     int n, int c, int h, int w) {
                   ^
./include/caffe/util/cudnn.hpp:81:26: error: expected primary-expression before ‘int’
     int n, int c, int h, int w) {
                          ^
./include/caffe/util/cudnn.hpp:105:5: error: ‘cudnnTensorDescriptor_t’ has not been declared
     cudnnTensorDescriptor_t bottom, cudnnFilterDescriptor_t filter,
     ^
./include/caffe/util/cudnn.hpp: In function ‘void caffe::cudnn::setConvolutionDesc(cudnnConvolutionStruct**, int, cudnnFilterDescriptor_t, int, int, int, int)’:
./include/caffe/util/cudnn.hpp:108:70: error: there are no arguments to ‘cudnnSetConvolution2dDescriptor’ that depend on a template parameter, so a declaration of ‘cudnnSetConvolution2dDescriptor’ must be available [-fpermissive]
       pad_h, pad_w, stride_h, stride_w, 1, 1, CUDNN_CROSS_CORRELATION));
                                                                      ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
./include/caffe/util/cudnn.hpp:108:70: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
       pad_h, pad_w, stride_h, stride_w, 1, 1, CUDNN_CROSS_CORRELATION));
                                                                      ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
./include/caffe/util/cudnn.hpp: In function ‘void caffe::cudnn::createPoolingDesc(cudnnPoolingStruct**, caffe::PoolingParameter_PoolMethod, cudnnPoolingMode_t*, int, int, int, int, int, int)’:
./include/caffe/util/cudnn.hpp:120:13: error: ‘CUDNN_POOLING_AVERAGE_COUNT_INCLUDE_PADDING’ was not declared in this scope
     *mode = CUDNN_POOLING_AVERAGE_COUNT_INCLUDE_PADDING;
             ^
./include/caffe/util/cudnn.hpp:127:41: error: there are no arguments to ‘cudnnSetPooling2dDescriptor’ that depend on a template parameter, so a declaration of ‘cudnnSetPooling2dDescriptor’ must be available [-fpermissive]
         pad_h, pad_w, stride_h, stride_w));
                                         ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
make: *** [.build_release/src/caffe/parallel.o] Error 1




That's for v2


CXX src/caffe/layers/contrastive_loss_layer.cpp
In file included from src/caffe/layers/cudnn_conv_layer.cpp:5:0:
./include/caffe/layers/cudnn_conv_layer.hpp:52:3: error: ‘cudnnConvolutionBwdFilterAlgo_t’ does not name a type
   cudnnConvolutionBwdFilterAlgo_t *bwd_filter_algo_;
   ^
./include/caffe/layers/cudnn_conv_layer.hpp:53:3: error: ‘cudnnConvolutionBwdDataAlgo_t’ does not name a type
   cudnnConvolutionBwdDataAlgo_t *bwd_data_algo_;
   ^
src/caffe/layers/cudnn_conv_layer.cpp: In member function ‘virtual void caffe::CuDNNConvolutionLayer<Dtype>::LayerSetUp(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<caffe::Blob<Dtype>*>&)’:
src/caffe/layers/cudnn_conv_layer.cpp:27:3: error: ‘bwd_filter_algo_’ was not declared in this scope
   bwd_filter_algo_= new cudnnConvolutionBwdFilterAlgo_t[bottom.size()];
   ^
src/caffe/layers/cudnn_conv_layer.cpp:27:25: error: expected type-specifier before ‘cudnnConvolutionBwdFilterAlgo_t’
   bwd_filter_algo_= new cudnnConvolutionBwdFilterAlgo_t[bottom.size()];
                         ^
src/caffe/layers/cudnn_conv_layer.cpp:27:25: error: expected ‘;’ before ‘cudnnConvolutionBwdFilterAlgo_t’
src/caffe/layers/cudnn_conv_layer.cpp:28:3: error: ‘bwd_data_algo_’ was not declared in this scope
   bwd_data_algo_  = new cudnnConvolutionBwdDataAlgo_t[bottom.size()];
   ^
src/caffe/layers/cudnn_conv_layer.cpp:28:25: error: expected type-specifier before ‘cudnnConvolutionBwdDataAlgo_t’
   bwd_data_algo_  = new cudnnConvolutionBwdDataAlgo_t[bottom.size()];
                         ^
src/caffe/layers/cudnn_conv_layer.cpp:28:25: error: expected ‘;’ before ‘cudnnConvolutionBwdDataAlgo_t’
src/caffe/layers/cudnn_conv_layer.cpp:43:28: error: ‘cudnnConvolutionBwdFilterAlgo_t’ was not declared in this scope
     bwd_filter_algo_[i] = (cudnnConvolutionBwdFilterAlgo_t)0;
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:43:60: error: expected ‘;’ before numeric constant
     bwd_filter_algo_[i] = (cudnnConvolutionBwdFilterAlgo_t)0;
                                                            ^
src/caffe/layers/cudnn_conv_layer.cpp:44:26: error: ‘cudnnConvolutionBwdDataAlgo_t’ was not declared in this scope
     bwd_data_algo_[i] = (cudnnConvolutionBwdDataAlgo_t)0;
                          ^
src/caffe/layers/cudnn_conv_layer.cpp:44:56: error: expected ‘;’ before numeric constant
     bwd_data_algo_[i] = (cudnnConvolutionBwdDataAlgo_t)0;
                                                        ^
In file included from ./include/caffe/util/device_alternate.hpp:40:0,
                 from ./include/caffe/common.hpp:19,
                 from ./include/caffe/blob.hpp:8,
                 from ./include/caffe/layers/cudnn_conv_layer.hpp:6,
                 from src/caffe/layers/cudnn_conv_layer.cpp:5:
src/caffe/layers/cudnn_conv_layer.cpp: In member function ‘virtual void caffe::CuDNNConvolutionLayer<Dtype>::Reshape(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<caffe::Blob<Dtype>*>&)’:
src/caffe/layers/cudnn_conv_layer.cpp:151:11: error: ‘CUDNN_CONVOLUTION_BWD_FILTER_SPECIFY_WORKSPACE_LIMIT’ was not declared in this scope
           CUDNN_CONVOLUTION_BWD_FILTER_SPECIFY_WORKSPACE_LIMIT,
           ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:152:35: error: ‘bwd_filter_algo_’ was not declared in this scope
           workspace_limit_bytes, &bwd_filter_algo_[i]) );
                                   ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:152:54: error: there are no arguments to ‘cudnnGetConvolutionBackwardFilterAlgorithm’ that depend on a template parameter, so a declaration of ‘cudnnGetConvolutionBackwardFilterAlgorithm’ must be available [-fpermissive]
           workspace_limit_bytes, &bwd_filter_algo_[i]) );
                                                      ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:152:54: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
           workspace_limit_bytes, &bwd_filter_algo_[i]) );
                                                      ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:157:11: error: ‘bwd_filter_algo_’ was not declared in this scope
           bwd_filter_algo_[i], &workspace_bwd_filter_sizes_[i]));
           ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:157:63: error: there are no arguments to ‘cudnnGetConvolutionBackwardFilterWorkspaceSize’ that depend on a template parameter, so a declaration of ‘cudnnGetConvolutionBackwardFilterWorkspaceSize’ must be available [-fpermissive]
           bwd_filter_algo_[i], &workspace_bwd_filter_sizes_[i]));
                                                               ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:162:11: error: ‘CUDNN_CONVOLUTION_BWD_DATA_SPECIFY_WORKSPACE_LIMIT’ was not declared in this scope
           CUDNN_CONVOLUTION_BWD_DATA_SPECIFY_WORKSPACE_LIMIT,
           ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:163:33: error: ‘bwd_data_algo_’ was not declared in this scope
         workspace_limit_bytes, &bwd_data_algo_[i]));
                                 ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:163:50: error: there are no arguments to ‘cudnnGetConvolutionBackwardDataAlgorithm’ that depend on a template parameter, so a declaration of ‘cudnnGetConvolutionBackwardDataAlgorithm’ must be available [-fpermissive]
         workspace_limit_bytes, &bwd_data_algo_[i]));
                                                  ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:168:11: error: ‘bwd_data_algo_’ was not declared in this scope
           bwd_data_algo_[i], &workspace_bwd_data_sizes_[i]) );
           ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:168:59: error: there are no arguments to ‘cudnnGetConvolutionBackwardDataWorkspaceSize’ that depend on a template parameter, so a declaration of ‘cudnnGetConvolutionBackwardDataWorkspaceSize’ must be available [-fpermissive]
           bwd_data_algo_[i], &workspace_bwd_data_sizes_[i]) );
                                                           ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:208:9: error: ‘bwd_filter_algo_’ was not declared in this scope
         bwd_filter_algo_[i] = CUDNN_CONVOLUTION_BWD_FILTER_ALGO_0;
         ^
src/caffe/layers/cudnn_conv_layer.cpp:208:31: error: ‘CUDNN_CONVOLUTION_BWD_FILTER_ALGO_0’ was not declared in this scope
         bwd_filter_algo_[i] = CUDNN_CONVOLUTION_BWD_FILTER_ALGO_0;
                               ^
src/caffe/layers/cudnn_conv_layer.cpp:209:9: error: ‘bwd_data_algo_’ was not declared in this scope
         bwd_data_algo_[i] = CUDNN_CONVOLUTION_BWD_DATA_ALGO_0;
         ^
src/caffe/layers/cudnn_conv_layer.cpp:209:29: error: ‘CUDNN_CONVOLUTION_BWD_DATA_ALGO_0’ was not declared in this scope
         bwd_data_algo_[i] = CUDNN_CONVOLUTION_BWD_DATA_ALGO_0;
                             ^
src/caffe/layers/cudnn_conv_layer.cpp: In destructor ‘virtual caffe::CuDNNConvolutionLayer<Dtype>::~CuDNNConvolutionLayer()’:
src/caffe/layers/cudnn_conv_layer.cpp:258:13: error: ‘bwd_filter_algo_’ was not declared in this scope
   delete [] bwd_filter_algo_;
             ^
src/caffe/layers/cudnn_conv_layer.cpp:259:13: error: ‘bwd_data_algo_’ was not declared in this scope
   delete [] bwd_data_algo_;
             ^
In file included from ./include/caffe/util/device_alternate.hpp:40:0,
                 from ./include/caffe/common.hpp:19,
                 from ./include/caffe/blob.hpp:8,
                 from ./include/caffe/layers/cudnn_conv_layer.hpp:6,
                 from src/caffe/layers/cudnn_conv_layer.cpp:5:
src/caffe/layers/cudnn_conv_layer.cpp: In instantiation of ‘void caffe::CuDNNConvolutionLayer<Dtype>::Reshape(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = float]’:
src/caffe/layers/cudnn_conv_layer.cpp:265:1:   required from here
src/caffe/layers/cudnn_conv_layer.cpp:152:54: error: ‘cudnnGetConvolutionBackwardFilterAlgorithm’ was not declared in this scope
           workspace_limit_bytes, &bwd_filter_algo_[i]) );
                                                      ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:157:63: error: ‘cudnnGetConvolutionBackwardFilterWorkspaceSize’ was not declared in this scope
           bwd_filter_algo_[i], &workspace_bwd_filter_sizes_[i]));
                                                               ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:163:50: error: ‘cudnnGetConvolutionBackwardDataAlgorithm’ was not declared in this scope
         workspace_limit_bytes, &bwd_data_algo_[i]));
                                                  ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:168:59: error: ‘cudnnGetConvolutionBackwardDataWorkspaceSize’ was not declared in this scope
           bwd_data_algo_[i], &workspace_bwd_data_sizes_[i]) );
                                                           ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp: In instantiation of ‘void caffe::CuDNNConvolutionLayer<Dtype>::Reshape(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = double]’:
src/caffe/layers/cudnn_conv_layer.cpp:265:1:   required from here
src/caffe/layers/cudnn_conv_layer.cpp:152:54: error: ‘cudnnGetConvolutionBackwardFilterAlgorithm’ was not declared in this scope
           workspace_limit_bytes, &bwd_filter_algo_[i]) );
                                                      ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:157:63: error: ‘cudnnGetConvolutionBackwardFilterWorkspaceSize’ was not declared in this scope
           bwd_filter_algo_[i], &workspace_bwd_filter_sizes_[i]));
                                                               ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:163:50: error: ‘cudnnGetConvolutionBackwardDataAlgorithm’ was not declared in this scope
         workspace_limit_bytes, &bwd_data_algo_[i]));
                                                  ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:168:59: error: ‘cudnnGetConvolutionBackwardDataWorkspaceSize’ was not declared in this scope
           bwd_data_algo_[i], &workspace_bwd_data_sizes_[i]) );
                                                           ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
make: *** [.build_release/src/caffe/layers/cudnn_conv_layer.o] Error 1
make: *** Waiting for unfinished jobs....
sharpy@sharpy-System-Product-Name:~/caffe2/caffe$ make all
CXX .build_release/src/caffe/proto/caffe.pb.cc
CXX src/caffe/layers/cudnn_conv_layer.cpp
In file included from src/caffe/layers/cudnn_conv_layer.cpp:5:0:
./include/caffe/layers/cudnn_conv_layer.hpp:52:3: error: ‘cudnnConvolutionBwdFilterAlgo_t’ does not name a type
   cudnnConvolutionBwdFilterAlgo_t *bwd_filter_algo_;
   ^
./include/caffe/layers/cudnn_conv_layer.hpp:53:3: error: ‘cudnnConvolutionBwdDataAlgo_t’ does not name a type
   cudnnConvolutionBwdDataAlgo_t *bwd_data_algo_;
   ^
src/caffe/layers/cudnn_conv_layer.cpp: In member function ‘virtual void caffe::CuDNNConvolutionLayer<Dtype>::LayerSetUp(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<caffe::Blob<Dtype>*>&)’:
src/caffe/layers/cudnn_conv_layer.cpp:27:3: error: ‘bwd_filter_algo_’ was not declared in this scope
   bwd_filter_algo_= new cudnnConvolutionBwdFilterAlgo_t[bottom.size()];
   ^
src/caffe/layers/cudnn_conv_layer.cpp:27:25: error: expected type-specifier before ‘cudnnConvolutionBwdFilterAlgo_t’
   bwd_filter_algo_= new cudnnConvolutionBwdFilterAlgo_t[bottom.size()];
                         ^
src/caffe/layers/cudnn_conv_layer.cpp:27:25: error: expected ‘;’ before ‘cudnnConvolutionBwdFilterAlgo_t’
src/caffe/layers/cudnn_conv_layer.cpp:28:3: error: ‘bwd_data_algo_’ was not declared in this scope
   bwd_data_algo_  = new cudnnConvolutionBwdDataAlgo_t[bottom.size()];
   ^
src/caffe/layers/cudnn_conv_layer.cpp:28:25: error: expected type-specifier before ‘cudnnConvolutionBwdDataAlgo_t’
   bwd_data_algo_  = new cudnnConvolutionBwdDataAlgo_t[bottom.size()];
                         ^
src/caffe/layers/cudnn_conv_layer.cpp:28:25: error: expected ‘;’ before ‘cudnnConvolutionBwdDataAlgo_t’
src/caffe/layers/cudnn_conv_layer.cpp:43:28: error: ‘cudnnConvolutionBwdFilterAlgo_t’ was not declared in this scope
     bwd_filter_algo_[i] = (cudnnConvolutionBwdFilterAlgo_t)0;
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:43:60: error: expected ‘;’ before numeric constant
     bwd_filter_algo_[i] = (cudnnConvolutionBwdFilterAlgo_t)0;
                                                            ^
src/caffe/layers/cudnn_conv_layer.cpp:44:26: error: ‘cudnnConvolutionBwdDataAlgo_t’ was not declared in this scope
     bwd_data_algo_[i] = (cudnnConvolutionBwdDataAlgo_t)0;
                          ^
src/caffe/layers/cudnn_conv_layer.cpp:44:56: error: expected ‘;’ before numeric constant
     bwd_data_algo_[i] = (cudnnConvolutionBwdDataAlgo_t)0;
                                                        ^
In file included from ./include/caffe/util/device_alternate.hpp:40:0,
                 from ./include/caffe/common.hpp:19,
                 from ./include/caffe/blob.hpp:8,
                 from ./include/caffe/layers/cudnn_conv_layer.hpp:6,
                 from src/caffe/layers/cudnn_conv_layer.cpp:5:
src/caffe/layers/cudnn_conv_layer.cpp: In member function ‘virtual void caffe::CuDNNConvolutionLayer<Dtype>::Reshape(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<caffe::Blob<Dtype>*>&)’:
src/caffe/layers/cudnn_conv_layer.cpp:151:11: error: ‘CUDNN_CONVOLUTION_BWD_FILTER_SPECIFY_WORKSPACE_LIMIT’ was not declared in this scope
           CUDNN_CONVOLUTION_BWD_FILTER_SPECIFY_WORKSPACE_LIMIT,
           ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:152:35: error: ‘bwd_filter_algo_’ was not declared in this scope
           workspace_limit_bytes, &bwd_filter_algo_[i]) );
                                   ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:152:54: error: there are no arguments to ‘cudnnGetConvolutionBackwardFilterAlgorithm’ that depend on a template parameter, so a declaration of ‘cudnnGetConvolutionBackwardFilterAlgorithm’ must be available [-fpermissive]
           workspace_limit_bytes, &bwd_filter_algo_[i]) );
                                                      ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:152:54: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
           workspace_limit_bytes, &bwd_filter_algo_[i]) );
                                                      ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:157:11: error: ‘bwd_filter_algo_’ was not declared in this scope
           bwd_filter_algo_[i], &workspace_bwd_filter_sizes_[i]));
           ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:157:63: error: there are no arguments to ‘cudnnGetConvolutionBackwardFilterWorkspaceSize’ that depend on a template parameter, so a declaration of ‘cudnnGetConvolutionBackwardFilterWorkspaceSize’ must be available [-fpermissive]
           bwd_filter_algo_[i], &workspace_bwd_filter_sizes_[i]));
                                                               ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:162:11: error: ‘CUDNN_CONVOLUTION_BWD_DATA_SPECIFY_WORKSPACE_LIMIT’ was not declared in this scope
           CUDNN_CONVOLUTION_BWD_DATA_SPECIFY_WORKSPACE_LIMIT,
           ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:163:33: error: ‘bwd_data_algo_’ was not declared in this scope
         workspace_limit_bytes, &bwd_data_algo_[i]));
                                 ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:163:50: error: there are no arguments to ‘cudnnGetConvolutionBackwardDataAlgorithm’ that depend on a template parameter, so a declaration of ‘cudnnGetConvolutionBackwardDataAlgorithm’ must be available [-fpermissive]
         workspace_limit_bytes, &bwd_data_algo_[i]));
                                                  ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:168:11: error: ‘bwd_data_algo_’ was not declared in this scope
           bwd_data_algo_[i], &workspace_bwd_data_sizes_[i]) );
           ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:168:59: error: there are no arguments to ‘cudnnGetConvolutionBackwardDataWorkspaceSize’ that depend on a template parameter, so a declaration of ‘cudnnGetConvolutionBackwardDataWorkspaceSize’ must be available [-fpermissive]
           bwd_data_algo_[i], &workspace_bwd_data_sizes_[i]) );
                                                           ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:208:9: error: ‘bwd_filter_algo_’ was not declared in this scope
         bwd_filter_algo_[i] = CUDNN_CONVOLUTION_BWD_FILTER_ALGO_0;
         ^
src/caffe/layers/cudnn_conv_layer.cpp:208:31: error: ‘CUDNN_CONVOLUTION_BWD_FILTER_ALGO_0’ was not declared in this scope
         bwd_filter_algo_[i] = CUDNN_CONVOLUTION_BWD_FILTER_ALGO_0;
                               ^
src/caffe/layers/cudnn_conv_layer.cpp:209:9: error: ‘bwd_data_algo_’ was not declared in this scope
         bwd_data_algo_[i] = CUDNN_CONVOLUTION_BWD_DATA_ALGO_0;
         ^
src/caffe/layers/cudnn_conv_layer.cpp:209:29: error: ‘CUDNN_CONVOLUTION_BWD_DATA_ALGO_0’ was not declared in this scope
         bwd_data_algo_[i] = CUDNN_CONVOLUTION_BWD_DATA_ALGO_0;
                             ^
src/caffe/layers/cudnn_conv_layer.cpp: In destructor ‘virtual caffe::CuDNNConvolutionLayer<Dtype>::~CuDNNConvolutionLayer()’:
src/caffe/layers/cudnn_conv_layer.cpp:258:13: error: ‘bwd_filter_algo_’ was not declared in this scope
   delete [] bwd_filter_algo_;
             ^
src/caffe/layers/cudnn_conv_layer.cpp:259:13: error: ‘bwd_data_algo_’ was not declared in this scope
   delete [] bwd_data_algo_;
             ^
In file included from ./include/caffe/util/device_alternate.hpp:40:0,
                 from ./include/caffe/common.hpp:19,
                 from ./include/caffe/blob.hpp:8,
                 from ./include/caffe/layers/cudnn_conv_layer.hpp:6,
                 from src/caffe/layers/cudnn_conv_layer.cpp:5:
src/caffe/layers/cudnn_conv_layer.cpp: In instantiation of ‘void caffe::CuDNNConvolutionLayer<Dtype>::Reshape(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = float]’:
src/caffe/layers/cudnn_conv_layer.cpp:265:1:   required from here
src/caffe/layers/cudnn_conv_layer.cpp:152:54: error: ‘cudnnGetConvolutionBackwardFilterAlgorithm’ was not declared in this scope
           workspace_limit_bytes, &bwd_filter_algo_[i]) );
                                                      ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:157:63: error: ‘cudnnGetConvolutionBackwardFilterWorkspaceSize’ was not declared in this scope
           bwd_filter_algo_[i], &workspace_bwd_filter_sizes_[i]));
                                                               ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:163:50: error: ‘cudnnGetConvolutionBackwardDataAlgorithm’ was not declared in this scope
         workspace_limit_bytes, &bwd_data_algo_[i]));
                                                  ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:168:59: error: ‘cudnnGetConvolutionBackwardDataWorkspaceSize’ was not declared in this scope
           bwd_data_algo_[i], &workspace_bwd_data_sizes_[i]) );
                                                           ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp: In instantiation of ‘void caffe::CuDNNConvolutionLayer<Dtype>::Reshape(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = double]’:
src/caffe/layers/cudnn_conv_layer.cpp:265:1:   required from here
src/caffe/layers/cudnn_conv_layer.cpp:152:54: error: ‘cudnnGetConvolutionBackwardFilterAlgorithm’ was not declared in this scope
           workspace_limit_bytes, &bwd_filter_algo_[i]) );
                                                      ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:157:63: error: ‘cudnnGetConvolutionBackwardFilterWorkspaceSize’ was not declared in this scope
           bwd_filter_algo_[i], &workspace_bwd_filter_sizes_[i]));
                                                               ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:163:50: error: ‘cudnnGetConvolutionBackwardDataAlgorithm’ was not declared in this scope
         workspace_limit_bytes, &bwd_data_algo_[i]));
                                                  ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
src/caffe/layers/cudnn_conv_layer.cpp:168:59: error: ‘cudnnGetConvolutionBackwardDataWorkspaceSize’ was not declared in this scope
           bwd_data_algo_[i], &workspace_bwd_data_sizes_[i]) );
                                                           ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
make: *** [.build_release/src/caffe/layers/cudnn_conv_layer.o] Error 1



Ihor Menshykov

unread,
May 6, 2016, 7:38:41 AM5/6/16
to Caffe Users
Actually, I've managed to build successfully with v4. Seems like one just has to remove all the other versions one tried to install, or he'll get something like I had.

Jan

unread,
May 6, 2016, 8:44:38 AM5/6/16
to Caffe Users
Yes, current caffe only works with cuDNN v4. If additionally you have other cuDNN versions installed in paths that are somehow given to the compiler/linker in the building process, that might very well lead to problems. Try to avoid installing different versions of the same library, or install into clearly separated paths, such that is always clear which version of the library you are referring to. Of course, you'd need to adjust th Makefile.config accordingly then.

Jan

Ihor Menshykov

unread,
May 6, 2016, 9:12:25 AM5/6/16
to Caffe Users
Now I see that in http://caffe.berkeleyvision.org/installation.html they've noted v4. Didn't emphasise much and wrote "older versions are supported in older Caffe", nothing about newer versions, though.

xusong chen

unread,
May 7, 2016, 8:44:20 AM5/7/16
to Caffe Users
Do you fix this bug? I met same error when I compiled caffe with cudnn v4 and cuda7.5

在 2016年5月6日星期五 UTC+8下午9:12:25,Ihor Menshykov写道:

Ihor Menshykov

unread,
May 7, 2016, 9:09:04 AM5/7/16
to Caffe Users
Yes, as I said, I did fix that by deleting all the other cudnn installations. Meaning I had to remove libcudnn.so.5 and other files from my other tries. Although, I must say I'm not entirely sure if this was the only thing that fixed everything, as I may have changed some other things along the way.. =S But this was definitely the last thing I've changed before it started compiling. It had those other

"..
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
.."

errors right before the fix which were probably the result of me not deleting files from v1-v5 versions.

Just a good tip for you to save some time: 
when you make, use
make all -j12
using the max number of threads on your CPU depending on which you have (I have 6 cores, 2 threads each). Won't fix the issue, but it will spare a lot of compilation time.


субота, 7 травня 2016 р. 15:44:20 UTC+3 користувач xusong chen написав:
Reply all
Reply to author
Forward
0 new messages