This is an automated email from the ASF dual-hosted git repository.
bgawrych pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push:
new 1dba76998d Diversify default RNG seed (#21058)
1dba76998d is described below
commit 1dba76998de3584bfa98c05989845ac08db2079a
Author: bartekkuncer <[email protected]>
AuthorDate: Tue Jun 21 10:23:18 2022 +0200
Diversify default RNG seed (#21058)
* Differentiate default RNG seed
* Fix clang
---
src/resource.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/resource.cc b/src/resource.cc
index 010481f322..e746dda3bf 100644
--- a/src/resource.cc
+++ b/src/resource.cc
@@ -494,7 +494,7 @@ class ResourceManagerImpl : public ResourceManager {
/*! \brief Reference to the storage */
std::shared_ptr<Storage> storage_ref_;
/*! \brief internal seed to the random number generator */
- uint32_t global_seed_{0};
+ uint32_t global_seed_{static_cast<uint32_t>(time(nullptr))};
/*! \brief CPU random number resources */
std::unique_ptr<ResourceRandom<cpu>> cpu_rand_;
/*! \brief CPU temp space resources */