Vector of random number generators - Parallel random number generators #2305
Replies: 1 comment
-
It's unclear to me at what level of parallelism you need multiple RNGs. If you want to this in a kernel, that's currently not possible; you can only use a single seed throughout the (implicitly) global RNG that you can use in a kernel. Every thread will still generate different numbers, of course, but they will be derived from a single seed. Why do you need multiple RNGs though? Why isn't it sufficient to just call
From the host, you can of course maintain multiple copies of CUDA's |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I'm currently working in Montecarlo simulations in my GPU. I need to parallelize my simulations, so I need to set a random number generator for each simulation. My idea is to instantiate a CuArray with N random number generators (like MersenneTwister or Xoroshiro).
In Numba, there is a function for that: numba.cuda.random.create_xoroshiro128p_states(n, seed, subsequence_start=0, stream=0) (see https://numba.pydata.org/numba-doc/0.36.1/cuda/random.html).
In CUDA.jl, I cannot find a similar function for this purpose. Even more, I don't know how to set a single random generator.
Does anyone have faced this problem? Any support will be apreciated.
Regards!
Beta Was this translation helpful? Give feedback.
All reactions