GPUs and Random Number Generation

>> Sunday, November 20, 2011

I had a great time at SC11 and I learned a lot about the current state of high-performance computing. I enjoyed meeting people who work in the industry, which included academics, developers, salesmen, and a few readers of this blog (Hello John and Jamie).

One mysterious man came to my booth and asked what I knew about generating random numbers with OpenCL. I told him about implementations of the Mersenne Twister, but he wasn't impressed. He told me about a new technical paper that explains how to generate random numbers on GPUs by combining integer counters and block ciphers. In reverential tones, he said that counter-based random number generators (CBRNGs) produce numbers with greater statistical randomness than the MT and with much greater speed.

I promised to look into the matter, and I have. The paper can be downloaded here, and though I did my best, I don't have the cryptography background needed to fully grasp the theory. However, the paper was a finalist in SC11's Best Paper competition, so it's been subjected to scrutiny by folks a lot smarter than me.

In addition to writing the paper, Dr. Salmon has made his code freely available, including an implementation in OpenCL. The full code release is here and the documentation is here. I don't need to generate random numbers at the moment, but if ever I do, this is the first place I'll go.

Post a Comment

  © Blogger template Werd by Ourblogtemplates.com 2009

Back to TOP