clpy icon indicating copy to clipboard operation
clpy copied to clipboard

cuRAND replacement

Open LWisteria opened this issue 6 years ago • 1 comments

Current random generator is too simple and poor.

We need to replace cuRAND.

LWisteria avatar Jul 11 '18 09:07 LWisteria

cupyとcuRANDをざっと見る限り、XORSHIFTを実装すれば良さそう。なお、cupy側としてはcuRANDのどのアルゴも呼べるようにしてある。

ref:

  • https://github.com/cupy/cupy/blob/master/tests/cupy_tests/cuda_tests/test_curand.py
  • https://github.com/cupy/cupy/blob/f94c699831b16afad273aa3ecfe302147a8984e6/cupy/random/generator.py#L47
  • https://docs.nvidia.com/cuda/curand/group__HOST.html (When rng_type is CURAND_RNG_PSEUDO_DEFAULT, the type chosen is CURAND_RNG_PSEUDO_XORWOW)

yuk-to avatar Aug 02 '18 03:08 yuk-to