MTCNN_Caffe icon indicating copy to clipboard operation
MTCNN_Caffe copied to clipboard

error: too few arguments to function ‘cudnnStatus_t cudnnSetConvolution2dDescriptor

Open ZhangXinNan opened this issue 6 years ago • 6 comments

(py3.6_caffe) zhangxin@zhangxin-AW:~/github/MTCNN_Caffe$ sudo make
Package opencv3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv3.pc'
to the PKG_CONFIG_PATH environment variable
No package 'opencv3' found
PROTOC src/caffe/proto/caffe.proto
CXX .build_release/src/caffe/proto/caffe.pb.cc
CXX src/caffe/data_reader.cpp
In file included from ./include/caffe/util/device_alternate.hpp:40:0,
                 from ./include/caffe/common.hpp:19,
                 from src/caffe/data_reader.cpp:6:
./include/caffe/util/cudnn.hpp: In function ‘const char* cudnnGetErrorString(cudnnStatus_t)’:
./include/caffe/util/cudnn.hpp:21:10: warning: enumeration value ‘CUDNN_STATUS_RUNTIME_PREREQUISITE_MISSING’ not handled in switch [-Wswitch]
   switch (status) {
          ^
./include/caffe/util/cudnn.hpp:21:10: warning: enumeration value ‘CUDNN_STATUS_RUNTIME_IN_PROGRESS’ not handled in switch [-Wswitch]
./include/caffe/util/cudnn.hpp:21:10: warning: enumeration value ‘CUDNN_STATUS_RUNTIME_FP_OVERFLOW’ not handled in switch [-Wswitch]
./include/caffe/util/cudnn.hpp: In function ‘void caffe::cudnn::setConvolutionDesc(cudnnConvolutionStruct**, cudnnTensorDescriptor_t, cudnnFilterDescriptor_t, int, int, int, int)’:
./include/caffe/util/cudnn.hpp:113:70: error: too few arguments to function ‘cudnnStatus_t cudnnSetConvolution2dDescriptor(cudnnConvolutionDescriptor_t, int, int, int, int, int, int, cudnnConvolutionMode_t, cudnnDataType_t)’
       pad_h, pad_w, stride_h, stride_w, 1, 1, CUDNN_CROSS_CORRELATION));
                                                                      ^
./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 src/caffe/data_reader.cpp:6:
/usr/local/cuda/include/cudnn.h:537:27: note: declared here
 cudnnStatus_t CUDNNWINAPI cudnnSetConvolution2dDescriptor( cudnnConvolutionDescriptor_t convDesc,
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Makefile:575: recipe for target '.build_release/src/caffe/data_reader.o' failed
make: *** [.build_release/src/caffe/data_reader.o] Error 1

I solve it by

copy caffe/include/caffe/util/cudnn.hpp to ./include/caffe/util/cudnn.hpp

ZhangXinNan avatar Sep 04 '18 07:09 ZhangXinNan

(py3.6_caffe) zhangxin@zhangxin-AW:~/github/MTCNN_Caffe$ make
Package opencv3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv3.pc'
to the PKG_CONFIG_PATH environment variable
No package 'opencv3' found
PROTOC src/caffe/proto/caffe.proto
CXX .build_release/src/caffe/proto/caffe.pb.cc
In file included from .build_release/src/caffe/proto/caffe.pb.cc:4:0:
.build_release/src/caffe/proto/caffe.pb.h:12:2: error: #error This file was generated by a newer version of protoc which is
 #error This file was generated by a newer version of protoc which is
  ^~~~~
.build_release/src/caffe/proto/caffe.pb.h:13:2: error: #error incompatible with your Protocol Buffer headers. Please update
 #error incompatible with your Protocol Buffer headers.  Please update
  ^~~~~
.build_release/src/caffe/proto/caffe.pb.h:14:2: error: #error your headers.
 #error your headers.
  ^~~~~
In file included from .build_release/src/caffe/proto/caffe.pb.cc:4:0:
.build_release/src/caffe/proto/caffe.pb.h:25:60: fatal error: google/protobuf/generated_message_table_driven.h: No such file or directory
 #include <google/protobuf/generated_message_table_driven.h>
                                                            ^
compilation terminated.
Makefile:582: recipe for target '.build_release/src/caffe/proto/caffe.pb.o' failed
make: *** [.build_release/src/caffe/proto/caffe.pb.o] Error 1

ZhangXinNan avatar Sep 04 '18 07:09 ZhangXinNan

(py3.6_caffe) zhangxin@zhangxin-AW:~/github/MTCNN_Caffe$ sudo make
Package opencv3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv3.pc'
to the PKG_CONFIG_PATH environment variable
No package 'opencv3' found
CXX/LD -o .build_release/tools/upgrade_net_proto_text.bin
.build_release/lib/libcaffe.so: undefined reference to `cv::imread(cv::String const&, int)'
.build_release/lib/libcaffe.so: undefined reference to `cv::imencode(cv::String const&, cv::_InputArray const&, std::vector<unsigned char, std::allocator<unsigned char> >&, std::vector<int, std::allocator<int> > const&)'
.build_release/lib/libcaffe.so: undefined reference to `cv::imdecode(cv::_InputArray const&, int)'
collect2: error: ld returned 1 exit status
Makefile:619: recipe for target '.build_release/tools/upgrade_net_proto_text.bin' failed
make: *** [.build_release/tools/upgrade_net_proto_text.bin] Error 1

ZhangXinNan avatar Sep 04 '18 08:09 ZhangXinNan

Please try to compile office caffe https://github.com/BVLC/caffe. The problem should be opencv profile file.

DaFuCoding avatar Sep 04 '18 15:09 DaFuCoding

@DaFuCoding Official caffe is compiled successfully. Except example/MTSrc/MTMain.cpp, What difference
is between official caffe and your project.

ZhangXinNan avatar Sep 05 '18 01:09 ZhangXinNan

Without, the only difference is the example/MTSrc/MTMain.cpp

DaFuCoding avatar Sep 06 '18 14:09 DaFuCoding

@DaFuCoding maybe cudnn.hpp is older . you can replace your cudnn.hpp used https://github.com/BVLC/caffe/blob/master/include/caffe/util/cudnn.hpp

TLZS-zhangxueqiang avatar Jun 05 '20 07:06 TLZS-zhangxueqiang