1 unsupported GNU version! gcc versions later than 6 are not supported!
解决方法:
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 10
2 error: too few arguments to function ‘cudnnStatus_t cudnnSetConvolution2dDescriptor(cudnnConvolutionDescriptor_t, int, int, int, int, int, int, cudnnConvolutionMode_t, cudnnDataType_t)’
CUDNN_CHECK(cudnnSetConvolution2dDescriptor(*conv,
解决方法:
把include/caffe/caffe.hpp include/caffe/util/cudnn.hpp 替换成之前编译成功的版本
3 Makefile.config
USE_CUDNN := 1 (如果有GPU就设置为1,否则注释掉)
CUDA_DIR := /usr/local/cuda-9.0 (设置成cuda对应路径,这里路径不对会找不到cuda)
USE_OPENCV := 1
OPENCV_VERSION := 3 (对应目前环境中使用的opencv版本)
4 如果使用的是cuda9.0,
解决方法:
CUDA_ARCH := -gencode arch=compute_30,code=sm_30 \
-gencode arch=compute_35,code=sm_35 \
-gencode arch=compute_50,code=sm_50 \
-gencode arch=compute_50,code=compute_50
删除compute_20那两行