You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CSPRNG generates a random 128-bits key on CPU using one of its generators and runs
10
+
[AES128](https://en.wikipedia.org/wiki/Advanced_Encryption_Standard) in [CTR mode](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Counter_(CTR))
11
+
mode either on CPU or CUDA to generate random 128 bits state and apply transformation function to map it to target tensor values.
12
+
This approach is based on [Parallel Random Numbers: As Easy as 1, 2, 3(John K. Salmon, Mark A. Moraes, Ron O. Dror, and David E. Shaw, D. E. Shaw Research)](http://www.thesalmons.org/john/random123/papers/random123sc11.pdf).
13
+
It makes CSPRNG both crypto-secure and parallel on CUDA and CPU.
| create_random_device_generator()| yes | no|[std::random_device](https://en.cppreference.com/w/cpp/numeric/random/random_device) created with default constructor |
30
+
| create_random_device_generator_with_token(token: string) | yes | no |[std::random_device](https://en.cppreference.com/w/cpp/numeric/random/random_device) created with a token(e.g. "/dev/urandom")|
31
+
| create_mt19937_generator()| no | yes|[std::mt19937](https://en.cppreference.com/w/cpp/numeric/random/mersenne_twister_engine) created with default constructor |
32
+
| create_mt19937_generator_with_seed(seed: int)| no | yes|[std::mt19937](https://en.cppreference.com/w/cpp/numeric/random/mersenne_twister_engine) created with a seed |
17
33
18
34
The following list of methods supports all forementioned PRNGs:
0 commit comments