我使用命令
我的本地CUDA安装是CUDA 9.0和CUDNN 7.3.1在
按照提示https://github.com/tensorflow/tensorflow/issues/10827,我正在检查虚拟环境中TF使用的库。
pip3.6 install tensorflow-gpu
安装了(我认为)支持CUDA的TF,根据TF安装页面。我的本地CUDA安装是CUDA 9.0和CUDNN 7.3.1在
/usr/local/cuda-9.0
中。按照提示https://github.com/tensorflow/tensorflow/issues/10827,我正在检查虚拟环境中TF使用的库。
% python -c 'import tensorflow as tf; print(tf.sysconfig.get_lib() + "/python/_pywrap_tensorflow_internal.so")' | xargs ldd
linux-vdso.so.1 (0x00007fff57eb8000)
libtensorflow_framework.so => /home/mark/projects/bench/venvs/ve_tf/lib/python3.6/site-packages/tensorflow/python/../libtensorflow_framework.so (0x00007ff29fa25000)
libcublas.so.9.0 => /usr/local/cuda-9.0/lib64/libcublas.so.9.0 (0x00007ff29bda8000)
libcusolver.so.9.0 => /usr/local/cuda-9.0/lib64/libcusolver.so.9.0 (0x00007ff2971ad000)
libcudart.so.9.0 => /usr/local/cuda-9.0/lib64/libcudart.so.9.0 (0x00007ff296f40000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff296d3c000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff296b1f000)
libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007ff2968f2000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff2965ee000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007ff2963e6000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff296064000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff295e4d000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff295aae000)
/lib64/ld-linux-x86-64.so.2 (0x00007ff2cb7c7000)
libcuda.so.1 => /usr/lib/x86_64-linux-gnu/libcuda.so.1 (0x00007ff294f0e000)
libcudnn.so.7 => /usr/local/cuda-9.0/lib64/libcudnn.so.7 (0x00007ff282bd5000)
libcufft.so.9.0 => /usr/local/cuda-9.0/lib64/libcufft.so.9.0 (0x00007ff27ab34000)
libcurand.so.9.0 => /usr/local/cuda-9.0/lib64/libcurand.so.9.0 (0x00007ff276bd0000)
libnvidia-fatbinaryloader.so.390.77 => /usr/lib/x86_64-linux-gnu/libnvidia-fatbinaryloader.so.390.77 (0x00007ff276984000)
libcudnn.so
似乎指向正确的库,但是对于 libcuda.so
我有一些疑虑:
libcuda.so.1 => /usr/lib/x86_64-linux-gnu/libcuda.so.1 (0x00007ff294f0e000)
% readlink -f /usr/lib/x86_64-linux-gnu/libcuda.so.1
/usr/lib/x86_64-linux-gnu/libcuda.so.390.77
好的,显然这会导致CUDA库被NVIDIA设备驱动程序所使用/提供...
这正常吗?它不应该使用/usr/local/cuda-9.0
中的libcuda.so
吗?
我有一个:/usr/local/cuda-9.0/lib64/stubs/libcuda.so
。