eric-haibin-lin commented on a change in pull request #12530: Implement mkldnn 
convolution fusion and quantization.
URL: https://github.com/apache/incubator-mxnet/pull/12530#discussion_r220069243
 
 

 ##########
 File path: src/operator/quantization/quantize_graph_pass.cc
 ##########
 @@ -89,17 +89,43 @@ std::vector<NodeEntry> 
OfflineParams(std::vector<NodeEntry>&& outputs,
   return outputs;
 }
 
-inline bool NeedQuantize(NodePtr node, const std::unordered_set<NodePtr> 
excluded_nodes) {
-  static auto& quantized_op_map = 
Op::GetAttr<mxnet::FQuantizedOp>("FQuantizedOp");
-  return quantized_op_map.count(node->op()) && !excluded_nodes.count(node);
+inline bool NeedQuantize(NodePtr node,
+                         const std::unordered_set<std::string> excluded_nodes) 
{
 
 Review comment:
   Use const reference to save a copy

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