PaddlePaddle / Paddle

PArallel Distributed Deep LEarning: Machine Learning Framework from Industrial Practice (『飞桨』核心框架,深度学习&机器学习高性能单机、分布式训练和跨平台部署)
http://www.paddlepaddle.org/
Apache License 2.0
22.05k stars 5.54k forks source link

关于paddle_inference库中,MKL相关的问题 #48079

Closed ainndejj11 closed 9 months ago

ainndejj11 commented 1 year ago

请提出你的问题 Please ask your question

下载百度编译好的paddle_inference库存,默认编译是打开了MKL的。 在PaddleOCR C++代码中,不想链接MKL的库,编译文件中tools/build.sh 设置-DWITH_MKL=OFF 。然后编译会报错:

请问编译要和paddle_inference的设置相同么,如果不想链接mkl的库,是否需要自己编译一个paddle_inference库??

报错信息如下: -- Build files have been written to: /media/alex/e815e6bf-29c6-44df-a535-184ead5b3f96/PaddleOCR-release-2.5/deploy/cpp_infer/build Scanning dependencies of target ppocr [ 18%] Building CXX object CMakeFiles/ppocr.dir/src/clipper.cpp.o [ 18%] Building CXX object CMakeFiles/ppocr.dir/src/args.cpp.o [ 27%] Building CXX object CMakeFiles/ppocr.dir/src/main.cpp.o [ 36%] Building CXX object CMakeFiles/ppocr.dir/src/ocr_cls.cpp.o [ 45%] Building CXX object CMakeFiles/ppocr.dir/src/ocr_det.cpp.o [ 54%] Building CXX object CMakeFiles/ppocr.dir/src/ocr_rec.cpp.o make[2]: No rule to make target '/home/alex/Music/paddle_inference/third_party/install/openblas/lib/libopenblas.a', needed by 'ppocr'。 停止。 make[2]: 正在等待未完成的任务.... [ 63%] Building CXX object CMakeFiles/ppocr.dir/src/postprocess_op.cpp.o [ 72%] Building CXX object CMakeFiles/ppocr.dir/src/paddleocr.cpp.o [ 81%] Building CXX object CMakeFiles/ppocr.dir/src/preprocess_op.cpp.o [ 90%] Building CXX object CMakeFiles/ppocr.dir/src/utility.cpp.o CMakeFiles/Makefile2:76: recipe for target 'CMakeFiles/ppocr.dir/all' failed make[1]: [CMakeFiles/ppocr.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: [all] Error 2

paddle-bot[bot] commented 1 year ago

您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看官网API文档常见问题历史IssueAI社区来寻求解答。祝您生活愉快~

Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the APIFAQGithub Issue and AI community to get the answer.Have a nice day!

joey12300 commented 1 year ago

您好,https://www.paddlepaddle.org.cn/inference/v2.4/guides/install/download_lib.html#linux 可以按照需要选择预编译好的paddle_inference。比如不希望使用mkl作为数学库,就使用openblas版本的paddle_inference

ainndejj11 commented 1 year ago

您好,https://www.paddlepaddle.org.cn/inference/v2.4/guides/install/download_lib.html#linux 可以按照需要选择预编译好的paddle_inference。比如不希望使用mkl作为数学库,就使用openblas版本的paddle_inference

C++的推理库,使用OpenBLAS的都是 CPU设备的呀。 GPU的都是MKL

joey12300 commented 1 year ago

那应该要自己编译。可以参考官方的编译教程,并且将ON_INFER参数设为ON

paddle-bot[bot] commented 9 months ago

Since you haven\'t replied for more than a year, we have closed this issue/pr. If the problem is not solved or there is a follow-up one, please reopen it at any time and we will continue to follow up. 由于您超过一年未回复,我们将关闭这个issue/pr。 若问题未解决或有后续问题,请随时重新打开,我们会继续跟进。