anirudh2290 commented on a change in pull request #11778: [MXNET-483] C++ tests 
for mkldnn convolution/deconvolution operator
URL: https://github.com/apache/incubator-mxnet/pull/11778#discussion_r234801126
 
 

 ##########
 File path: src/operator/nn/mkldnn/mkldnn_deconvolution.cc
 ##########
 @@ -264,11 +265,13 @@ void MKLDNNDeconvForward::SetDataHandle(const 
DeconvolutionParam& param,
       weight_mem = GetWeights(weight, fwd_pd.weights_primitive_desc(), 
param.num_group);
       // We also need to modify the layout on the original weight array. The
       // data conversion happens after the weight array is used.
-      weight.MKLDNNDataReorderAsync(fwd_pd.weights_primitive_desc());
+      
const_cast<NDArray&>(weight).MKLDNNDataReorderAsync(fwd_pd.weights_primitive_desc());
     } else {
       weight_mem = weight.GetMKLDNNData();
       CHECK(weight_mem->get_primitive_desc() == 
fwd_pd.weights_primitive_desc());
     }
+    weight_mem = weight.GetMKLDNNData();
+    CHECK(weight_mem->get_primitive_desc() == fwd_pd.weights_primitive_desc());
 
 Review comment:
   do we need else if these two lines are going to execute irrespective

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to