Skip to content

GPU Support on windows

Abdelaziz Hussein edited this page Sep 21, 2021 · 4 revisions

For Windows users, some extra dependencies must be installed in order to allow TensorFlow to utilize GPU.

Required Installations

Note for NVIDIA cuDNN installation:

  • You must sign up for a Free developer account to download cuDNN.
  • After installation, extract .zip file then add cuDNN files into your CUDA directory, by default it is:
    C:\Program Files\NVIDA GPU Computing Toolkit\CUDA\v11.0
    • Files Default Location:
      • cudnn64_7.dll -> \cuda\bin\cudnn64_7.dll
      • cudnn.h -> \cuda\include\cudnn.h
      • cudnn.lib -> \cuda\lib\x64\cudnn.lib
    • Files Destination:
      • cudnn64_7.dll -> C:\Program Files\NVIDA GPU Computing Toolkit\CUDA\v9.0\bin\
      • cudnn.h -> C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\include\
      • cudnn.lib -> C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\lib\x64\

Path Environment Variables:

Must check if CUDA path has been added to system environment variables and proceed to add them if not.
To access System Environment Variable: Control panel -> system and security -> system -> Advanced System Settings

Once there go to the advanced tab and click Environment Variables on the bottom, click path and then edit.

Ensure: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4\bin and C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4\libnvvp are in the list. If not, proceed to add them.

References:

Towards Data Science Tutorial
Nvidia Cuda Documentation