未验证 提交 9c561663 编写于 作者: C cc 提交者: GitHub

skip fusing quantized conv2d + relu6 for now, test=develop (#2952)

skip fusing quantized conv2d + relu6 for now
上级 ac33c4c7
......@@ -53,6 +53,14 @@ void ConvActivationFuser::BuildPattern() {
void ConvActivationFuser::InsertNewNode(SSAGraph* graph,
const key2nodes_t& matched) {
// not fuse quantized conv2d + relu6 for now
auto conv2d_op_desc = matched.at("conv2d")->stmt()->op_info();
bool is_conv2d_quantized = conv2d_op_desc->HasAttr("enable_int8") &&
conv2d_op_desc->GetAttr<bool>("enable_int8");
if (act_type_ == "relu6" && is_conv2d_quantized) {
return;
}
auto op_desc = GenOpDesc(matched);
auto conv_op = LiteOpRegistry::Global().Create(conv_type_);
auto conv_old = matched.at("conv2d")->stmt()->op();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册