lebeg commented on a change in pull request #13574: Replaced rand_r with std::
random generation
URL: https://github.com/apache/incubator-mxnet/pull/13574#discussion_r239790703
##########
File path: src/operator/rnn_impl.h
##########
@@ -1890,7 +1896,11 @@ void VanillaRNNForwardTraining(DType* ws,
if (dropout > 0.0f && l > 0) {
#pragma omp parallel for num_threads(omp_threads)
for (int i = 0; i < T * N * I; i++) {
- int rand_data = rand_r(&seed_);
+ static thread_local std::random_device device;
Review comment:
I'm not sure where to put it, do you have any suggestions?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services