zheng-da 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_r194808938
 
 

 ##########
 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:
   sparse arrays doesn't have kAddTo? @eric-haibin-lin 

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