Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with cudnn while compiling caffe #1

Open
YenchungChen opened this issue Feb 2, 2018 · 1 comment
Open

Error with cudnn while compiling caffe #1

YenchungChen opened this issue Feb 2, 2018 · 1 comment

Comments

@YenchungChen
Copy link

YenchungChen commented Feb 2, 2018

Hi ,

I'm super interested in your work.

I get an Error while compiling caffe:

CXX src/caffe/layer_factory.cpp
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_factory.cpp:8:
./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:124:41: error: too few arguments to function 'cudnnStatus_t cudnnSetPooling2dDescriptor(cudnnPoolingDescriptor_t, cudnnPoolingMode_t, cudnnNanPropagation_t, int, int, int, int, int, int)'
         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; \
                            ^
In file included from ./include/caffe/util/cudnn.hpp:5:0,
                 from ./include/caffe/util/device_alternate.hpp:40,
                 from ./include/caffe/common.hpp:19,
                 from ./include/caffe/blob.hpp:8,
                 from ./include/caffe/layer.hpp:8,
                 from src/caffe/layer_factory.cpp:8:
/usr/local/cuda-8.0/include/cudnn.h:803:27: note: declared here
 cudnnStatus_t CUDNNWINAPI cudnnSetPooling2dDescriptor(
                           ^
src/caffe/layer_factory.cpp: In function 'boost::shared_ptr<caffe::Layer<Dtype> > caffe::GetTanHLayer(const caffe::LayerParameter&) [with Dtype = double]':
src/caffe/layer_factory.cpp:196:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
src/caffe/layer_factory.cpp: In function 'boost::shared_ptr<caffe::Layer<Dtype> > caffe::GetTanHLayer(const caffe::LayerParameter&) [with Dtype = float]':
src/caffe/layer_factory.cpp:196:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
src/caffe/layer_factory.cpp: In function 'boost::shared_ptr<caffe::Layer<Dtype> > caffe::GetSoftmaxLayer(const caffe::LayerParameter&) [with Dtype = double]':
src/caffe/layer_factory.cpp:173:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
src/caffe/layer_factory.cpp: In function 'boost::shared_ptr<caffe::Layer<Dtype> > caffe::GetSoftmaxLayer(const caffe::LayerParameter&) [with Dtype = float]':
src/caffe/layer_factory.cpp:173:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
src/caffe/layer_factory.cpp: In function 'boost::shared_ptr<caffe::Layer<Dtype> > caffe::GetSigmoidLayer(const caffe::LayerParameter&) [with Dtype = double]':
src/caffe/layer_factory.cpp:150:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
src/caffe/layer_factory.cpp: In function 'boost::shared_ptr<caffe::Layer<Dtype> > caffe::GetSigmoidLayer(const caffe::LayerParameter&) [with Dtype = float]':
src/caffe/layer_factory.cpp:150:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
src/caffe/layer_factory.cpp: In function 'boost::shared_ptr<caffe::Layer<Dtype> > caffe::GetReLULayer(const caffe::LayerParameter&) [with Dtype = double]':

src/caffe/layer_factory.cpp:127:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
src/caffe/layer_factory.cpp: In function 'boost::shared_ptr<caffe::Layer<Dtype> > caffe::GetReLULayer(const caffe::LayerParameter&) [with Dtype = float]':
src/caffe/layer_factory.cpp:127:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
src/caffe/layer_factory.cpp: In function 'boost::shared_ptr<caffe::Layer<Dtype> > caffe::GetLRNLayer(const caffe::LayerParameter&) [with Dtype = double]':
src/caffe/layer_factory.cpp:104:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
src/caffe/layer_factory.cpp: In function 'boost::shared_ptr<caffe::Layer<Dtype> > caffe::GetLRNLayer(const caffe::LayerParameter&) [with Dtype = float]':
src/caffe/layer_factory.cpp:104:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
src/caffe/layer_factory.cpp: In function 'boost::shared_ptr<caffe::Layer<Dtype> > caffe::GetPoolingLayer(const caffe::LayerParameter&) [with Dtype = double]':
src/caffe/layer_factory.cpp:67:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
src/caffe/layer_factory.cpp: In function 'boost::shared_ptr<caffe::Layer<Dtype> > caffe::GetPoolingLayer(const caffe::LayerParameter&) [with Dtype = float]':
src/caffe/layer_factory.cpp:67:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
src/caffe/layer_factory.cpp: In function 'boost::shared_ptr<caffe::Layer<Dtype> > caffe::GetConvolutionLayer(const caffe::LayerParameter&) [with Dtype = double]':
src/caffe/layer_factory.cpp:39:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
src/caffe/layer_factory.cpp: In function 'boost::shared_ptr<caffe::Layer<Dtype> > caffe::GetConvolutionLayer(const caffe::LayerParameter&) [with Dtype = float]':
src/caffe/layer_factory.cpp:39:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
Makefile:552: recipe for target '.build_release/src/caffe/layer_factory.o' failed
make: *** [.build_release/src/caffe/layer_factory.o] Error 1

I'm not sure if there's any problem with my environment. ( CUDA8.0, cudnn5)
Since the README.md didn't mentioned it.

@sde123
Copy link

sde123 commented Feb 3, 2018

@zlmzju
hello,Thank you for your code,but I got the error in cudnn, too. Could you please tell me which cudnn I should use? thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants