嘿,我已经安装了:
- CUDA 8.0
- cudnn-8.0-linux-x64-v5.1
- Tensorflow(gpu 版本)
我按照 tensorflow 网站的建议安装了 cudnn,然后复制了它:
rik@rik-MS-7971:~/Downloads$ sudo cp cuda/include/cudnn.h /usr/local/cuda/include
[sudo] password for rik:
rik@rik-MS-7971:~/Downloads$ sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
rik@rik-MS-7971:~/Downloads$ sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*
这些文件位于 /usr/local/cuda-8.0 文件夹中,因为这是我拥有的版本,而 /usr/local/cuda 是指向该文件夹的链接。
但是当我运行 sess.run() 时出现以下错误。我应该将文件放在哪里才能使其正常工作?谢谢。
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:102] **Couldn't open CUDA library libcudnn.so. LD_LIBRARY_PATH:
I tensorflow/stream_executor/cuda/cuda_dnn.cc:2259] Unable to load cuDNN DSO**
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcurand.so locally
I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:925] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
I tensorflow/core/common_runtime/gpu/gpu_init.cc:102] Found device 0 with properties:
name: GeForce GTX 1080
major: 6 minor: 1 memoryClockRate (GHz) 1.797
pciBusID 0000:01:00.0
Total memory: 7.92GiB
Free memory: 7.45GiB
I tensorflow/core/common_runtime/gpu/gpu_init.cc:126] DMA: 0
I tensorflow/core/common_runtime/gpu/gpu_init.cc:136] 0: Y
I tensorflow/core/common_runtime/gpu/gpu_device.cc:838] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 1080, pci bus id: 0000:01:00.0)
答案1
您可以通过 strace 运行您的程序来查看它尝试打开哪些文件,这应该会向您显示它尝试在哪里找到该文件。
-f 表示继续跟踪程序的分叉部分
-e open 表示仅显示“打开”系统调用,否则会太冗长。
strace -f -e open /path/to/your/program