fengfu-chris / caffe-twns

Implementation of Ternary Weight Networks In Caffe
https://arxiv.org/abs/1605.04711
63 stars 23 forks source link

Getting build error #7

Closed sainisanjay closed 7 years ago

sainisanjay commented 7 years ago

Hi @fengfu-chris , I am tried to build caffe-twns in my ubuntu 14.04 LTS. But i am getting some cudnn error like below i mentioned. In my system cuda is working fine. May i know how to solve the problem.

sanjay@sanjay:~$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Tue_Jan_10_13:22:03_CST_2017
Cuda compilation tools, release 8.0, V8.0.61
make: *** [.build_release/src/caffe/layers/memory_data_layer.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/data_transformer.hpp:7,
                 from src/caffe/layers/data_layer.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: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/data_transformer.hpp:7,
                 from src/caffe/layers/data_layer.cpp:8:
/usr/local/cuda/include/cudnn.h:799:27: note: declared here
 cudnnStatus_t CUDNNWINAPI cudnnSetPooling2dDescriptor(
                           ^
make: *** [.build_release/src/caffe/layers/data_layer.o] Error 1
sainisanjay commented 7 years ago

@fengfu-chris when i build without CUDNN #USE_CUDNN := 1 (in make file) it build successfully. It means that its not supporting cudnn 5.0(as in my system cudnn 5.0 has installed). Any idea how to solve?

fengfu-chris commented 7 years ago

Hi, @sainisanjay, cudnn 5.0 is not supported by this caffe repo. Sorry for that. Please use earlier cudnn versions(<=4.0).

sainisanjay commented 7 years ago

Thanks @fengfu-chris for your response.

fengfu-chris commented 7 years ago

You are welcome. @sainisanjay