运行:
python -c "from tensorflow.python.client import device_lib; print(device_lib.list_local_devices())" | grep libc
输出:
2019-07-12 19:26:11.320227: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-07-12 19:26:11.346128: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcuda.so.1
2019-07-12 19:26:11.850292: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x3b78390 executing computations on platform CUDA. Devices:
2019-07-12 19:26:11.850343: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0): GeForce RTX 2080 Ti, Compute Capability 7.5
2019-07-12 19:26:11.850354: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (1): GeForce RTX 2080 Ti, Compute Capability 7.5
2019-07-12 19:26:11.874413: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2993905000 Hz
2019-07-12 19:26:11.877882: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x40743f0 executing computations on platform Host. Devices:
2019-07-12 19:26:11.877916: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0): <undefined>, <undefined>
2019-07-12 19:26:11.879141: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 0 with properties:
name: GeForce RTX 2080 Ti major: 7 minor: 5 memoryClockRate(GHz): 1.65
pciBusID: 0000:09:00.0
2019-07-12 19:26:11.880315: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 1 with properties:
name: GeForce RTX 2080 Ti major: 7 minor: 5 memoryClockRate(GHz): 1.65
pciBusID: 0000:41:00.0
2019-07-12 19:26:11.880457: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'libcudart.so.10.0'; dlerror: libcudart.so.10.0: cannot open shared object file: No such file or directory
2019-07-12 19:26:11.880506: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'libcublas.so.10.0'; dlerror: libcublas.so.10.0: cannot open shared object file: No such file or directory
2019-07-12 19:26:11.880548: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'libcufft.so.10.0'; dlerror: libcufft.so.10.0: cannot open shared object file: No such file or directory
2019-07-12 19:26:11.880590: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'libcurand.so.10.0'; dlerror: libcurand.so.10.0: cannot open shared object file: No such file or directory
2019-07-12 19:26:11.880630: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'libcusolver.so.10.0'; dlerror: libcusolver.so.10.0: cannot open shared object file: No such file or directory
2019-07-12 19:26:11.880671: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'libcusparse.so.10.0'; dlerror: libcusparse.so.10.0: cannot open shared object file: No such file or directory
2019-07-12 19:26:11.884497: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudnn.so.7
2019-07-12 19:26:11.884528: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1663] Cannot dlopen some GPU libraries. Skipping registering GPU devices...
2019-07-12 19:26:11.884657: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1181] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-07-12 19:26:11.884671: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1187] 0 1
2019-07-12 19:26:11.884679: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1200] 0: N N
2019-07-12 19:26:11.884685: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1200] 1: N N
这样做之后:
/usr/local/cuda/targets/x86_64-linux/lib$ sudo ln -s libcudart.so.10.1 libcudart.so.10.0
它仍然找不到libcudart.so.10.0
,所以它在哪里寻找cuda .so文件?