Getting started with GPUs
While you can program GPUs directly with CUDA, a language and runtime library from NVIDIA, this can be daunting for programmers who do not have experience with C or with the details of computer architecture.
You may find the easiest way to tap the computation power of GPUs is to link your existing CPU program against numerical libraries that target the GPU:
- CUBLAS is a drop-in replacement for BLAS libraries that runs BLAS routines on the GPU instead of the CPU
- CULA is a similar library for LAPACK routines
- CUFFT, CUSPARSE, and CURAND provide FFT, sparse matrix, and randon number generation routines that run on the GPU
- MAGMA combines custom GPU kernels, CUBLAS, and a CPU BLAS library to use both the GPU and CPU to simaultaneously use both the GPU and CPU; it is available in the 'magma' module on Oscar
Matlab has a GPUArray feature, available through the Parallel Computing Toolkit, for creating arrays on the GPU and operating on them with many built-in Matlab functions. The PCT toolkit is licensed by CIS and is available to any Matlab session running on Oscar or workstations on the Brown campus network.
PyCUDA is an interface to CUDA from Python. It also has a GPUArray feature and is available in the Python module on Oscar.
Thrust is a higher-level C++ library built on top of CUDA, and is included in the CUDA module on Oscar.
