Hacker News new | past | comments | ask | show | jobs | submit login

On random numbers, I found the ideas behind "Parallel Random Numbers: As Easy as 1, 2, 3" [0] (which is implemented in JAX) interesting. Their generator is a mapping between keys and random numbers which get rid of the sequential dependency in the generator making it very easy to run in parallel at a GPU scale.

[0]: http://www.thesalmons.org/john/random123/papers/random123sc1...




I've been diving into parallel reproducible PRNG [1] in the end I choose to have a PRNG based on xoshiro and seeding process that could take loop iteration variables [2] for reproducibility:

- [1] https://github.com/mratsim/weave/issues/147

- [2] https://github.com/mratsim/trace-of-radiance/blob/99f7d85/tr...

- Usage for parallel raytracing: https://github.com/mratsim/trace-of-radiance/blob/99f7d85/tr...

Beyond the JAX paper, the Pedigree-based RNG from Leiserson was interesting as well:

- http://supertech.csail.mit.edu/papers/dprng.pdf

- https://pdfs.semanticscholar.org/a32c/3b7b8d5d3ebd594bea2d9c...

And Haskell's splittable RNG:

- http://www.hg.schaathun.net/research/Papers/hgs2015jfp.pdf

- http://publications.lib.chalmers.se/records/fulltext/183348/...

- http://gee.cs.oswego.edu/dl/papers/oopsla14.pdf


100% agree. You can also use chacha or aes the same way. I like it. I wonder however if some streams may not be too extreme with those.

https://chasethedevil.github.io/post/more-on-random-number-g...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: