Skip to content

libgpuarray on Win10

valtron edited this page Feb 14, 2017 · 1 revision

This guide assumes:

  1. Dev environment as described here
  2. distutils.cfg set up to use mingw
  3. cmake (installable with pacman)

To install libgpuarry and pygpu:

  1. Run:

    LGA_DIR=$DEV/libgpuarray
    git clone https://github.com/Theano/libgpuarray.git
    cd libgpuarray
    mkdir build && cd build
    cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$LGA_DIR -G "Unix Makefiles"
    make && make install
  2. libgpuarray should now be in $LGA_DIR. Add $LGA_DIR/bin to your $PATH

  3. Go back to the libgpuarray source directory (in a new bash window, so that it has the updated $PATH)

  4. Edit setup.py, and remove if sys.platform == 'win32' and not os.getenv('CONDA_BUILD') and the 9 lines after it

  5. Run:

    python setup.py build_ext -L $LGA_DIR/lib -I $LGA_DIR/include
    python setup.py install
  6. Test your install with DEVICE=cuda python -c "import pygpu;pygpu.test()". In my case, 40/6894 failed.