Let's build models using NVIDIA GPU
First part in the series of Learning Edge Machine Learning
Installation
Windows 10
Preparing Python Environment
First step is to install Anaconda to maintain different versions of Python for various projects that you might be working on.
Now, after installing Anaconda, add Conda
to 'Environment Path Variable'
by typing following command in 'Anaconda Powershell Prompt'
conda init powershell
Creating new environment, and installing tensorflow-gpu
conda create --name test python=3.10
conda activate test
python -m pip install tensorflow-gpu
Installing NVIDIA Cuda-Toolkit, cuDNN, Microsoft Visual C++ Compiler
Check compatibility matrix from Tensorflow Official Website and make note of compatible Python, CUDA, cuDNN version.
- Download correct version of Cuda Toolkit from Cuda-Toolkit Archive and follow standard installation instruction.
- Now, download the correct version of NVIDIA CUDA® Deep Neural Network library (cuDNN) from cuDNN Archive and
extract
the zip file. - The NVIDIA CUDA compiler
nvcc
uses a Visual C/C++ compiler behind the scenes, so we need to install compatible C/C++ compiler from Visual C++ Archive.
Integrating Cuda-Toolkit and cuDNN
Copy bin
, include
, lib
directory from cuDNN directory, and paste it in C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2
Setting up Environmental Variables
Add following new Path Variables to User Variable
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\bin
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\libnvvp