From 7d1819b96a78297967037bc6acac8a9dd7f1118e Mon Sep 17 00:00:00 2001 From: Wangzheee <634486483@qq.com> Date: Tue, 11 Oct 2022 16:14:43 +0800 Subject: [PATCH] recover_skip_quant (#46889) --- paddle/fluid/inference/tensorrt/op_teller.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/paddle/fluid/inference/tensorrt/op_teller.cc b/paddle/fluid/inference/tensorrt/op_teller.cc index 18db0944f26..d109fb051ec 100644 --- a/paddle/fluid/inference/tensorrt/op_teller.cc +++ b/paddle/fluid/inference/tensorrt/op_teller.cc @@ -2409,6 +2409,12 @@ bool OpTeller::Tell(const framework::ir::Node* node, bool with_dynamic_shape) { const std::string op_type = node->Op()->Type(); const framework::OpDesc desc = *node->Op(); + // do not support the op which is labeled the `skip_quant` + if ((desc.HasAttr("namescope") && + PADDLE_GET_CONST(std::string, desc.GetAttr("op_namescope")) == + "/skip_quant_2/") || + desc.HasAttr("skip_quant")) + return false; auto& default_teller = GetDefaultTeller(); if ((*default_teller)(desc, use_no_calib_int8, with_dynamic_shape)) { SetOpConverterType(op_type, OpConverterType::Default); -- GitLab