相关疑难解决方法(0)

机器nvcc -V混淆的多个CUDA版本

我以前在我的机器上安装了cuda-7.0,后来卸载了cuda-7.0并安装了cuda-8.0.当我转到我的/ usr/local文件夹时,我看到以下文件夹:

/bin/
/cuda/
/cuda-7.0/
/cuda-8.0/
/etc/
/games/
/include/
/lib/
/lua/
/man/
/MATLAB/
/sbin/
/share/
/src/
Run Code Online (Sandbox Code Playgroud)

我想我很困惑,因为/cuda/version.txt文件说它是在cuda-8.0上,但当我键入:

$ nvcc -V
Run Code Online (Sandbox Code Playgroud)

它报告我使用的是7.0版:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2015 NVIDIA Corporation
Built on Mon_Feb_16_22:59:02_CST_2015
Cuda compilation tools, release 7.0, V7.0.27
Run Code Online (Sandbox Code Playgroud)

令我困惑的是,即使我这样做:

export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64:$LD_LIBRARY_PATH
export PATH=$PATH:/usr/local/cuda-8.0/bin
Run Code Online (Sandbox Code Playgroud)

键入后$ nvcc -V,它仍然输出7.0版.

编辑:

$ which nvcc
/usr/local/cuda-7.0/bin/nvcc

$ echo $PATH
/home/arturo/torch/install/bin:/home/arturo/torch/install/bin:/home/arturo/torch/install/bin:/home/arturo/torch/install/bin:/home/arturo/torch/install/bin:/home/arturo/torch/install/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/cuda-7.0/bin
Run Code Online (Sandbox Code Playgroud)

cuda

18
推荐指数
2
解决办法
1万
查看次数

标签 统计

cuda ×1