【发布时间】:2016-08-12 18:44:29
【问题描述】:
我一直在尝试在我的 El Capitan Macbook Pro(2013 年末,GeForce GT 750M)上启动并运行 tensorflow 0.10,但到目前为止没有成功。我尝试了official tensorflow documentation's instructions 和其他一些人的方法,包括this one 和this one。
作为参考,我正在尝试在 OSX 10.11.5 上使用 Python3、CUDA 7.5 和 tensorflow 0.10。
我已经安装了 CUDA,它可以识别我的 GPU。我可以在/Developer/NVIDIA/CUDA-7.5/samples/1_Utilities/deviceQuery 中成功编译deviceQuery 示例。它运行时的输出是:
./deviceQuery Starting...
CUDA Device Query (Runtime API) version (CUDART static linking)
Detected 1 CUDA Capable device(s)
Device 0: "GeForce GT 750M"
CUDA Driver Version / Runtime Version 7.5 / 7.5
CUDA Capability Major/Minor version number: 3.0
Total amount of global memory: 2048 MBytes (2147024896 bytes)
( 2) Multiprocessors, (192) CUDA Cores/MP: 384 CUDA Cores
GPU Max Clock rate: 926 MHz (0.93 GHz)
Memory Clock rate: 2508 Mhz
Memory Bus Width: 128-bit
L2 Cache Size: 262144 bytes
Maximum Texture Dimension Size (x,y,z) 1D=(65536), 2D=(65536, 65536), 3D=(4096, 4096, 4096)
Maximum Layered 1D Texture Size, (num) layers 1D=(16384), 2048 layers
Maximum Layered 2D Texture Size, (num) layers 2D=(16384, 16384), 2048 layers
Total amount of constant memory: 65536 bytes
Total amount of shared memory per block: 49152 bytes
Total number of registers available per block: 65536
Warp size: 32
Maximum number of threads per multiprocessor: 2048
Maximum number of threads per block: 1024
Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
Max dimension size of a grid size (x,y,z): (2147483647, 65535, 65535)
Maximum memory pitch: 2147483647 bytes
Texture alignment: 512 bytes
Concurrent copy and kernel execution: Yes with 1 copy engine(s)
Run time limit on kernels: Yes
Integrated GPU sharing Host Memory: No
Support host page-locked memory mapping: Yes
Alignment requirement for Surfaces: Yes
Device has ECC support: Disabled
Device supports Unified Addressing (UVA): Yes
Device PCI Domain ID / Bus ID / location ID: 0 / 1 / 0
Compute Mode:
< Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >
deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 7.5, CUDA Runtime Version = 7.5, NumDevs = 1, Device0 = GeForce GT 750M
Result = PASS
我还下载了 cudnn-7.5 库和头文件,并将这些文件放在 /usr/local/cuda/lib 和 include 的正确位置。
在 python3 交互式 REPL 中,如果我输入 import tensorflow,我会得到以下输出:
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 26 2016, 10:47:25)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcublas.7.5.dylib locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcudnn.5.dylib locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcufft.7.5.dylib locally
Segmentation fault: 11
我的问题是,我需要做什么才能成功导入没有段错误的模块?如果有帮助,我在 python3 REPL here 中发布了运行该命令的dtruss 输出的要点,以及带有堆栈跟踪here 的诊断(崩溃)报告的要点。
【问题讨论】:
-
你能得到如here描述的堆栈跟踪吗
-
已编辑以包含该内容。
-
你能看看这个解决方案是否有效吗? github.com/tensorflow/tensorflow/issues/…
-
是的......似乎已经做到了。在此处添加答案,我会接受。非常感谢!
标签: python macos tensorflow