Advertisement

High-Performance Pseudo-Random Number Generation on Graphics Processing Units

  • Nimalan Nandapalan
  • Richard P. Brent
  • Lawrence M. Murray
  • Alistair P. Rendell
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7203)

Abstract

This work considers the deployment of pseudo-random number generators (PRNGs) on graphics processing units (GPUs), developing an approach based on the xorgens generator to rapidly produce pseudo-random numbers of high statistical quality. The chosen algorithm has configurable state size and period, making it ideal for tuning to the GPU architecture. We present a comparison of both speed and statistical quality with other common GPU-based PRNGs, demonstrating favourable performance of the xorgens-based approach.

Keywords

Pseudo-random number generation graphics processing units Monte Carlo 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Andrieu, C., Doucet, A., Holenstein, R.: Particle Markov chain Monte Carlo methods. Journal of the Royal Statistical Society Series B 72, 269–302 (2010)MathSciNetCrossRefGoogle Scholar
  2. 2.
    Brent, R.P.: xorgens version 3.05 (2008), http://maths.anu.edu.au/~brent/random.html
  3. 3.
    Brent, R.P.: Some long-period random number generators using shifts and xors. ANZIAM Journal 48 (2007)Google Scholar
  4. 4.
    Doucet, A., de Freitas, N., Gordon, N. (eds.): Sequential Monte Carlo Methods in Practice. Springer (2001)Google Scholar
  5. 5.
    Gilks, W., Richardson, S., Spiegelhalter, D. (eds.): Markov chain Monte Carlo in practice. Chapman and Hall (1995)Google Scholar
  6. 6.
    Hoberock, J., Bell, N.: Thrust: A parallel template library (2010), http://thrust.googlecode.com
  7. 7.
    Howes, L., Thomas, D.: Efficient Random Number Generation and Application Using CUDA. GPU Gems 3. Addison-Wesley (2007)Google Scholar
  8. 8.
    Langdon, W.: A fast high quality pseudo random number generator for NVIDIA CUDA. In: Proceedings of the 11th Annual Conference Companion on Genetic and Evolutionary Computation Conference: Late Breaking Papers. pp. 2511–2514. ACM (2009)Google Scholar
  9. 9.
    L’Ecuyer, P., Simard, R.: TestU01: A C library for empirical testing of random number generators. ACM Transactions on Mathematical Software 33 (2007)Google Scholar
  10. 10.
    Leopardi, P.: Testing the tests: using random number generators to improve empirical tests. In: Monte Carlo and Quasi-Monte Carlo Methods 2008, pp. 501–512 (2009)Google Scholar
  11. 11.
    Marsaglia, G.: DIEHARD: a battery of tests of randomness (1996), http://stat.fsu.edu/~geo/diehard.html
  12. 12.
    Marsaglia, G.: Xorshift RNGs. Journal of Statistical Software 8(14), 1–6 (2003)Google Scholar
  13. 13.
    Matsumoto, M., Nishimura, T.: Mersenne twister: A 623-dimensionally equidistributed uniform pseudorandom number generator. ACM Transactions on Modeling and Computer Simulation 8, 3–30 (1998)zbMATHCrossRefGoogle Scholar
  14. 14.
    Murray, L.M.: GPU acceleration of Runge-Kutta integrators. IEEE Transactions on Parallel and Distributed Systems 23, 94–101 (2012)CrossRefGoogle Scholar
  15. 15.
    Murray, L.M.: GPU acceleration of the particle filter: The Metropolis resampler. In: DMMD: Distributed Machine Learning and Sparse Representation with Massive Data Sets (2011)Google Scholar
  16. 16.
    NVIDIA Corp: CUDA Compute Unified Device Architecture Programming Guide Version 3.2. NVIDIA Corp., Santa Clara, CA 95050 (2010)Google Scholar
  17. 17.
    NVIDIA Corp: CUDA CURAND Library. NVIDIA Corporation (2010)Google Scholar
  18. 18.
    Phillips, C.L., Anderson, J.A., Glotzer, S.C.: Pseudo-random number generation for Brownian dynamics and dissipative particle dynamics simulations on GPU devices. Journal of Computational Physics 230(19), 7191–7201 (2011), http://www.sciencedirect.com/science/article/pii/S0021999111003329 zbMATHCrossRefGoogle Scholar
  19. 19.
    Saito, M.: A variant of Mersenne Twister suitable for graphic processors (2011), http://arxiv.org/abs/1005.4973
  20. 20.
    Sussman, M., Crutchfield, W., Papakipos, M.: Pseudorandom number generation on the GPU. In: Proceedings of the 21st ACM SIGGRAPH/EUROGRAPHICS Symposium on Graphics Hardware, pp. 87–94. ACM, New York (2006), http://dl.acm.org/citation.cfm?id=1283900.1283914 Google Scholar
  21. 21.
    Tzeng, S., Wei, L.: Parallel white noise generation on a GPU via cryptographic hash. In: Proceedings of the 2008 Symposium on Interactive 3D Graphics and Games, pp. 79–87. ACM (2008)Google Scholar
  22. 22.
    Zafar, F., Olano, M., Curtis, A.: GPU random numbers via the tiny encryption algorithm. In: Proceedings of the Conference on High Performance Graphics, pp. 133–141. Eurographics Association, Aire-la-Ville (2010), http://dl.acm.org/citation.cfm?id=1921479.1921500 Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Nimalan Nandapalan
    • 1
  • Richard P. Brent
    • 1
    • 2
  • Lawrence M. Murray
    • 3
  • Alistair P. Rendell
    • 1
  1. 1.Research School of Computer ScienceThe Australian National UniversityAustralia
  2. 2.Mathematical Sciences InstituteThe Australian National UniversityAustralia
  3. 3.CSIRO MathematicsInformatics and StatisticsAustralia

Personalised recommendations