我有Ubuntu 18.04。 Python 3.7.3,Tensorflow 2.0.0
这是我的cuda版本:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Nov__3_21:07:56_CDT_2017
Cuda compilation tools, release 9.1, V9.1.85
我的计算机是UX430UQ,图形卡是GeForce 940MX
这是nvidia-smi的输出:
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.87.01 Driver Version: 418.87.01 CUDA Version: 10.1 |
|-------------------------------+----------------------+----------------------+
| 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 940MX On | 00000000:01:00.0 Off | N/A |
| N/A 45C P0 N/A / N/A | 283MiB / 2004MiB | 9% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1014 G /usr/lib/xorg/Xorg 24MiB |
| 0 1164 G /usr/bin/gnome-shell 47MiB |
| 0 1440 G /usr/lib/xorg/Xorg 123MiB |
| 0 1615 G /usr/bin/gnome-shell 84MiB |
+-----------------------------------------------------------------------------+
这是我run sudo apt-get install cuda
时的输出:
Reading package lists...
Building dependency tree...
Reading state information...
cuda is already the newest version (10.1.243-1).
0 upgraded, 0 newly installed, 0 to remove and 138 not upgraded.
这是我运行tf.test.is_gpu_available()
2019-10-08 21:04:37.186069:我 tensorflow / stream_executor / cuda / cuda_gpu_executor.cc:1006]成功 从SysFS读取的NUMA节点的值为负(-1),但必须存在 至少一个NUMA节点,因此返回NUMA节点为零
2019-10-08 21:04:37.188434:我 tensorflow / core / common_runtime / gpu / gpu_device.cc:1618]找到设备0 具有属性:
名称:GeForce 940MX主:5次:0 memoryClockRate(GHz):1.2415
pciBusID:0000:01:00.0
2019-10-08 21:04:37.188863:W tensorflow / stream_executor / platform / default / dso_loader.cc:55]可以 无法加载动态库'libcudart.so.10.0'; dlerror: libcudart.so.10.0:无法打开共享库文件:无此文件或 目录; LD_LIBRARY_PATH:/usr/local/cuda-8.0/lib64
2019-10-08 21:04:37.189156:W tensorflow / stream_executor / platform / default / dso_loader.cc:55]可以 无法加载动态库'libcublas.so.10.0'; dlerror: libcublas.so.10.0:无法打开共享库文件:无此文件或 目录; LD_LIBRARY_PATH:/usr/local/cuda-8.0/lib64
2019-10-08 21:04:37.189426:W tensorflow / stream_executor / platform / default / dso_loader.cc:55]可以 无法加载动态库'libcufft.so.10.0'; dlerror: libcufft.so.10.0:无法打开共享库文件:无此文件或 目录; LD_LIBRARY_PATH:/usr/local/cuda-8.0/lib64
2019-10-08 21:04:37.189687:W tensorflow / stream_executor / platform / default / dso_loader.cc:55]可以 不加载动态库'libcurand.so.10.0'; dlerror: libcurand.so.10.0:无法打开共享库文件:无此文件或 目录; LD_LIBRARY_PATH:/usr/local/cuda-8.0/lib64
2019-10-08 21:04:37.189946:W tensorflow / stream_executor / platform / default / dso_loader.cc:55]可以 无法加载动态库'libcusolver.so.10.0'; dlerror: libcusolver.so.10.0:无法打开共享库文件:无此文件或 目录; LD_LIBRARY_PATH:/usr/local/cuda-8.0/lib64
2019-10-08 21:04:37.190202:W tensorflow / stream_executor / platform / default / dso_loader.cc:55]可以 无法加载动态库'libcusparse.so.10.0'; dlerror: libcusparse.so.10.0:无法打开共享库文件:无此文件或 目录; LD_LIBRARY_PATH:/usr/local/cuda-8.0/lib64
2019-10-08 21:04:37.190236:我 tensorflow / stream_executor / platform / default / dso_loader.cc:44] 成功打开动态库libcudnn.so.7
2019-10-08 21:04:37.190244:W tensorflow / core / common_runtime / gpu / gpu_device.cc:1641]无法dlopen 一些GPU库。请确保提到了缺少的库 如果您想使用GPU,则可以正确安装上述软件。跟着 https://www.tensorflow.org/install/gpu的下载指南 并为您的平台设置所需的库。
跳过注册GPU设备...
2019-10-08 21:04:37.190261:我 tensorflow / core / common_runtime / gpu / gpu_device.cc:1159]设备 将StreamExecutor与强度1边缘矩阵互连:
2019-10-08 21:04:37.190268:我 tensorflow / core / common_runtime / gpu / gpu_device.cc:1165] 0
2019-10-08 21:04:37.190276:我 tensorflow / core / common_runtime / gpu / gpu_device.cc:1178] 0:N