You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/05/20 04:26:19 UTC

[GitHub] szha commented on a change in pull request #11004: Only allocate cudnn-rnn dropout memory if dropout p > 0 and acquire descriptors during initialization

szha commented on a change in pull request #11004: Only allocate cudnn-rnn dropout memory if dropout p > 0 and acquire descriptors during initialization
URL: https://github.com/apache/incubator-mxnet/pull/11004#discussion_r189450853
 
 

 ##########
 File path: src/operator/cudnn_rnn-inl.h
 ##########
 @@ -446,20 +456,19 @@ class CuDNNRNNOp : public Operator{
                                             strideA));
 
       // Create Dropout descriptors
-      CUDNN_CALL(cudnnCreateDropoutDescriptor(&dropout_desc_));
       CUDNN_CALL(cudnnDropoutGetStatesSize(s->dnn_handle_,
                                            &dropout_byte_));
-      dropout_size_ = dropout_byte_ / sizeof(DType);
-      dropout_states_ = Storage::Get()->Alloc(dropout_byte_, Context::GPU());
+      if (param_.p > 0) {
 
 Review comment:
   is it necessary to get dropout state bytes if `param_.p` is 0?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services