One random number generator per GPU.

Instead of having a single generator shared between GPUs, create a seperate
generator for each GPU. A generator is only initialized when the corresponding
GPU is being used.