You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working with random generated array and need to regenerate the same array multiple time. So I need to reset the seed and redraw, however, CUDA.seed! is almost a thousand time slower than Random.seed! making performance-wsie unusable.
As I said on Slack (please don't double-post like this), this is CURAND itself taking a while to initialize its randomness. We could hide it from the call to seed! by not calling curandGenerateSeeds, but as you notice here that would just make curandGenerateNormal slow. Except for reimplementing a RNG in Julia, I don't see an easy fix for this.
For the record, on my more recent GPU it takes about 1ms.
Since this is an issue with CURAND, we can't solve it there. Instead, we now have a new (WIP) native Julia RNG, which is much quicker to seed. So please have a look at #788 and improve it where necessary for your use case.
Describe the bug
I am working with random generated array and need to regenerate the same array multiple time. So I need to reset the seed and redraw, however,
CUDA.seed!
is almost a thousand time slower thanRandom.seed!
making performance-wsie unusable.Is there a reason why it is so slow?
To reproduce
The Minimal Working Example (MWE) for this bug:
This speed is still there at low level CURAND as well
Expected behavior
I know random generators are tricky so I don't expect it to be better than on GPU but at least some similar performance would be expected.
Version info
Details on Julia:
Details on CUDA:
The text was updated successfully, but these errors were encountered: