cudapytorchnvidiatorchvision

Is it possible to run multiple CUDA version on windows?


I am doing an experiment on a chest x-ray Project. and I want multiple versions of the CUDA toolkit but the problem is that my system put the latest version which I installed lastly is appearing. Is it possible to run any of CUDA like 9.0, 10.2, 11.0 as required to GitHub code?

I have done all the initial steps like path added to an environment variable and added CUDNN copied file and added to the environment. Now the problem is that I want to use Cuda 9.0 as per my code but my default setting put cuda.11.0 what is the solution or script to switch easily between these version


Solution

  • You may set CUDA_PATH_V9_0, CUDA_PATH_V10_0, etc properly, then set CUDA_PATH to any one of them (e.g. CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0).

    Then in your VS project, set your cuda library path using the CUDA_PATH (e.g. $CUDA_PATH\lib).

    To switch, just set the CUDA_PATH to another version, and clean & rebuild your VS project(s).