Result in advance:
- Cuda needs to be installed in addition to the display driver unless you use conda with cudatoolkit or pip with cudatoolkit.
- Tensorflow and Pytorch need the CUDA system install if you install them with pip without cudatoolkit or from source.
- Tensorflow and Pytorch 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. You can get this done with pip, but setting it up like this is for example not recommended by pytorch who recommend conda: "Anaconda is our recommended package manager since it installs all dependencies." And since conda cannot use the "CUDA Toolkit", see How to run pytorch with NVIDIA "cuda toolkit" version instead of the official conda "cudatoolkit" version?, using "CUDA Toolkit" is not recommended either, which should mean the same for Tensorflow - and it does, see the last bullet point.
- 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). With pip, you can use "CUDA Toolkit" (1.), but you should not! You can also install "cudatoolkit" (2.) with pip, but that is also not recommended. The reason: in both pip installs (1./2.), there is no guarantee that your dependencies work in all settings. Conda instead is recommended by NVIDIA since it handles the dependencies.
EDITED: I found an example of what was also commented: that pip sometimes works when conda does not. UnsatisfiableError: Finds incompatible specification for CUDA driver, even though I have the version in the specification, and pip installs fine - installing PyMC3 and tensorflow. Old example perhaps, but a hint. Thus: try conda, and only if that does not work, try pip.
####
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.