haojin2 commented on a change in pull request #12541: [MXNET-936] [WIP] [DO NOT 
REVIEW] Support projection and clip in CuDNN LSTM
URL: https://github.com/apache/incubator-mxnet/pull/12541#discussion_r217230427
 
 

 ##########
 File path: src/operator/cudnn_rnn-inl.h
 ##########
 @@ -498,6 +498,16 @@ class CuDNNRNNOp : public Operator{
         }
         CUDNN_CALL(cudnnSetRNNMatrixMathType(rnn_desc_, math_type));
       #endif
+      if (param_.projection_size.has_value()) {
+      #if (CUDNN_MAJOR == 7 && CUDNN_MINOR >= 1) || CUDNN_MAJOR > 7
+        CUDNN_CALL(cudnnSetRNNProjectionLayers(s->dnn_handle_,
+                                               rnn_desc_,
+                                               param_.projection_size.value(),
+                                               0));
+      #else
+        LOG(FATAL) << "Projection is only available with later than CuDNN 
7.1.1";
 
 Review comment:
   Okay

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


With regards,
Apache Git Services

Reply via email to