daijifeng001 / MNC

Instance-aware Semantic Segmentation via Multi-task Network Cascades
Other
489 stars 182 forks source link

Error when make #27

Open sdsy888 opened 7 years ago

sdsy888 commented 7 years ago

It seems like this MNC project has some conflict with the latest version of cudnn(5.1)? Because if I turn off the "USE_CUDNN", there won't be any error.

What version of cudnn does this MNC project use, please? Thank you!

make: *** [.build_release/src/caffe/solvers/adagrad_solver.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 ./include/caffe/net.hpp:10,
                 from ./include/caffe/solver.hpp:7,
                 from ./include/caffe/sgd_solvers.hpp:7,
                 from src/caffe/solvers/adam_solver.cpp:3:
./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:127: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:15: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/net.hpp:10,
                 from ./include/caffe/solver.hpp:7,
                 from ./include/caffe/sgd_solvers.hpp:7,
                 from src/caffe/solvers/adam_solver.cpp:3:
/usr/local/cuda/include/cudnn.h:803:27: note: declared here
 cudnnStatus_t CUDNNWINAPI cudnnSetPooling2dDescriptor(
                           ^
make: *** [.build_release/src/caffe/solvers/adam_solver.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/net.hpp:10,
                 from ./include/caffe/solver.hpp:7,
                 from ./include/caffe/sgd_solvers.hpp:7,
                 from src/caffe/solvers/rmsprop_solver.cpp:3:
./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:127: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));
drinkingkazu commented 7 years ago

I had this issue when trying to build for pascal TitanX w/ cudnn 5.1.5. I switched to another tower w/ maxwell TitanX w/ cudnn 4.0.7 and I could build w/o problem. However I am facing #30 so not yet confirmed as the working case...

drinkingkazu commented 7 years ago

Just as a follow up, I can confirm the training proceeds fine w/ cudnn 4.0.7. I took a quick look at cudnn.h for 5.1.5 and it looks like it is easy to make it compilable by changing caffe's cudnn usage to "v3" functions in cudnn.h, though I cannot comment what could be a drawback by "just make it compilable".

sdsy888 commented 7 years ago

@drinkingkazu Thank you for the information! I've met the memory problem on TitanBlack but nailed it on TitanX.

hgaiser commented 7 years ago

Alternatively you can update caffe-mnc with the changes from upstream caffe to get cudnn 5 support. We did a similar thing in our fork and it is running fine on cudnn 5.