fritz
fritz

Reputation: 181

How to install libgpuarray Windows

I'm trying to install libgpuarray on a windows 10 device. The instructions on their website here are a little confusing as I'm new to windows builds and development. Could someone please provide instructions with explanation (assume I know little) for installing this software?

Upvotes: 2

Views: 2046

Answers (1)

wx0
wx0

Reputation: 26

I just successfully built the libgpuarray...

Here's a helpful page: Add windows install instructions #264


So first, you need to have a compiler.
I'm using Visual Studio 2015, MinGW/MSYS should also work in this project, but I'm not familiar with those compilers.

Second, you need to install cmake before your build, just go to their official site and download it.
I did not try other options, but if you're using python, libgpuarray will also require mako to be installed.

Then, carefully follow the steps in the link above(copied here with some notes).

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.

If you don't need to setup for python, you can stop now.


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


Hope this can help.

Upvotes: 1

Related Questions