Free switching of multiple cuda versions of the system

1. Problem description

Because multiple frameworks require different versions of deep learning, multiple versions of CUDA need to be installed. At this time, we will consider which version is the priority when we use it?

Principle: According to the installation sequence, the last computer installed takes priority after restarting, such as:

I installed two versions, (By the way, the path is shown, you can refer to it when you are looking for it) Looking at the order, the 10.0 installed last, as expected, it is the first. check it out

win+r

nvcc -V

 Here you can see that it is the 10.0 version, because I installed it in the order above, and the last one is the 10.0 version, so the system is running cuda10.0 now, what if I want to switch back to 10.2?

2. Switching steps

Click on My Computer, right-click and select "Properties", then select "Advanced System Settings", open the environment variables , open the path, and you can see that the top version is version 10.0. (1325 messages) Switching between multiple cuda versions in win10 environment_qq_39019359's blog-CSDN blog

My method: win+i

 Then move the two variables of version 10.2 to the top to realize the switch. Re-open cmd, nvcc -V to check, and you will find that the switch has been realized.

 3. Matters needing attention

1. How to install cuda and cudnn?

· First check the version on your own computer to see the matching version

(1325 messages) pytoch installation_color sponge's blog-CSDN blog

(1325 messages) Install tensorflow_gpu in Anaconda Prompt

Check the graphics card, driver (check whether it is newer)

win+R——cmd, enter the command line, enter:

nvidia-smi

Go to the official website to download the corresponding version, decompression zip

Official website download:
The address of cuda10.0 official website is:
The address of cuda10.0 official website
The address of cudnn official website is: You need to go in and look for 7.4.1.5.
cudnn official website address

After downloading, get these two files.
insert image description here
insert image description here

· Double-click the picture on the left to install directly according to the default path, select the custom mode for the performance of the intermediate version, and then go to the next step until it is completed

Find the installation path, paste and copy the zip decompression file to the cuda folder

 · Restart the computer and use cmd to view the current version.

 

Guess you like

Origin blog.csdn.net/m0_63172128/article/details/129225471