windows - 如何安装 libgpuarray Windows

标签 windows build windows-10 deep-learning

我正在尝试在 Windows 10 设备上安装 libgpuarray。他们网站上的说明 here有点困惑,因为我是 Windows 构建和开发的新手。有人可以提供有关安装此软件的说明(假设我知之甚少)吗?

最佳答案

我刚刚成功构建了 libgpuarray...

这是一个有用的页面:Add windows install instructions #264


所以首先,你需要有一个编译器。
我使用的是 Visual Studio 2015,MinGW/MSYS 应该也适用于这个项目,但我不熟悉这些编译器。

其次,您需要在构建之前安装cmake,只需转到他们的official site即可。并下载它。
我没有尝试其他选项,但如果您使用的是 python,则 libgpuarray 还需要安装 mako

然后,仔细按照上面链接中的步骤(复制到这里并附上一些注释)。

Clone the library from GitHub.

Create build folder, open CMake gui (I suggest to run a command like this before using gui: cmake .. -G "Visual Studio 14 2015 Win64", I always got errors using gui to create config)

Change CMAKE_INSTALL_PREFIX to libgpuarray/lib (just use the folder you want to install, it defaults to "C:\Program Files\libgpuarray"). Perhaps this should be default on windows.
(I also set CMAKE_BUILD_TYPE=Release )

Configure and generate. (should be no error here)

Open the .sln file with Visual Studio

Build the INSTALL package (needs PR #263)

Manually move the dll's to somewhere in the PATH. Perhaps we should automate this on windows.

如果你不需要为 python 设置,你现在可以停止。


Build the Cython extension (in the libgpuarray root) with: python setup.py build_ext --compiler=msvc
(before this setup command, you may need to run call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 )

Install the package with python setup.py install


希望对您有所帮助。

关于windows - 如何安装 libgpuarray Windows,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43010163/

相关文章:

python - 将 Linux 上的 Python 脚本打包成 Windows 可执行文件

windows - 在 VMWare VM 中运行 Vagrant

node.js - VSCODE 构建错误 `The terminal process "/bin/zsh '-c' , 'yarn run watch-extensionsd' "无法启动(退出代码 : 127). `

ios - Xcode 9.0.1 应用程序分发程序已更改

node.js - npm 启动不起作用

windows - 暂停 Windows 关机

c++ - 使用 Shobjidl.h 的 Microsoft SDK 中的奇怪错误

iOS Simulator 无法运行并且 xCode 构建应用程序的速度太慢

python - Pip 安装 shapely giving "python setup.py egg_info"失败,错误代码 1 错误

c# - 有没有办法让 WPF 应用程序在 Windows 10 中少 "ugly"?