ciyongch commented on a change in pull request #17707: [MKLDNN] Remove overhead 
of sg_mkldnn_fullyconnected op
URL: https://github.com/apache/incubator-mxnet/pull/17707#discussion_r386173845
 
 

 ##########
 File path: src/operator/subgraph/mkldnn/mkldnn_fc.cc
 ##########
 @@ -143,20 +138,11 @@ void SgMKLDNNFCOp::Forward(const OpContext &ctx,
     }
     min_data = in_data[base_num_inputs + 
quantized_fullc::kDataMin].data().dptr<float>()[0];
     max_data = in_data[base_num_inputs + 
quantized_fullc::kDataMax].data().dptr<float>()[0];
-    if (!mkldnn_param.enable_float_output) {
-      total_num_outputs = base_num_outputs * 3;
-    }
   }
-  CHECK_EQ(in_data.size(), total_num_inputs);
-  CHECK_EQ(out_data.size(), total_num_outputs);
-
-  NDArray data = in_data[fullc::kData];
-  NDArray weight = in_data[fullc::kWeight];
-  NDArray output = out_data[fullc::kOut];
-  MKLDNNFCFlattenData(default_param, &data);
 
-  if (initialized_ && mkldnn_param.quantized) {
-    if (channel_wise) {
+  if (initialized_ && mkldnn_param.quantized &&
+      dmlc::GetEnv("MXNET_MKLDNN_QFC_DYNAMIC_PARAMS", 0)) {
 
 Review comment:
   Yes, I think this env var could be removed in the future once the time 
consuming operation of `weight_ver_ != weight.version()` is resolved.

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


With regards,
Apache Git Services

Reply via email to