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 2019/06/28 02:42:20 UTC

[GitHub] [incubator-mxnet] wuxun-zhang commented on a change in pull request #15351: fix fp32 flatten issue

wuxun-zhang commented on a change in pull request #15351: fix fp32 flatten issue
URL: https://github.com/apache/incubator-mxnet/pull/15351#discussion_r298435204
 
 

 ##########
 File path: src/operator/tensor/matrix_op.cc
 ##########
 @@ -233,12 +234,8 @@ static void FlattenEx(const nnvm::NodeAttrs& attrs,
   CHECK_EQ(inputs.size(), 1U);
   CHECK_EQ(outputs.size(), 1U);
 #if MXNET_USE_MKLDNN == 1
-  if (inputs[0].IsMKLDNNData()) {
-    MKLDNNCopy(attrs, ctx, inputs[0], req[0], outputs[0]);
-    // If the output is a special MKLDNN layout and the number of dimensions
-    // is larger than 2, we should use the default layout.
-    if (outputs[0].IsMKLDNNData() && inputs[0].shape().ndim() > 2)
-      const_cast<NDArray &>(outputs[0]).Reorder2Default();
+  if (SupportMKLDNNArray(inputs[0].dtype(), inputs[0].shape())) {
 
 Review comment:
   Yes, you're right.

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


With regards,
Apache Git Services