TaoLv commented on a change in pull request #14604: [MKLDNN]Add quantized relu
URL: https://github.com/apache/incubator-mxnet/pull/14604#discussion_r274902429
##########
File path: src/operator/quantization/quantize_graph_pass.cc
##########
@@ -89,11 +89,16 @@ std::vector<NodeEntry>
OfflineParams(std::vector<NodeEntry>&& outputs,
return outputs;
}
-inline bool NeedQuantize(const NodePtr node,
- const std::unordered_set<std::string>&
excluded_nodes) {
+inline NodePtr NeedQuantize(NodePtr node, const
std::unordered_set<std::string>& excluded_nodes) {
+ std::unordered_map<NodePtr, NodePtr> quantized_node;
static auto& quantized_op_map =
Op::GetAttr<mxnet::FQuantizedOp>("FQuantizedOp");
static auto& fexec_type = nnvm::Op::GetAttr<FExecType>("FExecType");
const auto& op = node->op();
+
+ if (quantized_node.count(node)) {
Review comment:
Shouldn't `quantized_node` always be empty here?
----------------------------------------------------------------
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