How do I do statistical computation on a GPU?
Overview on using GPUs
GPUs provide the opportunity to do massively parallel computation, in particular executing the same computations on many inputs. To do this, you either need access to a machine with an installed GPU and appropriate software libraries, or you need to use a virtual machine in the cloud.
- The SCF has a GPU installed on one of the nodes (scf-sm20) of our high-priority cluster as well as other GPUs purchased by or donated to specific faculty members that may also available.
- The campus-wide Savio cluster has GPU nodes, and those affiliated with Statistics have priority access to 8 GPUs.
- GPUs are available through NSF's XSEDE network of supercomputers and on commercial cloud providers such as Amazon's AWS and Google cloud. Email us for more information.
For more details on the SCF GPUs and on using GPUs on Savio, please see this link.
For the most part, researchers tend not to program directly on a GPU but to use libraries such as Tensorflow, Torch, Keras, etc. that make use of GPU(s) without one having to specifically write GPU code. However, the materials below provide some information about programming directly on a GPU.
February 2016 Workshop
git clone https://github.com/berkeley-scf/gpu-workshop-2016
I forgot to record the screencast for the first session, so it's not available, but a video of the second session is available here. The quality is not the greatest, but it may give you a feel for what was discussed. The second part of the video covers the material in section 7 of the gpu.html document in the repository.
We have prepared a tutorial, including template code, on programming computations to use a GPU. Since the tutorial was prepared before the SCF acquired a GPU, it includes information about an Amazon machine image prepared by the SCF for GPU use on AWS. This machine image has various software libraries useful for programming on the GPU and can be used to create a virtual machine on Amazon EC2.
The tutorial and template code are available on Github. The HTML of the tutorial is also available here. You can clone the repository with a git clone, which can be done from the Linux/Mac command line as:
git clone https://github.com/berkeley-scf/gpu-workshop-2014
A video of Chris Paciorek's workshop on GPUs is available here.