简体   繁体   中英

C++ program using Caffe with CUDA

I try to run a program with Cuda.

To build Caffe and make runtest was fine.

But I got the error messages when I compile a simple code.

Of course, I had link include and library.

/usr/local/include/caffe/util/device_alternate.hpp:34:23: fatal error: cublas_v2.h: No such file or directory

Do you have any suggestions?

Which version of the Cuda you are using. You might need to reinstall CUDA.

If after you re-install the cuda, and still get the error:

In order to fix the cublas error, you will have to include the path to your cuda folder.

  1. locate cublas_v2.h -- this should give you the path to your cuda installation
  2. export CPLUS_INCLUDE_PATH=/your/cuda/path:$CPLUS_INCLUDE_PATH

Your cuda path will look something like: /opt/cuda-X.0/include

Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM