CUV: Matrix library for CUDA in C++ and Python

Project Website:

Github Link:

**Description**

CUV is a C++ template and Python library which makes it easy to use NVIDIA(tm)

CUDA.

Features

Supported Platforms:

• This library was only tested on Ubuntu Karmic, Lucid and Maverick. It uses

mostly standard components (except PyUBLAS) and should run without major

modification on any current linux system.

Supported GPUs:

• By default, code is generated for the lowest compute architecture. We

recommend you change this to match your hardware. Using ccmake you can set

the build variable “CUDA_ARCHITECTURE” for example to -arch=compute_20

• All GT 9800 and GTX 280 and above

• GT 9200 without convolutions. It might need some minor modifications to

make the rest work. If you want to use that card and have problems, just

get in contact.

• On 8800GTS, random numbers and convolutions wont work.

Structure:

• Like for example Matlab, CUV assumes that everything is an n-dimensional

array called “tensor”

• Tensors can have an arbitrary data-type and can be on the host (CPU-memory)

or device (GPU-memory)

• Tensors can be column-major or row-major (1-dimensional tensors are, by

convention, row-major)

• The library defines many functions which may or may not apply to all

possible combinations. Variations are easy to add.

• For convenience, we also wrap some of the functionality provided by Alex

Krizhevsky on his website (http://www.cs.utoronto.ca/~kriz/) with

permission. Thanks Alex for providing your code!

Python Integration

• CUV plays well with python and numpy. That is, once you wrote your fast GPU

functions in CUDA/C++, you can export them using Boost.Python. You can use

Numpy for pre-processing and fancy stuff you have not yet implemented, then

push the Numpy-matrix to the GPU, run your operations there, pull again to

CPU and visualize using matplotlib. Great.

Implemented Functionality

• Simple Linear Algebra for dense vectors and matrices (BLAS level 1,2,3)

• Helpful functors and abstractions

• Sparse matrices in DIA format and matrix-multiplication for these matrices

• I/O functions using boost.serialization

• Fast Random Number Generator

• Up to now, CUV was used to build dense and sparse Neural Networks and

Restricted Boltzmann Machines (RBM), convolutional or locally connected.

Documentation

• Tutorials are available on http://www.ais.uni-bonn.de/~schulz/tag/cuv

• The documentation can be generated from the code or accessed on the

internet: http://www.ais.uni-bonn.de/deep_learning/doc/html/index.html

Contact

• We are eager to help you getting started with CUV and improve the library

continuously! If you have any questions, feel free to contact Hannes Schulz

(schulz at ais dot uni-bonn dot de) or Andreas Mueller (amueller at ais dot

uni-bonn dot de). You can find the website of our group at http://

www.ais.uni-bonn.de/deep_learning/index.html.