diff --git a/src/operator/quantization/quantize_graph_pass.cc b/src/operator/quantization/quantize_graph_pass.cc index 676615cf0402..02e351303e25 100644 --- a/src/operator/quantization/quantize_graph_pass.cc +++ b/src/operator/quantization/quantize_graph_pass.cc @@ -122,7 +122,7 @@ Graph QuantizeGraph(Graph &&src) { static const auto& need_requantize_map = Op::GetAttr("FNeedRequantize"); static const auto& avoid_quantize_input_map = Op::GetAttr("FAvoidQuantizeInput"); - const auto offline_params = src.GetAttr>("offline_params"); + auto offline_params = src.GetAttr>("offline_params"); const auto excluded_nodes = src.GetAttr>("excluded_nodes"); const auto quantized_dtype = src.GetAttr("quantized_dtype"); @@ -312,7 +312,8 @@ Graph QuantizeGraph(Graph &&src) { } } - if (!offline_params.empty()) outputs = OfflineParams(std::move(outputs), offline_params); + if (!offline_params.empty()) outputs = + OfflineParams(std::move(outputs), std::move(offline_params)); Graph ret; ret.outputs = std::move(outputs);