apeforest commented on a change in pull request #17547: Fix cudnn Dropout
reproducibility
URL: https://github.com/apache/incubator-mxnet/pull/17547#discussion_r382968025
##########
File path: src/operator/nn/dropout-inl.h
##########
@@ -255,8 +255,13 @@ class DropoutOp {
Stream<xpu> *s = ctx.get_stream<xpu>();
// set dropout state.
- ctx.requested[0].get_cudnn_dropout_desc(&dropout_desc_, s, 1.0f -
this->pkeep_, seed_);
-
+ Random<xpu, unsigned> *prnd = ctx.requested[1].get_random<xpu,
unsigned>(s);
+ uint64_t rng_seed = (uint64_t) prnd->GetSeed();
Review comment:
If GetSeed() returns uint64_t you don't need the cast here
----------------------------------------------------------------
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