![So you want to setup CUDA ? [ 2021 ]](/images/yt/n8/so-you-want-to-setup-cuda-2021-kd5-l.jpg)
So you want to setup CUDA ? [ 2021 ]
So youre having trouble running your DL projects on GPU ?
Follow this table https://www.tensorflow.org/install/source#gpu
I have different environments for tensorflow and pytorch
On Ubuntu , I used pip to install the exact version numbers I wanted ( not conda or apt) and conda install on Windows.
My Setup :
Windows 11 21H2 (Build 22000.184) : Python 3.8, TF 2.4 , CUDA 11, cuDNN 8.0
WSL 2 Ubuntu 20.04 : Python 3.6.13, PyTorch 1.6.0, CUDA 10.1, cuDNN 7.6
WSL 2 Ubuntu 18.04 : Python 3.6.9, TF 1.12.0, CUDA 9.0, cuDNN 7
[ with
VS Code + Suitable Extensions (Best), PyCharm Professional(Slow and low resolution but great features coz its an IDE), Visual Studio
Google Colab if your device lacks the juice or the model needs VRAM ]
For cuDNN youll need a nvidia account , make sure to download the compatible version .
Make sure your driver version is compatible , $nvidia-smi to check the version. Updated drivers usually work quite well however they can break many things especially on laptops, multi-screen setup with different refresh rates so dont upgrade if you dont need to.
A big mistake that I have seen is people using GPU 3D performance stats to judge whether GPU is being utilized or not , its incorrect . Check cuda usage .
You might be better off on CPU for small networks ( host device copy overhead , gpu also needs to be "warmed" )
[ BGM ] NexP Ransom https://youtu.be/Hy2nok2LOLc