Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[Refactor] C random number generator #729
This PR replaces
Each OpenMP thread would get its own random number generator associated with the thread ID.
New C++ interfaces:
New Python interface:
EDIT: moved to the thread-local style of TVM, hence changing the C++ interface.
Please feel free to remove inapplicable items for your PR.
I think concurrency and rng are two things. If a user want to get a deterministic result, s/he should set the number of workers to be one and fix the seed. Otherwise, the behavior may or may not be non-deterministic (undefined), making implementation easier. I don't like the idea of coupling RNG with omp, they are two things. My suggestion: