CUDA Libraries


Material by: Alan Gray, Rupert Nash

EPCC Logo

Computational Libraries

  • There are many computational operations that are relevant for multiple problems
  • It is not productive for each user to implement their own version from scratch
  • It is also usually very complex to implement in a way that gets optimal performance

Solution: re-usable libraries

  • User just integrates call to library function within code
  • Obviously only works if desired library exists
  • Library implementation is optimised for platform in use
  • Obviously only if desired library is optimised!

Many CPU libraries have developed and in use for many years and an increasing number of GPU libraries are now available

Simple Example: Matrix Multiplication

  • Basic Linear Algebra Subprograms (BLAS) has been around since 1979, and provides a range of basic linear algebra operations - optimised for modern CPUs
  • cuBLAS, a GPU-accelerated implementation, is available as part of the CUDA distribution
  • GPUs are well suited to these highly parallel operations and much faster that CPUs when the matrices are large

Simple Example: Matrix Multiplication

  • Other more complex linear algebra operations (matrix inversion, eigenvalue determination, etc) can be built out of multiple BLAS operations)
  • On CPU can use one of several LAPACK implementations
  • On GPU can use MAGMA (open source)
  • Curated list of libraries: http://www.netlib.org/utk/people/JackDongarra/la-sw.html

CUDA includes many libraries

See the NVIDIA website for them all.

Linear Algebra and Math Libraries

cuBLAS

GPU-accelerated standard BLAS library

CUDA Math Library

GPU-accelerated standard mathematical function library

cuSPARSE

GPU-accelerated BLAS for sparse matrices

Linear Algebra and Math Libraries

cuRAND

GPU-accelerated random number generation (RNG)

cuSOLVER

Dense and sparse direct solvers for Computer Vision, CFD, Computational Chemistry, and Linear Optimization applications

AmgX

GPU accelerated linear solvers for simulations and implicit unstructured methods

Signal, Image and Video Libraries

cuFFT

GPU-accelerated library for Fast Fourier Transforms

NVIDIA Performance Primitives

GPU-accelerated library for image and signal processing

NVIDIA Codec SDK

High-performance APIs and tools for hardware accelerated video encode and decode

Deep Learning Libraries

GPU-accelerated library of primitives for deep neural networks

GPU-accelerated neural network inference library for building deep learning applications

Advanced GPU-accelerated video inference library

Parallel Algorithm Libraries

NCCL

Collective Communications Library for scaling apps across multiple GPUs and nodes

nvGRAPH

GPU-accelerated library for graph analytics

Thrust

GPU-accelerated library of parallel algorithms and data structures

CUB

Cooperative primitives for CUDA C++, such as sort, reduce, or scan, across warps, blocks, and whole devices.

Partner Libraries

GPU-accelerated open-source library for computer vision, image processing and machine learning, now supporting real-time operation

Open-source multi-media framework with a library of plugins for audio and video processing

GPU-accelerated open source library for matrix, signal, and image processing

Partner Libraries

GPU-accelerated linear algebra routines for heterogeneous architectures, by Magma

GPU-accelerated open-source Fortran library with functions for math, signal and image processing, statistics, by RogueWave

Library for graph-processing designed specifically for the GPU

Partner Libraries

GPU-accelerated functions for sparse direct solvers, included in SuiteSparse linear algebra package authored by Prof.

GPU-accelerated linear algebra library by EM Photonics

GPU-accelerated linear algebra (LA) routines for the R platform for statistical computing supporting heterogeneous

Partner Libraries

GPU-accelerated computational geometry engine for advanced GIS, EDA, computer vision, and motion planning, by Fixstars

GPU-accelerated library for sparse iterative methods by Paralution

Real-time visual simulation of oceans, water bodies in games, simulation, and training applications, by Triton