NumPy for CUDA – Københavns Universitet

NumPy for CUDA

Masters defence by Mads Mayntz Kierulff  

NumPy is a module for Python. It is well known because of how easy it is to write scientic programs in. This is mainly due to its multidimensional array structure called ndarray.
It supports a great number of useful operations on ndarrays. NumPy is implemented sequentially, which limits its usefulness when it comes to solving problems with many iterations on large data sets.

CUDA is a massively parallel architecture developed by NVIDIA. CUDA enables a pro- grammer to execute programs on a graphics card. Because the CUDA architecture varies from a CPU it can be intimidating for some to begin implement programs to run on a graphics card. CUDA programs can be implemented in C or Fortran, which isn't as easy to develop programs in as NumPy. It doesn't have the intuitive syntax of NumPy (Python).

In this master thesis I will extend NumPy with the option of execution certain NumPy operations on a graphics card. By combining these two and focusing on their individual strength, it will become a powerful tool for programmers. My implementation will not support all of the operations found in NumPy, but enough so that it can run dierent NumPy programs.
I will compare my implementation with NumPy by running two NumPy programs rst normally and then with CUDA support. I succeded in extending NumPy with CUDA and in a way, so that it is easy to use. With my implementation, is it almost transparent for the programmer to use CUDA.

Censor: Brian Nielsen, AAU
Supervisor: Brian Vinter, DIKU