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/10/28 02:02:07 UTC

[GitHub] [incubator-mxnet] rongzha1 commented on a change in pull request #16623: [mkldnn-v1.0]rm int8 sum workaround

rongzha1 commented on a change in pull request #16623: [mkldnn-v1.0]rm int8 sum workaround
URL: https://github.com/apache/incubator-mxnet/pull/16623#discussion_r339382116
 
 

 ##########
 File path: src/operator/quantization/mkldnn/mkldnn_quantized_elemwise_add.cc
 ##########
 @@ -161,8 +161,14 @@ static void MKLDNNQuantizedElemwiseAddForward(const nnvm::NodeAttrs& attrs, cons
   std::vector<mkldnn::memory::desc> in_desc;
   in_desc.push_back(dataA_mem->get_desc());
   in_desc.push_back(dataB_mem->get_desc());
-  auto output_desc = dataA_mem->get_desc();
-  output_desc.data.data_type = static_cast<mkldnn_data_type_t>(output_data_type);
+  size_t i_ndim = in_data[quantized_elemwise_add_enum::kDataA].shape().ndim();
+  mkldnn::memory::dims i_dims = mkldnn::memory::dims(i_ndim);
+  for (size_t i = 0; i < i_ndim; i++) {
+    i_dims[i] = static_cast<int>(in_data[quantized_elemwise_add_enum::kDataA].shape()[i]);
 
 Review comment:
   Thanks for your comments. Will change it Now

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