For a list of GPU facilities see the GPU and cluster computing page.
What is GPGPU computing?
GPGPU is general purpose computing using graphics processing units.
What kind of problems are suitable for GPGPU?
If your code involves lots of large loops, especially nested loops, consider using GPGPU. If the code within the loops can be reduced to a fairly simple algorithm, it's a good candidate. If your dataset fits - or can be made to fit - into the memory of the hardware, it's a very good candidate. If your code involves manipulating large matrices, GPGPU should be ideal. To get the best results you will have to do some fairly low level C programming.
Software
For all hardware you will need both a device driver and a development framework. In general, and for NVIDIA in particular, the driver will probably be proprietary. To be useful it must be compatible with both your hardware and your choice of development framework. There are two frameworks in general use:
- CUDA
- CUDA is NVIDIA's proprietary framework. It is mature, and runs C/C++ and Fortran code natively. Third party wrappers are available for languages including Python, Perl, Fortran, Java, Ruby, Lua, Haskell, R and MATLAB.
There are multiple versions on compute nodes, each in its own directory in/opt. Look for directories whose names begin with/opt/cudaand/opt/cudnn.You can select one by modifying your
PATHandLD_LIBRARY_PATHbash environmental variables.On compute nodes, the CUDA toolkits and cuDNN libraries can also be loaded using environment modules.
module add cudawill add the latest installed version of the cuda toolkit to your paths.module listdisplays what is loaded.module avshows what is available. To switch the loaded toolkit, use for example,module switch cuda/12.8.0whilemodule remove cudawill unload. To add the cuDNN libraries to your environment:module add cudnn_forcuda13which will also load the latest appropriate CUDA toolkit.There is a PyTorch and cuda python virtual environment on compute nodes in directories beginning
/opt/venv. To save downloading multiple copies, an activated virtual environment can link to this by running, for example,/opt/venv-cuda132-pytorch-2.12.1/add_pytorchthe link can be removed by/opt/venv-cuda132-pytorch-2.12.1/remove_pytorch - OpenCL
- OpenCL (Open Computing Language) is an open standard heterogeneous platform. Code runs natively in C99, with APIs available in a number of programming languages (python, julia, Java, C++).
GPUs in Informatics
The School has a number of clusters and computers equipped with GPUs. For a list see the GPU and cluster computing page.
They mostly have NVIDIA based GPUs and a common software set based largely on standard DICE desktops, with added software driven by user request. If you'd like extra GPU software, or if you'd like CUDA added to your DICE desktop, just ask Computing Support.
Before purchasing GPU hardware, do ask Computing Support for advice; and if you plan to use University funds, for instance a research grant, you should definitely read our IT procurement page.