Multi-version Cuda problem

Source: Internet
Author: User
Tags nvcc

The same machine can be compatible with multiple versions of the CUDA, these two days will be so back and forth, slightly trouble.

1. View the current Cuda version;

NVCC--version
From this we can see that the current is Cuda 8.0.

2. Modify the. bashrc file.

Export path= $PATH:/usr/local/cuda-8.0/bin
export ld_library_path= $LD _library_path:/usr/local/cuda-8.0/lib64
Export library_path= $LIBRARY _path:/usr/local/cuda-8.0/lib64
Change the way you add these variables to the following:
Export path= $PATH:/usr/local/cuda/bin
export ld_library_path= $LD _library_path:/usr/local/cuda/lib64
Export Library_path= $LIBRARY _path:/usr/local/cuda/lib64
After you modify it, you need to refresh it:
source. BASHRC

Then switch to Cuda version 9.0 below.

2. Download CUDA 9.0 's Run file from the official website, during the installation process, choose not to establish a soft connection.
3. Switch Cuda 9.0 and use the command below.

sudo rm-rf/usr/local/cuda
sudo ln-s/usr/local/cuda-9.0/usr/local/cuda
NVCC--version
You can see that the current Cuda version becomes 9.0.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.