本文教程适用于刚安装好的Ubuntu 16.04
注意:以下安装的版本有时效性,且因设备而异,因此要自行判断选择哪个版本,是否选择最新版本。(比如CUDA9.0这个大版本的小版本也不更新了,但cuDNN9.0的大版本下的小版本还在更新)
0. What is CUDA & CuDnn
CUDA is NVIDIA’s language/API for programming on the graphics card. I’ve found it to be the easiest way to write really high performance programs run on the GPU. cuDNN is a library for deep neural nets built using CUDA. It provides GPU accelerated functionality for common operations in deep neural nets. You could use it directly yourself, but other libraries like TensorFlow already have built abstractions backed by cuDNN. https://www.quora.com/What-is-CUDA-and-cuDNN
一、初始工作
1. 换源:aliyun
2. 更新
sudo apt-get upgrade
二、检测NVIDIA显卡驱动
1.
在终端输入
nvidia-smi
若出现下图,则说明NVIDIA 显卡已经安装
2.
若出现command no found
,则需要先安装NVIDIA 显卡,先到NVDIA官网查看对应的驱动程序的版本:
https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html
(check the relative CUDA version with the NVIDIA drive version)
本人显卡为GeFprce GTX 960M