Random Number Generation on the GPU

It might have been a temporary bug. I’ve tried it since then and got no errors. This is version 0.51.2.
That being said, I do have a follow up question though I’m not sure if I should create a new topic.

I have a 3D array of size 701x900x719 (X, Y, Z) and a certain amount of voxels considered “grey” that I have to change into “black” or “white”.

I’m not sure how to use create_xoroshiro128p_states in this situation. I think I only need at most as many RNG states as grey voxels so, with ending_greys being the amount of grey voxels, I’m doing:

create_xoroshiro128p_states(ending_greys.item(), seed=1)

I’m using grid(3) to get the thread’s position and xoroshiro128p_uniform_float32 to get the next value. From the example in the documentation, xoroshiro128p_uniform_float32(rng_states, thread_id) with thread_id = cuda.grid(1).
How would I go about doing this with grid(3) instead?