From cd21ea872c9e54c449986a1e7bf46edc84786432 Mon Sep 17 00:00:00 2001 From: andyjpaddle Date: Fri, 6 May 2022 11:56:00 +0000 Subject: [PATCH] fix rec v3 mkldnn irpass --- deploy/cpp_infer/src/ocr_rec.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deploy/cpp_infer/src/ocr_rec.cpp b/deploy/cpp_infer/src/ocr_rec.cpp index f0adfcf0..298b16bf 100644 --- a/deploy/cpp_infer/src/ocr_rec.cpp +++ b/deploy/cpp_infer/src/ocr_rec.cpp @@ -166,6 +166,10 @@ void CRNNRecognizer::LoadModel(const std::string &model_dir) { config.SetCpuMathLibraryNumThreads(this->cpu_math_library_num_threads_); } + // 得到 pass_builder 对象 + auto pass_builder = config.pass_builder(); + // 在 IR 优化阶段,去除 fc_fuse_pass + pass_builder->DeletePass("matmul_transpose_reshape_fuse_pass"); config.SwitchUseFeedFetchOps(false); // true for multiple input config.SwitchSpecifyInputNames(true); -- GitLab