Cudnn installation problems

I want to run caffe on my jeston Tk1 with cudnn, so I checked Jetsonhack’s vedio: NVIDIA Jetson TK1 - cuDNN Install and Caffe example - YouTube
However, there were some problems.

The first problem is that when I ran “tar -zxvf cudnn-6.5-linux-armv7-R1.tgz”,
It shows:
tar (child): cudnn-6.5-linux-armv7-R1.tgz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

So, I downloaded the file from this website:

Then I ran
cp cudnn.h /usr/local/cuda-6.5/include
cp libcudnn* /usr/local/cuda-6.5/lib

Everything looked fine here, so I opened the caffe file, and opened Makefile.config, uncommented line “USE_CUDNN :=1”
Then I typed “make clean” and “make -j 4 all”
and the other problem showed up.

Here is the result:


root@tegra-ubuntu:/home/ubuntu/caffe# make -j 4 all

CXX src/caffe/parallel.cpp
CXX src/caffe/blob.cpp
CXX src/caffe/data_reader.cpp
CXX src/caffe/syncedmem.cpp
In file included from ./include/caffe/util/device_alternate.hpp:40:0,
from ./include/caffe/common.hpp:19,
from src/caffe/syncedmem.cpp:1:
./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:110: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:113: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:113: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:125: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:136:9: error: ‘CUDNN_PROPAGATE_NAN’ was not declared in this scope
CUDNN_PROPAGATE_NAN, h, w, 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;
^
./include/caffe/util/cudnn.hpp:136:68: error: there are no arguments to ‘cudnnSetPooling2dDescriptor_v4’ that depend on a template parameter, so a declaration of ‘cudnnSetPooling2dDescriptor_v4’ must be available [-fpermissive]
CUDNN_PROPAGATE_NAN, h, w, 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;
^
./include/caffe/util/cudnn.hpp: At global scope:
./include/caffe/util/cudnn.hpp:141:40: error: variable or field ‘createActivationDescriptor’ declared void
inline void createActivationDescriptor(cudnnActivationDescriptor_t
activ_desc,
^
./include/caffe/util/cudnn.hpp:141:40: error: ‘cudnnActivationDescriptor_t’ was not declared in this scope
./include/caffe/util/cudnn.hpp:141:69: error: ‘activ_desc’ was not declared in this scope
inline void createActivationDescriptor(cudnnActivationDescriptor_t* activ_desc,
^
./include/caffe/util/cudnn.hpp:142:27: error: expected primary-expression before ‘mode’
cudnnActivationMode_t mode) {
^
make: *** [.build_release/src/caffe/syncedmem.o] Error 1
make: *** Waiting for unfinished jobs…
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 src/caffe/blob.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:110: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:113: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:113: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:125: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:136:9: error: ‘CUDNN_PROPAGATE_NAN’ was not declared in this scope
CUDNN_PROPAGATE_NAN, h, w, 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;
^
./include/caffe/util/cudnn.hpp:136:68: error: there are no arguments to ‘cudnnSetPooling2dDescriptor_v4’ that depend on a template parameter, so a declaration of ‘cudnnSetPooling2dDescriptor_v4’ must be available [-fpermissive]
CUDNN_PROPAGATE_NAN, h, w, 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;
^
./include/caffe/util/cudnn.hpp: At global scope:
./include/caffe/util/cudnn.hpp:141:40: error: variable or field ‘createActivationDescriptor’ declared void
inline void createActivationDescriptor(cudnnActivationDescriptor_t
activ_desc,
^
./include/caffe/util/cudnn.hpp:141:40: error: ‘cudnnActivationDescriptor_t’ was not declared in this scope
./include/caffe/util/cudnn.hpp:141:69: error: ‘activ_desc’ was not declared in this scope
inline void createActivationDescriptor(cudnnActivationDescriptor_t* activ_desc,
^
./include/caffe/util/cudnn.hpp:142:27: error: expected primary-expression before ‘mode’
cudnnActivationMode_t mode) {
^
make: *** [.build_release/src/caffe/blob.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:110: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:113:70: error: there are no arguments to ‘cudnnSetConvolution2dDescriptor’ that depend on a template parameter, so a declaration of ‘cudnnSetConvolution2dDescriptor’ must be available [-fpermissive]the other problem showed up:
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:113: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:125: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:136:9: error: ‘CUDNN_PROPAGATE_NAN’ was not declared in this scope
CUDNN_PROPAGATE_NAN, h, w, 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;
^
./include/caffe/util/cudnn.hpp:136:68: error: there are no arguments to ‘cudnnSetPooling2dDescriptor_v4’ that depend on a template parameter, so a declaration of ‘cudnnSetPooling2dDescriptor_v4’ must be available [-fpermissive]
CUDNN_PROPAGATE_NAN, h, w, 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;
^
./include/caffe/util/cudnn.hpp: At global scope:
./include/caffe/util/cudnn.hpp:141:40: error: variable or field ‘createActivationDescriptor’ declared void
inline void createActivationDescriptor(cudnnActivationDescriptor_t
activ_desc,
^
./include/caffe/util/cudnn.hpp:141:40: error: ‘cudnnActivationDescriptor_t’ was not declared in this scope
./include/caffe/util/cudnn.hpp:141:69: error: ‘activ_desc’ was not declared in this scope
inline void createActivationDescriptor(cudnnActivationDescriptor_t* activ_desc,
^
./include/caffe/util/cudnn.hpp:142:27: error: expected primary-expression before ‘mode’
cudnnActivationMode_t mode) {
^
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/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:110: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:113: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:113: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:125: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:136:9: error: ‘CUDNN_PROPAGATE_NAN’ was not declared in this scope
CUDNN_PROPAGATE_NAN, h, w, 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;
^
./include/caffe/util/cudnn.hpp:136:68: error: there are no arguments to ‘cudnnSetPooling2dDescriptor_v4’ that depend on a template parameter, so a declaration of ‘cudnnSetPooling2dDescriptor_v4’ must be available [-fpermissive]
CUDNN_PROPAGATE_NAN, h, w, 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;
^
./include/caffe/util/cudnn.hpp: At global scope:
./include/caffe/util/cudnn.hpp:141:40: error: variable or field ‘createActivationDescriptor’ declared void
inline void createActivationDescriptor(cudnnActivationDescriptor_t
activ_desc,
^
./include/caffe/util/cudnn.hpp:141:40: error: ‘cudnnActivationDescriptor_t’ was not declared in this scope
./include/caffe/util/cudnn.hpp:141:69: error: ‘activ_desc’ was not declared in this scope
inline void createActivationDescriptor(cudnnActivationDescriptor_t* activ_desc,
^
./include/caffe/util/cudnn.hpp:142:27: error: expected primary-expression before ‘mode’
cudnnActivationMode_t mode) {
^
make: *** [.build_release/src/caffe/parallel.o] Error 1


I am not sure if the problem is cause by the cuddn-6.5-linux-armv7-R1.tgz that I download from a Chinese website,
but I cannot download the file by using “tar -zxvf cudnn-6.5-linux-armv7-R1.tgz” as just mentioned.

I had searched a bunch of information but rare of them are helpful!
Please give me a hand, thank you.