apeforest commented on a change in pull request #17547: Fix cudnn Dropout
reproducibility
URL: https://github.com/apache/incubator-mxnet/pull/17547#discussion_r382967938
##########
File path: 3rdparty/mshadow/mshadow/random.h
##########
@@ -404,8 +404,16 @@ class Random<gpu, DType> {
// Now set the seed.
curandStatus_t status;
status = curandSetPseudoRandomGeneratorSeed(gen_,
static_cast<uint64_t>(seed));
+ this->rseed_ = static_cast<unsigned>(seed);
CHECK_EQ(status, CURAND_STATUS_SUCCESS) << "Set CURAND seed failed.";
}
+ /*!
+ * \brief get random seed used in random generator
+ * \return seed in unsigned
+ */
+ inline unsigned GetSeed() const {
Review comment:
Why can't we just use uint64_t as the data type for rseed_?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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