- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我正在尝试为 OSX 10.9 上的 python 安装 libgpuarray ( http://deeplearning.net/software/libgpuarray/installation.html )。我安装了 CMake 3.0 并正在使用 UI。我从 git 下载了 libgpuarray 和 clBLAS 源,并分别在 Users/user/libgpuarray ../clBLAS 下解压。
使用 CMake UI 在生成构建时收到以下警告:
MACOSX_RPATH is not specified for the following targets:
gpuarray (clBLAS respectively)
执行“python setup.py build”会导致以下错误:
/Users/i043337/Library/Python/2.7/lib/python/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning:
"Using deprecated NumPy API, disable it by " "#defining
NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]'#warning "Using deprecated NumPy API, disable it by " \
^
pygpu/gpuarray.c:354:10: fatal error: 'gpuarray/types.h' file not found
'#include "gpuarray/types.h"
试图弄清楚如何设置正确的路径,但老实说我迷路了。
非常感谢任何帮助!
已安装最新的 XCode(包括 DeveloperTools)。 Python 版本是来自 python.org 的 2.7,在以下路径下 (Terminal$ type -a python)
python is /Library/Frameworks/Python.framework/Versions/2.7/bin/python
python is /usr/bin/python
python is /usr/local/bin/python
最佳答案
我通过运行解决了这个问题:
python setup.py build_ext -I /usr/local/include -L /usr/local/lib
代替:
python setup.py build
然后就解决了。您可能可以将这些添加到您的 PATH 作为替代。
此外,对于将来使用谷歌搜索此内容的任何人,您可能必须将 Build/src/CMakeFiles/gpuarray.dir 中的 link.txt 修改为:
1) omit -arch=i386
2) add -F/Library/Frameworks
在您创建的 Build/目录中运行 make 之后。
关于python - 如何在 mac os x (10.9) 上的 python 中安装 libgpuarray 和 clBLAS?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25060207/
看看那里的 OpenCL 库,我试图完全掌握每个库。特别是一个图书馆是 clBLAS .他们的网站声明它实现了 BLAS 级别 1、2 和 3 方法。那很好,但是 ViennaCL也有 BLAS 例程
我正在尝试为 OSX 10.9 上的 python 安装 libgpuarray ( http://deeplearning.net/software/libgpuarray/installation
我是一名优秀的程序员,十分优秀!