ubuntu16.04 cuda8.0 caffe 编译时遇到 caffe fatal error: cublas_v2.h 没有那个文件或目录

caffe 配置参考 http://blog.csdn.net/leo_xu06/article/details/53010900

make caffe的过程中碰过  ./include/caffe/util/device_alternate.hpp:34:23: fatal error: cublas_v2.h: 没有那个文件或目录

 查阅了相关博客后找到了正确的解决方案:

参考:http://blog.csdn.net/vbskj/article/details/52120475

CUDA8.0 中的include、lib路径是安装目录下/usr/local/cuda-8.0下面的include和lib


将其分别添加到caffe根目录下Makefile.config中的"INCLUDE_DIRS"、“LIBRARY_DIRS”后面就可以了。


将原

INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include 
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib 

改为

INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/local/cuda-8.0/include
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/local/cuda-8.0/lib

即可成功编译


你可能感兴趣的:(Ubuntu)