[GitHub] [incubator-mxnet] zixuanweeei commented on a change in pull request #17702: Support projection feature for LSTM on CPU (Only Inference)

2020-02-29 Thread GitBox
zixuanweeei commented on a change in pull request #17702: Support projection 
feature for LSTM on CPU (Only Inference)
URL: https://github.com/apache/incubator-mxnet/pull/17702#discussion_r386069714
 
 

 ##
 File path: src/operator/rnn_impl.h
 ##
 @@ -219,7 +220,10 @@ void LstmForwardInferenceSingleLayer(DType* ws,
  DType* cy_ptr) {
   using namespace mshadow;
   const Tensor wx(w_ptr, Shape2(H * 4, I));
-  const Tensor wh(w_ptr + I * H * 4, Shape2(H * 4, H));
+  const Tensor wh(w_ptr + I * H * 4, Shape2(H * 4, (P ? P : 
H)));
+  Tensor whr(w_ptr, Shape2(1, 1));
+  if (P > 0)
+whr = Tensor(wh.dptr_ + P * 4 * H, Shape2(P, H));
 
 Review comment:
   Put them into the same line, as well as L236.


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


With regards,
Apache Git Services


[GitHub] [incubator-mxnet] zixuanweeei commented on a change in pull request #17702: Support projection feature for LSTM on CPU (Only Inference)

2020-02-29 Thread GitBox
zixuanweeei commented on a change in pull request #17702: Support projection 
feature for LSTM on CPU (Only Inference)
URL: https://github.com/apache/incubator-mxnet/pull/17702#discussion_r386069647
 
 

 ##
 File path: src/operator/rnn.cc
 ##
 @@ -385,7 +399,9 @@ The definition of GRU here is slightly different from 
paper but compatible with
 })
 .set_attr("FInferShape", RNNShape)
 .set_attr("FInferType", RNNType)
+#if MXNET_USE_MKLDNN == 1
 
 Review comment:
   Done. The default storage type inference function will be executed when 
FInferStorageType is not registered.


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


With regards,
Apache Git Services


[GitHub] [incubator-mxnet] zixuanweeei commented on a change in pull request #17702: Support projection feature for LSTM on CPU (Only Inference)

2020-02-29 Thread GitBox
zixuanweeei commented on a change in pull request #17702: Support projection 
feature for LSTM on CPU (Only Inference)
URL: https://github.com/apache/incubator-mxnet/pull/17702#discussion_r386069654
 
 

 ##
 File path: src/operator/rnn.cc
 ##
 @@ -427,7 +443,9 @@ NNVM_REGISTER_OP(_backward_RNN)
 .set_attr_parser(ParamParser)
 .set_attr("TIsLayerOpBackward", true)
 .set_attr("TIsBackward", true)
+#if MXNET_USE_MKLDNN == 1
 
 Review comment:
   Done. Thanks.


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


With regards,
Apache Git Services


[GitHub] [incubator-mxnet] zixuanweeei commented on a change in pull request #17702: Support projection feature for LSTM on CPU (Only Inference)

2020-02-27 Thread GitBox
zixuanweeei commented on a change in pull request #17702: Support projection 
feature for LSTM on CPU (Only Inference)
URL: https://github.com/apache/incubator-mxnet/pull/17702#discussion_r385498649
 
 

 ##
 File path: src/operator/rnn.cc
 ##
 @@ -385,7 +382,9 @@ The definition of GRU here is slightly different from 
paper but compatible with
 })
 
 Review comment:
   Done. Please take a review again. Thanks.


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


With regards,
Apache Git Services


[GitHub] [incubator-mxnet] zixuanweeei commented on a change in pull request #17702: Support projection feature for LSTM on CPU (Only Inference)

2020-02-27 Thread GitBox
zixuanweeei commented on a change in pull request #17702: Support projection 
feature for LSTM on CPU (Only Inference)
URL: https://github.com/apache/incubator-mxnet/pull/17702#discussion_r385467427
 
 

 ##
 File path: src/operator/rnn.cc
 ##
 @@ -385,7 +382,9 @@ The definition of GRU here is slightly different from 
paper but compatible with
 })
 
 Review comment:
   Sure. Thanks for pointing out that.


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


With regards,
Apache Git Services