From 5f1b193a6d392b0777fabdcf88d9abd3103d5a3f Mon Sep 17 00:00:00 2001 From: baoachun <962571062@qq.com> Date: Mon, 25 Oct 2021 14:14:58 +0800 Subject: [PATCH] fix nullptr block in op_teller (#36622) --- paddle/fluid/framework/ir/quant_conv2d_dequant_fuse_pass.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/paddle/fluid/framework/ir/quant_conv2d_dequant_fuse_pass.cc b/paddle/fluid/framework/ir/quant_conv2d_dequant_fuse_pass.cc index 5958728946..1864899b07 100644 --- a/paddle/fluid/framework/ir/quant_conv2d_dequant_fuse_pass.cc +++ b/paddle/fluid/framework/ir/quant_conv2d_dequant_fuse_pass.cc @@ -548,7 +548,8 @@ void QuantDequantFusePass::FuseDequant(ir::Graph* graph, Scope* scope, std::string new_input = quantized_op_input_node->Name(); std::string new_output = dequant_op_out_node->Name(); - framework::OpDesc new_op_desc(base_op_desc, nullptr); + framework::OpDesc new_op_desc(base_op_desc, + quantized_op_node->Op()->Block()); new_op_desc.SetType(quantized_op_type); new_op_desc.SetAttr("enable_int8", true); if (quantized_op_type == "conv2d" || quantized_op_type == "conv2d_fusion" || -- GitLab