Do I need to install cuda separately after installing the NVIDIA display driver?
Is cuda already included in the installation of the graphics card display driver? The card has 192 cuda cores according to https://www.asus.com/Graphics-Cards/GT710-SL-2GD5/specifications/, and Cuda 3.5 according to https://www.techpowerup.com/gpu-specs/geforce-gt-710.c1990. It obviously supports cuda, thus I was expecting this to be already installed.
Coming from https://stackoverflow.com/questions/9727688/how-to-get-the-cuda-version to find out the cuda version. The shortcuts for Windows 10 of that link do not work for me.
I assume now that cuda needs to be installed separately from https://developer.nvidia.com/cuda-toolkit, is this true?
Result in advance:
Cuda needs to be installed in addition to the display driver unless you use conda. Tensorflow and Pytorch need the CUDA system install if you install them with pip or from source. They both do not need the CUDA system install if you use conda (recommended). The conda install command for Pytorch will need the conda install parameter "cudatoolkit", while tensorflow does not need the parameter.
In the following, "CUDA Toolkit" (standalone, what you would install outside of Python right on your system) and cudatoolkit (conda) are different!
- Pytorch with conda: see https://pytorch.org/get-started/locally/. It is not recommended to install "cudatoolkit" and cudnn manually, use conda install command with all its dependencies. At the moment, "cudatoolkit" with maximum version 10.2 can be chosen as the conda install parameter. You do not need the system "CUDA Toolkit", see @jodag at https://stackoverflow.com/questions/60101973/how-to-use-gpu-in-pytorch.
- Standalone / system CUDA Toolkit: with executable install: with https://developer.nvidia.com/cuda-toolkit called "CUDA Toolkit" if you need it for other purposes outside of anaconda, for example, if you install with pip.
- Pytorch from source (if you have an older graphics card and you need to build your own pytorch version with all dependencies): with standalone / system CUDA Toolkit and standalone / system cuDNN before you install pytorch, see https://github.com/pytorch/pytorch/issues/17445#issuecomment-466791886 and a guide at https://www.youtube.com/watch?v=sGWLjbn5cgs. I have succeeded in installing from source only after many tries, see here. In my probably special case, the installation succeeded only with MKL ON & NINJA OFF.
- Tensorflow: with executable (standalone) install + pip / conda tensorflow + tensorflow-gpu: at the moment maximally "CUDA Toolkit" version 10.1 can be installed, see https://www.tensorflow.org/install/gpu --> https://developer.nvidia.com/cuda-toolkit-archive. EDIT: Please mind that using Anaconda to install tensorflow is recommended, see https://stackoverflow.com/questions/45040400/why-using-anaconda-environments-to-install-tensorflow-on-windows/63396682#63396682 and a guide at https://machinelearningspace.com/installing-tensorflow-2-0-in-anaconda-environment/. When using anaconda installer (
conda install tensorflow-gpu
), you do not need to install the system "CUDA Toolkit" (standalone, meaning outside of Python) anymore.
####
Details (only fyi):
Why not just testing an installation that needs cuda to find out. Going to https://pytorch.org/get-started/locally/, you get conda install pytorch torchvision cudatoolkit=10.2 -c pytorch
as the installation command in conda prompt.
It chooses to install version 10.2. It would not install cuda if that came with the display driver.
The installation then installs a cuda toolkit:
The following NEW packages will be INSTALLED:
cudatoolkit pkgs/main/win-64::cudatoolkit-10.2.89-h74a9793_1
Then we see that the cudatoolkit-10.2.89 | 317.2 MB is probably too large to be plausibly included in the display driver.
In C:\Program Files (x86)\NVIDIA Corporation
, there are only three cuda-named dll files of a few houndred KB.
p.s.: The mentioned cuda 11.0 in the release notes is just giving us the support information, not the actual installation. I have had a look at the release notes as well. It lists cuda 11.0 under "Software Module Versions", yes. Yet later under "New Features and Other Changes" it just says "Supports CUDA 11.0.", see https://us.download.nvidia.com/Windows/451.67/451.67-win10-win8-win7-release-notes.pdf.
From https://stackoverflow.com/questions/9727688/how-to-get-the-cuda-version:
- The accepted answer states that you need to install nvidia-cuda-toolkit to run the version commands at all (though referring not to Windows, but it is the same on Windows).
- The answer of using
nvidia-smi
to get the version in the top right is rejected as wrong since it only shows which version is supported. It does not show if Cuda is actually installed. @BruceYo comments: [The command nvidia-smi] "will display CUDA Version even when no CUDA is installed."
This suggests again that cuda is not included in the display driver installation.