3 ms·
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 ma
by nestorD 6y ago
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/random123sc11.pdf http://www.thesalmons.org/john/random123/papers/random123sc1...
- mratsim 6y agoI'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 https://github.com/mratsim/weave/issues/147 - [2] https://github.com/mratsim/trace-of-radiance/blob/99f7d85/trace_of_radiance/support/rng.nim#L21-L53 https://github.com/mratsim/trace-of-radiance/blob/99f7d85/tr... - Usage for parallel raytracing: https://github.com/mratsim/trace-of-radiance/blob/99f7d85/trace_of_radiance/render.nim#L55-L60 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 http://supertech.csail.mit.edu/papers/dprng.pdf - https://pdfs.semanticscholar.org/a32c/3b7b8d5d3ebd594bea2d9c0935c1ac7f8e24.pdf https://pdfs.semanticscholar.org/a32c/3b7b8d5d3ebd594bea2d9c... And Haskell's splittable RNG: - http://www.hg.schaathun.net/research/Papers/hgs2015jfp.pdf http://www.hg.schaathun.net/research/Papers/hgs2015jfp.pdf - http://publications.lib.chalmers.se/records/fulltext/183348/local_183348.pdf http://publications.lib.chalmers.se/records/fulltext/183348/... - http://gee.cs.oswego.edu/dl/papers/oopsla14.pdf http://gee.cs.oswego.edu/dl/papers/oopsla14.pdf
- logos01 6y ago100% 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-generators/ https://chasethedevil.github.io/post/more-on-random-number-g...