- Nvidia Driver
- CUDA (Compute Unified Device Architecture)
- cuDNN (NVIDIA CUDA® Deep Neural Network library)
- Install tensorflow-gpu
Visit NVIDIA download drivers page, choose the right hardware and download, open the installer and finish it.
Visit Tensorflow GPU Support page to confirm the version we gonna install.
Then visit CUDA Toolkit Download page, Choose the OS, Architecture, Distribution, Version directly if web gonna install the latest version, otherwise visit Legacy Releases page to get the installer.
Execute the executable file and finish it step-by-step.
References:
Visit Tensorflow GPU Support page to confirm the version we gonna install.
Visit Download cuDNN page, register, login, and download the right version. For legacy version, please visit Archived cuDNN Releases page.
Unarchive the downloaded file and move them into the right path.
Reference: cuDNN Installation Guide
- Copy
cudnn64_7.dll
toC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin
- Copy
cudnn.h
toC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\include
- Copy
cudnn.lib
toC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\lib\x64
# Unarchive
$ tar -xzvf cudnn-9.0-osx-x64-v7.tgz
# Copy files
$ sudo cp cuda/include/cudnn.h /usr/local/cuda/include
$ sudo cp cuda/lib/libcudnn* /usr/local/cuda/lib
$ sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib/libcudnn*
# Set environment variables
$ export DYLD_LIBRARY_PATH=/usr/local/cuda/lib:$DYLD_LIBRARY_PATH
[TODO]
# Pip
pip install tensorflow-gpu
# Anaconda
conda install tensorflow-gpu
- Command
nvidia-smi
- Windows:
C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe
- Windows:
- Command
nvcc --version
- GPU-Z
- Use Keras sample code: