Contents
安装显卡驱动
https://blog.csdn.net/wangsidadehao/article/details/70255754
显卡驱动和cuda版本对应关系
常见问题
https://blog.csdn.net/ysy950803/article/details/78507892/
安装Cuda和Cudnn
注意cuda_9.0搭配cudnn_7.1.4
https://blog.csdn.net/qq_35976351/article/details/79325476
查看cuda版本
1 2 |
cat /usr/local/cuda/version.txt |
查看cudnn版本
1 2 3 |
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2 cat /usr/include/cudnn.h | grep CUDNN_MAJOR -A 2 |
安装tensorflow-gpu
1 2 |
sudo pip3 install tensorflow-gpu==1.12.0 |
Could not dlopen library ‘libcufft.so.10.0 问题
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
sudo ln -s /usr/local/cuda-10.1/lib64/libcufft.so.10.1.105 /usr/local/cuda-10.1/lib64/libcufft.so.10.0 sudo ln -s /usr/local/cuda-10.1/lib64/libcurand.so.10.1.105 /usr/local/cuda-10.1/lib64/libcurand.so.10.0 sudo ln -s /usr/local/cuda-10.1/lib64/libcusolver.so.10.1.105 /usr/local/cuda-10.1/lib64/libcusolver.so.10.0 sudo ln -s /usr/local/cuda-10.1/lib64/libcusparse.so.10.1.105 /usr/local/cuda-10.1/lib64/libcusparse.so.10.0 sudo ln -s /usr/lib/x86_64-linux-gnu/libcublas.so.10.1.0.105 /usr/local/cuda-10.1/lib64/libcublas.so.10.0 sudo cp /usr/local/cuda-10.1/lib64/libcudart.so.10.0 /usr/local/lib/libcudart.so.10.0 && sudo ldconfig sudo ldconfig /usr/local/cuda-10.1/lib64 # 好像没用 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-10.1/lib64 # 如果有用加入到.bashrc里 |
http://www.freesion.com/article/722750995/
检测能否使用gpu
1 2 3 |
import tensorflow as tf print(tf.test.is_gpu_available()) |