我安装了cuda 8和新的tensorflow 1.0。 当我运行“import tensorflow as tf”时,我得到以下内容:
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcublas.8.0.dylib locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcudnn.5.dylib locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcufft.8.0.dylib locally
Segmentation fault: 11
知道nvcc -V给出以下内容:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Sun_Oct_30_22:18:43_CDT_2016
Cuda compilation tools, release 8.0, V8.0.54
知道如何修复此分段错误吗?
答案 0 :(得分:0)
您可能错过了本地cuda安装中的库。例如,在尝试在本地安装/usr/local/cuda/lib/libcuda.dylib
之后,我失踪了CUDA Toolkit 8.0
(可能是因为我在工具包之前首先安装了驱动程序,正如这个古老的线程所暗示的那样:https://render.otoy.com/forum/viewtopic.php?f=25&t=1859)。重新运行安装程序,只为驱动程序正确安装它,并将其符号链接到另一个名称(https://github.com/tensorflow/tensorflow/issues/3263#issuecomment-232184358)。
最后,仔细检查您的环境变量路径,看看echo $DYLD_LIBRARY_PATH
是否正确。
另外,在测试安装时我仍然会看到一些警告,例如: The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
。这些只是建议从源代码(https://github.com/tensorflow/tensorflow/issues/8037)构建,而不是使用pip install --upgrade tensorflow-gpu
。