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

Unable to build with cuDNN flag #9

Closed
gadkins opened this issue Mar 13, 2016 · 2 comments
Closed

Unable to build with cuDNN flag #9

gadkins opened this issue Mar 13, 2016 · 2 comments

Comments

@gadkins
Copy link

gadkins commented Mar 13, 2016

I've tried using cudnn versions 2, 3 & 4, none of which work.
I have no problems making on the master caffe with USE_CUDNN := 1, however, when I try to make this branch of caffe, I get the following errors:

make: *** [.build_release/src/caffe/lmdb_dataset.o] Error 1
In file included from ./include/caffe/util/device_alternate.hpp:40:0,
from ./include/caffe/common.hpp:18,
from ./include/caffe/internal_thread.hpp:4,
from src/caffe/internal_thread.cpp:1:
./include/caffe/util/cudnn.hpp:60:32: error: variable or field ‘createTensor4dDesc’ declared void
inline void createTensor4dDesc(cudnnTensor4dDescriptor_t* desc) {
^
./include/caffe/util/cudnn.hpp:60:32: error: ‘cudnnTensor4dDescriptor_t’ was not declared in this scope
./include/caffe/util/cudnn.hpp:60:59: error: ‘desc’ was not declared in this scope
inline void createTensor4dDesc(cudnnTensor4dDescriptor_t* desc) {
^
./include/caffe/util/cudnn.hpp:65:29: error: variable or field ‘setTensor4dDesc’ declared void
inline void setTensor4dDesc(cudnnTensor4dDescriptor_t* desc,
^
./include/caffe/util/cudnn.hpp:65:29: error: ‘cudnnTensor4dDescriptor_t’ was not declared in this scope
./include/caffe/util/cudnn.hpp:65:56: error: ‘desc’ was not declared in this scope
inline void setTensor4dDesc(cudnnTensor4dDescriptor_t* desc,
^
... etc.

Any suggestions as to what might be causing this?

@gadkins
Copy link
Author

gadkins commented Mar 15, 2016

I was able to fix this problem by using cuDNN v1 cudnn.h file. Turns out this branch of caffe is using "cudnnTensor4dDescriptor_t* desc" in include/caffe/util/cudnn.hpp while the master uses "cudnnTensorDescriptor_t* desc". Additionally cuDNN v1 uses "cudnnTensor4dDescriptor_t* desc" in the cudnn.h file whereas cuDNN v2, v3 and v4 use "cudnnTensorDescriptor_t* desc". Basically you need to make sure your pointer in cudnn.h matches your pointer in cudnn.hpp.

@saviogeorge
Copy link

Yes what @gadkins has mentioned is right I had the same issue and i got it working by replacing the cudNN(from version 5 to version 1).

Such errors are common and basically the problem will be linked to the mismatch in the cuDNN version. So by getting and compiling with the right version of of cuDNN should solve the problem

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