I was doing machine learning in university research, and I was wondering how to handle multiple versions of CUDA in the same environment, so I will write about it.
Run PyTorch on GPU in Windows 10 environment. The required CUDA version differs depending on the PyTorch version. Along with this, I installed multiple versions of CUDA.
Those who have run PyTorch on GPU and know how to install cuDNN and CUDA and how to pass the path, but do not know how to handle multiple versions.
The bottom line is that users don't have to do anything. As long as you pass the path, it will automatically recognize the required CUDA depending on which version of PyTorch you run.
When you type where nvcc
at the command prompt
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin\nvcc.exe
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin\nvcc.exe
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin\nvcc.exe
So, if you have the path of the version of CUDA to use, there is no problem.
If not, you can add the following path to the system environment variable Path
(which is unlikely, but if you know what you are doing and delete it?) .. (For version 10.2)
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\libnvvp
By the way, the folder where CUDA is installed looks like this.
Recommended Posts