首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Caffe cuDNN R1编译错误

Caffe cuDNN R1编译错误
EN

Stack Overflow用户
提问于 2015-05-08 23:24:09
回答 1查看 3.1K关注 0票数 0

我正在尝试在Ubuntu 14.04上启用cuDNN-6.5-R1来编译Caffe。CUDA版本为7.0。

我复制了/usr/local/cuda/include中的cudn.h头文件和/usr/local/cuda/lib64中的cudnn库,然后是"sudo ldconfig",当我执行"make all“时,我得到了以下错误:

代码语言:javascript
复制
PROTOC src/caffe/proto/caffe.proto
CXX .build_release/src/caffe/proto/caffe.pb.cc
CXX src/caffe/util/db.cpp
In file included from ./include/caffe/util/device_alternate.hpp:40:0,
             from ./include/caffe/common.hpp:19,
             from ./include/caffe/util/db.hpp:10,
             from src/caffe/util/db.cpp:1:
./include/caffe/util/cudnn.hpp:64:32: error: variable or field ‘createTensor4dDesc’ declared void
 inline void createTensor4dDesc(cudnnTensorDescriptor_t* desc) {
                            ^
./include/caffe/util/cudnn.hpp:64:32: error: ‘cudnnTensorDescriptor_t’ was not declared in this scope
./include/caffe/util/cudnn.hpp:64:57: error: ‘desc’ was not declared in this scope
 inline void createTensor4dDesc(cudnnTensorDescriptor_t* desc) {
                                                     ^
./include/caffe/util/cudnn.hpp:69:29: error: variable or field ‘setTensor4dDesc’ declared void
 inline void setTensor4dDesc(cudnnTensorDescriptor_t* desc,
                         ^
./include/caffe/util/cudnn.hpp:69:29: error: ‘cudnnTensorDescriptor_t’ was not declared in this scope
./include/caffe/util/cudnn.hpp:69:54: error: ‘desc’ was not declared in this scope
 inline void setTensor4dDesc(cudnnTensorDescriptor_t* desc,
                                                  ^
./include/caffe/util/cudnn.hpp:70:5: error: expected primary-expression before ‘int’
     int n, int c, int h, int w,
     ^
./include/caffe/util/cudnn.hpp:70:12: error: expected primary-expression before ‘int’
     int n, int c, int h, int w,
        ^
./include/caffe/util/cudnn.hpp:70:19: error: expected primary-expression before ‘int’
     int n, int c, int h, int w,
               ^
./include/caffe/util/cudnn.hpp:70:26: error: expected primary-expression before ‘int’
     int n, int c, int h, int w,
                      ^
./include/caffe/util/cudnn.hpp:71:5: error: expected primary-expression before ‘int’
     int stride_n, int stride_c, int stride_h, int stride_w) {
     ^
./include/caffe/util/cudnn.hpp:71:19: error: expected primary-expression before ‘int’
     int stride_n, int stride_c, int stride_h, int stride_w) {
               ^
./include/caffe/util/cudnn.hpp:71:33: error: expected primary-expression before ‘int’
     int stride_n, int stride_c, int stride_h, int stride_w) {
                             ^
./include/caffe/util/cudnn.hpp:71:47: error: expected primary-expression before ‘int’
     int stride_n, int stride_c, int stride_h, int stride_w) {
                                           ^
./include/caffe/util/cudnn.hpp:77:29: error: variable or field ‘setTensor4dDesc’ declared void
 inline void setTensor4dDesc(cudnnTensorDescriptor_t* desc,
                         ^
./include/caffe/util/cudnn.hpp:77:29: error: ‘cudnnTensorDescriptor_t’ was not declared in this scope
./include/caffe/util/cudnn.hpp:77:54: error: ‘desc’ was not declared in this scope
 inline void setTensor4dDesc(cudnnTensorDescriptor_t* desc,
                                                  ^
./include/caffe/util/cudnn.hpp:78:5: error: expected primary-expression before ‘int’
     int n, int c, int h, int w) {
     ^
./include/caffe/util/cudnn.hpp:78:12: error: expected primary-expression before ‘int’
     int n, int c, int h, int w) {
        ^
./include/caffe/util/cudnn.hpp:78:19: error: expected primary-expression before ‘int’
     int n, int c, int h, int w) {
               ^
./include/caffe/util/cudnn.hpp:78:26: error: expected primary-expression before ‘int’
     int n, int c, int h, int w) {
                      ^
./include/caffe/util/cudnn.hpp:102: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:105: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:12:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                        ^
./include/caffe/util/cudnn.hpp:105: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:12: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:117: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:124: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:12:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                        ^
src/caffe/util/db.cpp: In function ‘caffe::db::DB* caffe::db::GetDB(caffe::DataParameter::DB)’:
src/caffe/util/db.cpp:71:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
src/caffe/util/db.cpp: In function ‘caffe::db::DB* caffe::db::GetDB(const string&)’:
src/caffe/util/db.cpp:81:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
make: *** [.build_release/src/caffe/util/db.o] Error 1

我查看了其他和我有同样问题的人的帖子,但他们都在使用R2,而不是R1。

EN

回答 1

Stack Overflow用户

发布于 2015-05-09 20:27:33

有关如何安装CUDA、cuDNN和Caffe的详细说明,请查看"GPU Powered DeepLearning with NVIDIA DIGITS on EC2“。

为什么“他们都在使用R2”BTW的原因是b/c,这只是一个要求。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/30127415

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档