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/11/06 23:06:37 UTC

[GitHub] zheng-da commented on a change in pull request #11778: [MXNET-483] C++ tests for mkldnn convolution/deconvolution operator

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

 ##########
 File path: src/operator/nn/mkldnn/mkldnn_deconvolution.cc
 ##########
 @@ -197,32 +198,20 @@ MKLDNNDeconvForward::MKLDNNDeconvForward(const DeconvolutionParam& param,
 
 void MKLDNNDeconvForward::SetDataHandle(const DeconvolutionParam& param,
                                         const OpContext &ctx,
-                                        const std::vector<NDArray> &in_data,
+                                        const NDArray &in_data,
+                                        const NDArray &weight,
                                         const std::vector<OpReqType> &req,
                                         const std::vector<NDArray> &out_data) {
-  auto data_mem = in_data[deconv::kData].GetMKLDNNDataReorder(
+  auto data_mem = in_data.GetMKLDNNDataReorder(
       fwd_pd.diff_dst_primitive_desc());
-  NDArray weight = in_data[deconv::kWeight];
   const mkldnn::memory *weight_mem;
   if (ctx.is_train) {
-    // TODO(zhengda) kvstore doesn't handle MKLDNN correctly. Let's reorder it
-    // to the default format for now.
-    if (weight.IsMKLDNNData())
-      // This asks the engine to reorder data after the weight array is used.
-      weight.Reorder2DefaultAsync();
 
 Review comment:
   we want to reorder the layout here. Weights in the kvstore use the default layout.

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