Pytorch Random Number Generation Algorithm

I was trying to find out what Pytorch is using for random number generation. I think I see in “THCTensorRandom.cpp” that Pytorch uses Mtgp32 from curand. Anyone know if this is correct? Thanks.

Based on this recent PR the curandStateMTGP32 usage was removed and instead curandStatePhilox seems to be used now.

1 Like

One might add that the Philox genrator has been used before, too, but now it’s the only one (for CUDA on master/nightlies).