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/06/12 20:10:52 UTC

[GitHub] eric-haibin-lin commented on a change in pull request #11129: [MXNET-497]Test kAddTo request for mkldnn operators

eric-haibin-lin commented on a change in pull request #11129: [MXNET-497]Test kAddTo request for mkldnn operators
URL: https://github.com/apache/incubator-mxnet/pull/11129#discussion_r194872573
 
 

 ##########
 File path: src/common/exec_utils.h
 ##########
 @@ -98,10 +98,13 @@ inline bool SetupDefaultBlobsOut(const std::vector<NDArray>& src,
     is_default = nd.IsDefaultData();
 #endif
     if (!is_default) {
-      NDArray temp = bufs != nullptr ? bufs->at(i) : NDArray(nd.shape(), nd.ctx(),
-                                                             true, nd.dtype());
 #if MXNET_USE_MKLDNN == 1
+        NDArray temp = bufs != nullptr ? bufs->at(i) : nd.IsMKLDNNData() ?
+            nd.Reorder2Default() : NDArray(nd.shape(), nd.ctx(), true, nd.dtype());
       CHECK(temp.IsDefaultData());
+#else
+      NDArray temp = bufs != nullptr ? bufs->at(i) : NDArray(nd.shape(), nd.ctx(),
+          true, nd.dtype());
 
 Review comment:
   Yes. The executor won't generate kAddTo for sparse outputs. Sparse operators don't support that

----------------------------------------------------------------
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