我刚收到一个新的Linux Ubuntu 16.04。我想使用带有NVIDIA GPU的计算机来训练神经网络。我还安装了CUDA工具包,然后安装了cudNN库。请按照此处的说明进行操作:https://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html
一切安装正确,我可以在计算机上看到cuda和cudnn文件夹。 Veryfing cuda(nvcc --version)给了我这个反馈:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Sep__1_21:08:03_CDT_2017
Cuda compilation tools, release 9.0, V9.0.176
但是问题来了:当我尝试通过构建mnistCUDNN示例(HOME / cudnn_samples_v7 / mnistCUDNN)来验证cudNN安装时,我总是收到以下错误:
GPUServer:~/cudnn_samples_v7/mnistCUDNN$ make
/usr/bin/ld: cannot find -lcublas
collect2: error: ld returned 1 exit status
>>> WARNING - FreeImage is not set up correctly. Please ensure FreeImage is set up correctly. <<<
[@] /usr/local/cuda-9.0/bin/nvcc -ccbin g++ -I/usr/local/cuda-9.0/include -IFreeImage/include -m64 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_53,code=sm_53 -gencode arch=compute_53,code=compute_53 -o fp16_dev.o -c fp16_dev.cu
[@] g++ -I/usr/local/cuda-9.0/include -IFreeImage/include -o fp16_emu.o -c fp16_emu.cpp
[@] g++ -I/usr/local/cuda-9.0/include -IFreeImage/include -o mnistCUDNN.o -c mnistCUDNN.cpp
[@] /usr/local/cuda-9.0/bin/nvcc -ccbin g++ -m64 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_53,code=sm_53 -gencode arch=compute_53,code=compute_53 -o mnistCUDNN fp16_dev.o fp16_emu.o mnistCUDNN.o -I/usr/local/cuda-9.0/include -IFreeImage/include -LFreeImage/lib/linux/x86_64 -LFreeImage/lib/linux -lcudart -lcublas -lcudnn -lfreeimage -lstdc++ -lm
我再次检查了路径,但是在那里找不到任何问题。是什么原因导致此错误?