bgawrych commented on code in PR #21047:
URL: https://github.com/apache/incubator-mxnet/pull/21047#discussion_r906056223


##########
src/operator/subgraph/dnnl/dnnl_fc.cc:
##########
@@ -112,104 +128,54 @@ void SgDNNLFCOp::Forward(const OpContext& ctx,
   const int out_max_index = out_quantized ? index++ : 0;
   CHECK_EQ(out_data.size(), index);  // index is equal to total number of 
outputs
 
-  float data_min   = 0.0f;
-  float data_max   = 0.0f;
-  float weight_min = 0.0f;
-  float weight_max = 0.0f;
-  float bias_min   = 0.0f;
-  float bias_max   = 0.0f;
+  std::vector<float> minmaxvec(8);

Review Comment:
   done



##########
src/operator/subgraph/dnnl/dnnl_fc.cc:
##########
@@ -112,104 +128,54 @@ void SgDNNLFCOp::Forward(const OpContext& ctx,
   const int out_max_index = out_quantized ? index++ : 0;
   CHECK_EQ(out_data.size(), index);  // index is equal to total number of 
outputs
 
-  float data_min   = 0.0f;
-  float data_max   = 0.0f;
-  float weight_min = 0.0f;
-  float weight_max = 0.0f;
-  float bias_min   = 0.0f;
-  float bias_max   = 0.0f;
+  std::vector<float> minmaxvec(8);
+  minmaxvec[kDataMin]   = 0.0f;
+  minmaxvec[kDataMax]   = 0.0f;
+  minmaxvec[kWeightMin] = 0.0f;
+  minmaxvec[kWeightMax] = 0.0f;
+  minmaxvec[kBiasMin]   = 0.0f;
+  minmaxvec[kBiasMax]   = 0.0f;
 
-  const float sum_min   = idx.sum_min ? 
in_data[idx.sum_min].data().dptr<float>()[0] : 0.0;
-  const float sum_max   = idx.sum_max ? 
in_data[idx.sum_max].data().dptr<float>()[0] : 0.0;
+  minmaxvec[kSumMin]    = idx.sum_min ? 
in_data[idx.sum_min].data().dptr<float>()[0] : 0.0;

Review Comment:
   done



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to