Evaluation of pseudo-random number generation on GPU cards


Askar T. Shukirgaliyev B. Lukac M. Abdikamalov E.
December 2021MDPI

Computation
2021#9Issue 12

Monte Carlo methods rely on sequences of random numbers to obtain solutions to many problems in science and engineering. In this work, we evaluate the performance of different pseudo-random number generators (PRNGs) of the Curand library on a number of modern Nvidia GPU cards. As a numerical test, we generate pseudo-random number (PRN) sequences and obtain non-uniform distributions using the acceptance-rejection method. We consider GPU, CPU, and hybrid CPU/GPU implementations. For the GPU, we additionally consider two different implementations using the host and device application programming interfaces (API). We study how the performance depends on implementation parameters, including the number of threads per block and the number of blocks per streaming multiprocessor. To achieve the fastest performance, one has to minimize the time consumed by PRNG seed setup and state update. The duration of seed setup time increases with the number of threads, while PRNG state update decreases. Hence, the fastest performance is achieved by the optimal balance of these opposing effects.

CUDA , Curand , GPU , PRNG

Text of the article Перейти на текст статьи

School of Engineering and Digital Sciences, Nazarbayev University, Nur-Sultan, 010000, Kazakhstan
Energetic Cosmos Laboratory, Nazarbayev University, Nur-Sultan, 010000, Kazakhstan
Fesenkov Astrophysical Institute, Almaty, 050020, Kazakhstan
Department of Solid State Physics and Nonlinear Physics, Faculty of Physics and Technology, Al-Farabi Kazakh National University, Almaty, 050040, Kazakhstan
Department of Computer Science, Nazarbayev University, Nur-Sultan, 010000, Kazakhstan
Department of Physics, Nazarbayev University, Nur-Sultan, 010000, Kazakhstan

School of Engineering and Digital Sciences
Energetic Cosmos Laboratory
Fesenkov Astrophysical Institute
Department of Solid State Physics and Nonlinear Physics
Department of Computer Science
Department of Physics

10 лет помогаем публиковать статьи Международный издатель

Книга Публикация научной статьи Волощук 2026 Book Publication of a scientific article 2026