如何在16.04中验证CUDA安装?


24

我已经做了很多工作,但是我不确定是否一切正常。

nvidia-smi
Sun May 21 11:29:57 2017       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 375.39                 Driver Version: 375.39                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GT 730      Off  | 0000:01:00.0     N/A |                  N/A |
| 40%   39C    P8    N/A /  N/A |    295MiB /  1984MiB |     N/A      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID  Type  Process name                               Usage      |
|=============================================================================|
|    0                  Not Supported                                         |
+-----------------------------------------------------------------------------+

然后

 nvcc --version
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

最后

which nvcc
/usr/bin/nvcc

但是我的安装目录是

ldconfig -p | grep cuda
    libnvrtc.so.8.0 (libc6,x86-64) => /usr/local/cuda-8.0/targets/x86_64-linux/lib/libnvrtc.so.8.0
    libnvrtc.so (libc6,x86-64) => /usr/local/cuda-8.0/targets/x86_64-linux/lib/libnvrtc.so
    libnvrtc-builtins.so.8.0 (libc6,x86-64) => /usr/local/cuda-8.0/targets/x86_64-linux/lib/libnvrtc-builtins.so.8.0
    libnvrtc-builtins.so (libc6,x86-64) => /usr/local/cuda-8.0/targets/x86_64-linux/lib/libnvrtc-builtins.so

可以吗?为什么nvcc指向其他目录?

Answers:


17

这个可以吗?

是的,一切都如预期。

为什么nvcc指向其他目录?

nvcc驻留在可执行文件的典型文件夹中,而其他文件夹则是CUDA“驱动程序”。这主要是Nvidia的决定,但这是有道理的。


By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.