Hi,
I'm curious about the use of cupy.random.Generator to construct a random number generator. In numpy, it seems like the best practice is to construct a random number generator with rng=np.random.default_rng(seed) and to pass that to stochastic functions. Doing so appears to be more efficient than using functions in np.random. With the equivalent in cupy, however, there appears to be a significant loss in performance.
I'm currently testing the following:
rng = cp.random.default_rng()
rng.standard_normal(size=(100, 100, 100))
compared to
cp.random.standard_normal(size=(100, 100, 100))
The latter appears to be an order of magnitude slower.
Any ideas why this is the case?