From 369889b6e009e2a8f85253abe5d03c652056c514 Mon Sep 17 00:00:00 2001 From: andyjpaddle <87074272+andyjpaddle@users.noreply.github.com> Date: Fri, 6 May 2022 21:57:41 +0800 Subject: [PATCH] fix rec v3 mkldnn irpass in cpp infer (#6154) * fix rec v3 mkldnn irpass * 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..f69f37b8 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_); } + // get pass_builder object + auto pass_builder = config.pass_builder(); + // delete "matmul_transpose_reshape_fuse_pass" + pass_builder->DeletePass("matmul_transpose_reshape_fuse_pass"); config.SwitchUseFeedFetchOps(false); // true for multiple input config.SwitchSpecifyInputNames(true); -- GitLab