gpu: make all fail

2,357 views
Skip to first unread message

Duy Huynh

unread,
Dec 15, 2014, 3:11:12 PM12/15/14
to caffe...@googlegroups.com
hi there, i was wondering if anyone has seen this error when running 'make all' with gpu.  i already downloaded cudnn.h and put it in /usr/include.  any feedback is much appreciated.

ll@m0:~/code/caffe$ sudo make all
g++ src/caffe/layers/concat_layer.cpp -pthread -fPIC -DNDEBUG -O2 -DUSE_CUDNN -I/usr/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -I.build_release/src -I./src -I./include -I/usr/local/cuda/include -Wall -Wno-sign-compare -c -o .build_release/src/caffe/layers/concat_layer.o 2> .build_release/src/caffe/layers/concat_layer.o.warnings.txt \
|| (cat .build_release/src/caffe/layers/concat_layer.o.warnings.txt; exit 1)
In file included from ./include/caffe/util/device_alternate.hpp:40:0,
                 from ./include/caffe/common.hpp:18,
                 from ./include/caffe/blob.hpp:4,
                 from ./include/caffe/layer.hpp:8,
                 from src/caffe/layers/concat_layer.cpp:3:
./include/caffe/util/cudnn.hpp:59:32: error: variable or field ‘createTensor4dDesc’ declared void
 inline void createTensor4dDesc(cudnnTensor4dDescriptor_t* desc) {
                                ^
./include/caffe/util/cudnn.hpp:59:32: error: ‘cudnnTensor4dDescriptor_t’ was not declared in this scope
./include/caffe/util/cudnn.hpp:59:59: error: ‘desc’ was not declared in this scope
 inline void createTensor4dDesc(cudnnTensor4dDescriptor_t* desc) {
                                                           ^
./include/caffe/util/cudnn.hpp:64:29: error: variable or field ‘setTensor4dDesc’ declared void
 inline void setTensor4dDesc(cudnnTensor4dDescriptor_t* desc,
                             ^
./include/caffe/util/cudnn.hpp:64:29: error: ‘cudnnTensor4dDescriptor_t’ was not declared in this scope
./include/caffe/util/cudnn.hpp:64:56: error: ‘desc’ was not declared in this scope
 inline void setTensor4dDesc(cudnnTensor4dDescriptor_t* desc,
                                                        ^
./include/caffe/util/cudnn.hpp:65:5: error: expected primary-expression before ‘int’
     int n, int c, int h, int w,
     ^
./include/caffe/util/cudnn.hpp:65:12: error: expected primary-expression before ‘int’
     int n, int c, int h, int w,
            ^
./include/caffe/util/cudnn.hpp:65:19: error: expected primary-expression before ‘int’
     int n, int c, int h, int w,
                   ^
./include/caffe/util/cudnn.hpp:65:26: error: expected primary-expression before ‘int’
     int n, int c, int h, int w,
                          ^
./include/caffe/util/cudnn.hpp:66:5: error: expected primary-expression before ‘int’
     int stride_n, int stride_c, int stride_h, int stride_w) {
     ^
./include/caffe/util/cudnn.hpp:66:19: error: expected primary-expression before ‘int’
     int stride_n, int stride_c, int stride_h, int stride_w) {
                   ^
./include/caffe/util/cudnn.hpp:66:33: error: expected primary-expression before ‘int’
     int stride_n, int stride_c, int stride_h, int stride_w) {
                                 ^
./include/caffe/util/cudnn.hpp:66:47: error: expected primary-expression before ‘int’
     int stride_n, int stride_c, int stride_h, int stride_w) {
                                               ^
./include/caffe/util/cudnn.hpp:72:29: error: variable or field ‘setTensor4dDesc’ declared void
 inline void setTensor4dDesc(cudnnTensor4dDescriptor_t* desc,
                             ^
./include/caffe/util/cudnn.hpp:72:29: error: ‘cudnnTensor4dDescriptor_t’ was not declared in this scope
./include/caffe/util/cudnn.hpp:72:56: error: ‘desc’ was not declared in this scope
 inline void setTensor4dDesc(cudnnTensor4dDescriptor_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:97:5: error: ‘cudnnTensor4dDescriptor_t’ has not been declared
     cudnnTensor4dDescriptor_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:100:70: error: there are no arguments to ‘cudnnSetConvolutionDescriptor’ that depend on a template parameter, so a declaration of ‘cudnnSetConvolutionDescriptor’ must be available [-fpermissive]
       pad_h, pad_w, stride_h, stride_w, 1, 1, CUDNN_CROSS_CORRELATION));
                                                                      ^
./include/caffe/util/cudnn.hpp:11:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
./include/caffe/util/cudnn.hpp:100: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:11: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)’:
./include/caffe/util/cudnn.hpp:119:27: error: there are no arguments to ‘cudnnSetPoolingDescriptor’ that depend on a template parameter, so a declaration of ‘cudnnSetPoolingDescriptor’ must be available [-fpermissive]
         stride_h, stride_w));
                           ^
./include/caffe/util/cudnn.hpp:11:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^
In file included from ./include/caffe/loss_layers.hpp:11:0,
                 from ./include/caffe/common_layers.hpp:12,
                 from ./include/caffe/vision_layers.hpp:10,
                 from src/caffe/layers/concat_layer.cpp:5:
./include/caffe/neuron_layers.hpp: At global scope:
./include/caffe/neuron_layers.hpp:383:3: error: ‘cudnnTensor4dDescriptor_t’ does not name a type
   cudnnTensor4dDescriptor_t bottom_desc_;
   ^
./include/caffe/neuron_layers.hpp:384:3: error: ‘cudnnTensor4dDescriptor_t’ does not name a type
   cudnnTensor4dDescriptor_t top_desc_;
   ^
./include/caffe/neuron_layers.hpp:467:3: error: ‘cudnnTensor4dDescriptor_t’ does not name a type
   cudnnTensor4dDescriptor_t bottom_desc_;
   ^
./include/caffe/neuron_layers.hpp:468:3: error: ‘cudnnTensor4dDescriptor_t’ does not name a type
   cudnnTensor4dDescriptor_t top_desc_;
   ^
./include/caffe/neuron_layers.hpp:553:3: error: ‘cudnnTensor4dDescriptor_t’ does not name a type
   cudnnTensor4dDescriptor_t bottom_desc_;
   ^
./include/caffe/neuron_layers.hpp:554:3: error: ‘cudnnTensor4dDescriptor_t’ does not name a type
   cudnnTensor4dDescriptor_t top_desc_;
   ^
In file included from ./include/caffe/vision_layers.hpp:10:0,
                 from src/caffe/layers/concat_layer.cpp:5:
./include/caffe/common_layers.hpp:410:3: error: ‘cudnnTensor4dDescriptor_t’ does not name a type
   cudnnTensor4dDescriptor_t bottom_desc_;
   ^
./include/caffe/common_layers.hpp:411:3: error: ‘cudnnTensor4dDescriptor_t’ does not name a type
   cudnnTensor4dDescriptor_t top_desc_;
   ^
In file included from src/caffe/layers/concat_layer.cpp:5:0:
./include/caffe/vision_layers.hpp:148:10: error: ‘cudnnTensor4dDescriptor_t’ was not declared in this scope
   vector<cudnnTensor4dDescriptor_t> bottom_descs_, top_descs_;
          ^
./include/caffe/vision_layers.hpp:148:35: error: template argument 1 is invalid
   vector<cudnnTensor4dDescriptor_t> bottom_descs_, top_descs_;
                                   ^
./include/caffe/vision_layers.hpp:148:35: error: template argument 2 is invalid
./include/caffe/vision_layers.hpp:149:3: error: ‘cudnnTensor4dDescriptor_t’ does not name a type
   cudnnTensor4dDescriptor_t    bias_desc_;
   ^
./include/caffe/vision_layers.hpp:347:3: error: ‘cudnnTensor4dDescriptor_t’ does not name a type
   cudnnTensor4dDescriptor_t bottom_desc_, top_desc_;
   ^
make: *** [.build_release/src/caffe/layers/concat_layer.o] Error 1

Friendly User

unread,
Dec 15, 2014, 3:14:37 PM12/15/14
to caffe...@googlegroups.com

Was it your intention to comply with advanced cuDNN support?

 if so you probably need to install cuDNN correctly,

 otherwise remove the USE_CUDNN flag in 

Makefile.config


# cuDNN acceleration switch (uncomment to build with cuDNN).

# USE_CUDNN := 0


 
ll@m0:~/code/caffe$ sudo make all
g++ src/caffe/layers/concat_layer.cpp -pthread -fPIC -DNDEBUG -O2 -DUSE_CUDNN ...

Friendly User

unread,
Dec 15, 2014, 3:17:41 PM12/15/14
to caffe...@googlegroups.com
comply -> compile
 PS: cuDNN is not cuda, and is not needed for GPU
(Only if you want to speed up the superfast GPU even further)

ll

unread,
Dec 15, 2014, 3:23:06 PM12/15/14
to caffe...@googlegroups.com
yes!  i'd like to use cudnn for the fastest performance on caffe.  i already download cudnn here https://developer.nvidia.com/cuDNN, and then put the cudnn.h file under /usr/include.  but i got the error as above... thanks!

Milan Herbig

unread,
Dec 17, 2014, 5:47:08 PM12/17/14
to caffe...@googlegroups.com
I hand very similar error today. Looks like caffe is not ready for last CuDNN R2. I've downloaded R1 version and everything built with no errors and passed all tests. 


Dne pondělí, 15. prosince 2014 21:23:06 UTC+1 ll napsal(a):

Jakub Kurzak

unread,
Jan 14, 2015, 4:20:46 PM1/14/15
to caffe...@googlegroups.com
As of today, January 14, 2015, caffe still fails to compile with CuDNN R2.
I was wondering if there have been any new developments in that space.
Is caffe really incompatible with cuDNN R2 or are people doing something wrong in the build process?
BTW, I am trying to build it on a Mac and there is no option to fall back to R1, since R1 has not been released for OSX.
Jakub

Evan Shelhamer

unread,
Jan 30, 2015, 6:34:44 PM1/30/15
to Jakub Kurzak, caffe...@googlegroups.com
In case anyone has missed this, there is a PR for cuDNN R2: https://github.com/BVLC/caffe/pull/1739

It's still a PR since cuDNN R2 is a still only a release candidate and it isn't backward-compatible.

Happy brewing,

Evan Shelhamer

--
You received this message because you are subscribed to the Google Groups "Caffe Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to caffe-users...@googlegroups.com.
To post to this group, send email to caffe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/caffe-users/08eb675f-94ef-4e78-be9b-f78a4b167130%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Krishnendu Chaudhury

unread,
Jun 19, 2015, 2:29:09 AM6/19/15
to caffe...@googlegroups.com, jak...@gmail.com
(I am a git newbie)

I did a git clone https://github.com/BVLC/caffe.git  followed by git checkout dev and am hitting this problem (which was fixed by PR 1739). Sure enough, when I inspect my include/caffe/util/cudnn.hpp, I don't see the changes from 1739. It seems to me that PR 1739 is already merged into the master - then my "git clone" should have brought in the changes corresponding to PR 1739, no? What am I missing?

Thanks,
   Krish
Reply all
Reply to author
Forward
0 new messages