令人困惑的CUDA版本 [英] Confusing cuda versions

查看:496
本文介绍了令人困惑的CUDA版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据官方说明,我刚刚在Ubuntu 16.04上安装了最新的CUDA 9.1。但是当我运行命令 nvcc -V 时,它仍然显示我的cuda版本是7.5,如下所示。

I just installed the latest CUDA 9.1 on Ubuntu 16.04 according to the official instruction. But when I run the command nvcc -V, it still shows my cuda version is 7.5 like below.

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2015 NVIDIA Corporation
Built on Tue_Aug_11_14:27:32_CDT_2015
Cuda compilation tools, release 7.5, V7.5.17

此外,其中nvcc 给了我 / usr / bin / nvcc ,它不在 / usr / local 文件夹下。这正常吗?这是兼容性问题吗?我有一个GTX 1080 Ti和一个GTX980。我在 .bashrc 文件中添加了以下命令,但仍然无法正常工作。

Also, which nvcc gave me /usr/bin/nvcc which is not under /usr/local folder. Is this normal? Is this a compatibility issue? I have a GTX 1080 Ti and a GTX 980. I added commands below to .bashrc file, but it still didn't work.

export PATH=/usr/local/cuda-9.1/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-9.1/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}


推荐答案

此处最好的做法是从 / usr / bin 目录中删除所有CUDA二进制文件的痕迹,并在将来始终安装CUDA工具包在 / usr / local / cuda-XX

The best thing to do here is to remove all traces of CUDA binaries from the /usr/bin directory, and in the future always install the CUDA toolkit in the "default" locations at /usr/local/cuda-XX

要从<$中删除CUDA项目c $ c> / usr / bin ,只需以root用户身份使用linux rm 命令。不知道要删除什么?看一下普通 CUDA安装bin目录,例如 /usr/local/cuda-8.0/bin

To remove CUDA items from /usr/bin, just use the linux rm command as a root user. Not sure what to remove? Take a look in an "ordinary" CUDA install bin directory, such as /usr/local/cuda-8.0/bin

通过将CUDA安装在默认位置,例如 /usr/local/cuda-8.0 /usr/local/cuda-9.0 (例如),您可以具有并排安装,并且通过相应地修改 PATH LD_LIBRARY_PATH 变量来在它们之间切换。

By having your CUDA install at the default locations e.g. /usr/local/cuda-8.0 and /usr/local/cuda-9.0 (for example), you can have "side-by-side" installs, and switch between them by modifying the PATH and LD_LIBRARY_PATH variables accordingly.

这篇关于令人困惑的CUDA版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆