Random Number Generation on NVIDIA GPUs
The NVIDIA CUDA Random Number Generation library (cuRAND) delivers high performance GPU-accelerated random number generation (RNG). The cuRAND library delivers high quality random numbers 8x faster using hundreds of processor cores available in NVIDIA GPUs. The cuRAND library is included in both the NVIDIA HPC SDK and the CUDA Toolkit.
Explore what’s new in the latest release...
Review the latest CUDA performance report to learn how much you could accelerate your code.
cuRAND also provides two flexible interfaces, allowing you to generate random numbers in bulk from host code running on the CPU or from within your CUDA functions/kernels running on the GPU. A variety of RNG algorithms and distribution options means you can select the best solution for your needs.
cuRAND Key Features
Flexible usage model
Host API for generating random numbers in bulk on the GPU
Inline implementation allows use inside GPU functions/kernels, or in your host code
Four high-quality RNG algorithms
MTGP Merseinne Twister
XORWOW pseudo-random generation
Sobol’ quasi-random number generators, including support for scrambled and 64-bit RNG
Multiple RNG distribution options
Single-precision or double-precision
The random number generators and statistical distributions provided in the cuRAND library have been tested against well-known statistical test batteries, including TestUO1. Please see the cuRAND documentation for selected test results.
The cuRAND library is freely available as part of the NVIDIA HPC SDK. It is also included with the CUDA Toolkit.
For more information on cuRAND and other CUDA math libraries: