-
Notifications
You must be signed in to change notification settings - Fork 465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C++使用fastdeploy多线程Paddle Inference后端推理OCR模型出现崩溃 #1143
Comments
你好,此问题已复现。 目前改成将后端设为OrtBackend可以先解决崩溃的问题
|
使用ocr 在android c++推理也碰到类似的问题,求解答。注意该代码在linux端没有问题。使用库为:fastdeploy-android-1.0.4-shared。 [I 3/16 21:23:55.274 ...oid/Paddle-Lite/lite/core/device_info.cc:1275 Setup] ARM multiprocessors name: MODEL NAME : ARMV8 PROCESSOR REV 12 (V8L) |
使用PPOCR仓库里的c++代码在android端推理没有问题,使用fastdeploy 库里面的paddlite 库推理却出现问题,自己使用fastdeploy 编译最新fastploy库,也是类似的问题。 FILE: /tmp/tmp.j2qcusqQcB/src/app/ocr_recognize.cpp, LINE: 497: PADDLE LITE INIT hello world app for ocr recognize Segmentation fault |
环境
还有一个显存占用的问题:
程序开1个线程显存占1208M
程序开8个线程却只占2040M,一些显存各线程间复用?
崩溃时堆栈信息
--------------------- thread id 7 --------------------------------------
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff3e88f700 (LWP 105347)]
0x00007fff40aee858 in ?? () from /usr/lib64/libcuda.so
Missing separate debuginfos, use: debuginfo-install glibc-2.17-324.el7_9.x86_64 libgcc-4.8.5-44.el7.x86_64 libgomp-4.8.5-44.el7.x86_64
(gdb) bt
#0 0x00007fff40aee858 in ?? () from /usr/lib64/libcuda.so
#1 0x00007fff4089f20a in ?? () from /usr/lib64/libcuda.so
#2 0x00007fff40af3e60 in ?? () from /usr/lib64/libcuda.so
#3 0x00007fff4082d706 in ?? () from /usr/lib64/libcuda.so
#4 0x00007fff4082f6f2 in ?? () from /usr/lib64/libcuda.so
#5 0x00007fff408c92f5 in ?? () from /usr/lib64/libcuda.so
#6 0x00007ffd102d13fb in ?? () from /usr/local/cuda/lib64/libcudnn_ops_infer.so.8
#7 0x00007ffd1031df2e in ?? () from /usr/local/cuda/lib64/libcudnn_ops_infer.so.8
#8 0x00007ffd0f6c475c in ?? () from /usr/local/cuda/lib64/libcudnn_ops_infer.so.8
#9 0x00007ffd0f6c477e in ?? () from /usr/local/cuda/lib64/libcudnn_ops_infer.so.8
#10 0x00007ffd0f46e4f9 in ?? () from /usr/local/cuda/lib64/libcudnn_ops_infer.so.8
#11 0x00007ffd0f46f77f in ?? () from /usr/local/cuda/lib64/libcudnn_ops_infer.so.8
#12 0x00007ffd0f3e6f3a in ?? () from /usr/local/cuda/lib64/libcudnn_ops_infer.so.8
#13 0x00007ffd0f420fb1 in ?? () from /usr/local/cuda/lib64/libcudnn_ops_infer.so.8
#14 0x00007ffd0f2a9aab in ?? () from /usr/local/cuda/lib64/libcudnn_ops_infer.so.8
#15 0x00007ffd0f289235 in ?? () from /usr/local/cuda/lib64/libcudnn_ops_infer.so.8
#16 0x00007ffd0f28acec in ?? () from /usr/local/cuda/lib64/libcudnn_ops_infer.so.8
#17 0x00007ffd0ed843bc in cudnn::cublasGemmEx(cublasContext*, cublasOperation_t, cublasOperation_t, int, int, int, void const*, void const*, cudaDataType_t, int, void const*, cudaDataType_t, int, void const*, void*, cudaDataType_t, int, cudaDataType_t, cublasGemmAlgo_t) () from /usr/local/cuda/lib64/libcudnn_ops_infer.so.8
#18 0x00007ffc2e5e3889 in ?? () from /usr/local/cuda/lib64/libcudnn_adv_infer.so.8
#19 0x00007ffc2e57327b in ?? () from /usr/local/cuda/lib64/libcudnn_adv_infer.so.8
#20 0x00007ffc2e5bdf87 in RNN_forwardGeneric(cudnnContext*, cudnnRNNStruct*, int, cudnnTensorStruct* const*, void const*, cudnnTensorStruct*, void const*, cudnnTensorStruct*, void const*, cudnnFilterStruct*, void const*, cudnnTensorStruct* const*, void*, cudnnTensorStruct*, void*, cudnnTensorStruct*, void*, void*, unsigned long, void*, unsigned long, cudnnForwardMode_t) () from /usr/local/cuda/lib64/libcudnn_adv_infer.so.8
#21 0x00007ffc2e5be447 in cudnnRNNForwardInference () from /usr/local/cuda/lib64/libcudnn_adv_infer.so.8
#22 0x00007fff835cbfaf in void phi::RNNInferece(bool, cudnnContext* const&, int, phi::RNNDescriptors*, float const*, float const*, float const*, float const*, float*, float*, float*, phi::DenseTensor*, unsigned long) ()
from /home/share/disk1/bzp/cudnn8.1/fastdeploy-linux-x64-gpu-1.0.2/third_libs/install/paddle_inference/paddle/lib/libpaddle_inference.so
#23 0x00007fff835d08f4 in void phi::RnnKernel<float, phi::GPUContext>(phi::GPUContext const&, phi::DenseTensor const&, std::vector<phi::DenseTensor const*, std::allocator<phi::DenseTensor const*> > const&, std::vector<phi::DenseTensor const*, std::allocator<phi::DenseTensor const*> > const&, paddle::optionalphi::DenseTensor const&, float, bool, int, int, int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, int, bool, phi::DenseTensor*, phi::DenseTensor*, std::vector<phi::DenseTensor*, std::allocatorphi::DenseTensor* >, phi::DenseTensor*) () from /home/share/disk1/bzp/cudnn8.1/fastdeploy-linux-x64-gpu-1.0.2/third_libs/install/paddle_inference/paddle/lib/libpaddle_inference.so
#24 0x00007fff835d122a in void phi::KernelImpl<void ()(phi::GPUContext const&, phi::DenseTensor const&, std::vector<phi::DenseTensor const, std::allocator<phi::DenseTensor const*> > const&, std::vector<phi::DenseTensor const*, std::allocator<phi::DenseTensor const*> > const&, paddle::optionalphi::DenseTensor const&, float, bool, int, int, int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, int, bool, phi::DenseTensor*, phi::DenseTensor*, std::vector<phi::DenseTensor*, std::allocatorphi::DenseTensor* >, phi::DenseTensor*), &(void phi::RnnKernel<float, phi::GPUContext>(phi::GPUContext const&, phi::DenseTensor const&, std::vector<phi::DenseTensor const*, std::allocator<phi::DenseTensor const*> > const&, std::vector<phi::DenseTensor const*, std::allocator<phi::DenseTensor const*> > const&, paddle::optionalphi::DenseTensor const&, float, bool, int, int, int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, int, bool, phi::DenseTensor*, phi::DenseTensor*, std::vector<phi::DenseTensor*, std::allocatorphi::DenseTensor* >, phi::DenseTensor*))>::KernelCallHelper<paddle::optionalphi::DenseTensor const&, float, bool, int, int, int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, int, bool, phi::DenseTensor*, phi::DenseTensor*, std::vector<phi::DenseTensor*, std::allocatorphi::DenseTensor* >, phi::DenseTensor*, phi::TypeTag >::Compute<1, 3, 0, 0, phi::GPUContext const, phi::DenseTensor const, std::vector<phi::DenseTensor const*, std::allocator<phi::DenseTensor const*> >, std::vector<phi::DenseTensor const*, std::allocator<phi::DenseTensor const*> > >(phi::KernelContext*, phi::GPUContext const&, phi::DenseTensor const&, std::vector<phi::DenseTensor const*, std::allocator<phi::DenseTensor const*> >&, std::vector<phi::DenseTensor const*, std::allocator<phi::DenseTensor const*> >&) () from /home/share/disk1/bzp/cudnn8.1/fastdeploy-linux-x64-gpu-1.0.2/third_libs/install/paddle_inference/paddle/lib/libpaddle_inference.so
#25 0x00007fff835d15be in phi::KernelImpl<void ()(phi::GPUContext const&, phi::DenseTensor const&, std::vector<phi::DenseTensor const, std::allocator<phi::DenseTensor const*> > const&, std::vector<phi::DenseTensor const*, std::allocator<phi::DenseTensor const*> > const&, paddle::optionalphi::DenseTensor const&, float, bool, int, int, int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, int, bool, phi::DenseTensor*, phi::DenseTensor*, std::vector<phi::DenseTensor*, std::allocatorphi::DenseTensor* >, phi::DenseTensor*), &(void phi::RnnKernel<float, phi::GPUContext>(phi::GPUContext const&, phi::DenseTensor const&, std::vector<phi::DenseTensor const*, std::allocator<phi::DenseTensor const*> > const&, std::vector<phi::DenseTensor const*, std::allocator<phi::DenseTensor const*> > const&, paddle::optionalphi::DenseTensor const&, float, bool, int, int, int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, int, bool, phi::DenseTensor*, phi::DenseTensor*, std::vector<phi::DenseTensor*, std::allocatorphi::DenseTensor* >, phi::DenseTensor*))>::Compute(phi::KernelContext*) () from /home/share/disk1/bzp/cudnn8.1/fastdeploy-linux-x64-gpu-1.0.2/third_libs/install/paddle_inference/paddle/lib/libpaddle_inference.so
#26 0x00007fff7ff760f1 in paddle::framework::OperatorWithKernel::RunImpl(paddle::framework::Scope const&, phi::Place const&) const ()
from /home/share/disk1/bzp/cudnn8.1/fastdeploy-linux-x64-gpu-1.0.2/third_libs/install/paddle_inference/paddle/lib/libpaddle_inference.so
#27 0x00007fff7ff635cb in paddle::framework::OperatorBase::Run(paddle::framework::Scope const&, phi::Place const&) () from /home/share/disk1/bzp/cudnn8.1/fastdeploy-linux-x64-gpu-1.0.2/third_libs/install/paddle_inference/paddle/lib/libpaddle_inference.so
#28 0x00007fff7ffc2e03 in paddle::framework::NaiveExecutor::Run() () from /home/share/disk1/bzp/cudnn8.1/fastdeploy-linux-x64-gpu-1.0.2/third_libs/install/paddle_inference/paddle/lib/libpaddle_inference.so
#29 0x00007fff7f98136d in paddle::AnalysisPredictor::ZeroCopyRun() () from /home/share/disk1/bzp/cudnn8.1/fastdeploy-linux-x64-gpu-1.0.2/third_libs/install/paddle_inference/paddle/lib/libpaddle_inference.so
#30 0x00007ffff757035c in fastdeploy::PaddleBackend::Infer(std::vector<fastdeploy::FDTensor, std::allocatorfastdeploy::FDTensor >&, std::vector<fastdeploy::FDTensor, std::allocatorfastdeploy::FDTensor >, bool) ()
from /home/share/disk1/bzp/cudnn8.1/fastdeploy-linux-x64-gpu-1.0.2/lib/libfastdeploy.so.1.0.2
#31 0x00007ffff754724e in fastdeploy::Runtime::Infer(std::vector<fastdeploy::FDTensor, std::allocatorfastdeploy::FDTensor >&, std::vector<fastdeploy::FDTensor, std::allocatorfastdeploy::FDTensor >) ()
from /home/share/disk1/bzp/cudnn8.1/fastdeploy-linux-x64-gpu-1.0.2/lib/libfastdeploy.so.1.0.2
#32 0x00007ffff70d8387 in fastdeploy::FastDeployModel::Infer(std::vector<fastdeploy::FDTensor, std::allocatorfastdeploy::FDTensor >&, std::vector<fastdeploy::FDTensor, std::allocatorfastdeploy::FDTensor >) ()
from /home/share/disk1/bzp/cudnn8.1/fastdeploy-linux-x64-gpu-1.0.2/lib/libfastdeploy.so.1.0.2
---Type to continue, or q to quit---
#33 0x00007ffff766df3d in fastdeploy::vision::ocr::Recognizer::BatchPredict(std::vector<cv::Mat, std::allocatorcv::Mat > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > >, std::vector<float, std::allocator >, unsigned long, unsigned long, std::vector<int, std::allocator > const&) ()
from /home/share/disk1/bzp/cudnn8.1/fastdeploy-linux-x64-gpu-1.0.2/lib/libfastdeploy.so.1.0.2
#34 0x00007ffff7667dff in fastdeploy::pipeline::PPOCRv2::BatchPredict(std::vector<cv::Mat, std::allocatorcv::Mat > const&, std::vector<fastdeploy::vision::OCRResult, std::allocatorfastdeploy::vision::OCRResult >) ()
from /home/share/disk1/bzp/cudnn8.1/fastdeploy-linux-x64-gpu-1.0.2/lib/libfastdeploy.so.1.0.2
#35 0x00007ffff76673e5 in fastdeploy::pipeline::PPOCRv2::Predict(cv::Mat const&, fastdeploy::vision::OCRResult*) () from /home/share/disk1/bzp/cudnn8.1/fastdeploy-linux-x64-gpu-1.0.2/lib/libfastdeploy.so.1.0.2
#36 0x00007ffff76672f7 in fastdeploy::pipeline::PPOCRv2::Predict(cv::Mat*, fastdeploy::vision::OCRResult*) () from /home/share/disk1/bzp/cudnn8.1/fastdeploy-linux-x64-gpu-1.0.2/lib/libfastdeploy.so.1.0.2
#37 0x000000000041b864 in InitAndInfer (det_model_dir=..., cls_model_dir=..., rec_model_dir=..., rec_label_file=..., image_file=..., option=..., thread_id=1) at /home/share/disk1/bzp/cudnn8.1/FastDeploy-release-1.0.2/examples/vision/ocr/PP-OCRv2/cpp/infer_thread.cc:93
#38 0x0000000000422082 in std::__invoke_impl<void, void ()(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, fastdeploy::RuntimeOption const&, int), std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, fastdeploy::RuntimeOption, int>(std::__invoke_other, void (&&)(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, fastdeploy::RuntimeOption const&, int), std::__cxx11::basic_string<char, std::char_traits, std::allocator >&&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >&&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >&&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >&&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >&&, fastdeploy::RuntimeOption&&, int&&) (__f=<unknown type in /home/share/disk1/bzp/cudnn8.1/FastDeploy-release-1.0.2/examples/vision/ocr/PP-OCRv2/cpp/build/infer_demo_thread, CU 0x0, DIE 0x5ed4b>,
__args#0=<unknown type in /home/share/disk1/bzp/cudnn8.1/FastDeploy-release-1.0.2/examples/vision/ocr/PP-OCRv2/cpp/build/infer_demo_thread, CU 0x0, DIE 0x5ed87>,
__args#1=<unknown type in /home/share/disk1/bzp/cudnn8.1/FastDeploy-release-1.0.2/examples/vision/ocr/PP-OCRv2/cpp/build/infer_demo_thread, CU 0x0, DIE 0x5ed97>,
__args#2=<unknown type in /home/share/disk1/bzp/cudnn8.1/FastDeploy-release-1.0.2/examples/vision/ocr/PP-OCRv2/cpp/build/infer_demo_thread, CU 0x0, DIE 0x5eda7>,
__args#3=<unknown type in /home/share/disk1/bzp/cudnn8.1/FastDeploy-release-1.0.2/examples/vision/ocr/PP-OCRv2/cpp/build/infer_demo_thread, CU 0x0, DIE 0x5edb7>,
__args#4=<unknown type in /home/share/disk1/bzp/cudnn8.1/FastDeploy-release-1.0.2/examples/vision/ocr/PP-OCRv2/cpp/build/infer_demo_thread, CU 0x0, DIE 0x5edc7>,
__args#5=<unknown type in /home/share/disk1/bzp/cudnn8.1/FastDeploy-release-1.0.2/examples/vision/ocr/PP-OCRv2/cpp/build/infer_demo_thread, CU 0x0, DIE 0x5edd7>,
__args#6=<unknown type in /home/share/disk1/bzp/cudnn8.1/FastDeploy-release-1.0.2/examples/vision/ocr/PP-OCRv2/cpp/build/infer_demo_thread, CU 0x0, DIE 0x5ede6>) at /usr/local/gcc-8.2/include/c++/8.2.0/bits/invoke.h:60
#39 0x000000000041fb93 in std::__invoke<void ()(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, fastdeploy::RuntimeOption const&, int), std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, fastdeploy::RuntimeOption, int>(void (&&)(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, fastdeploy::RuntimeOption const&, int), std::__cxx11::basic_string<char, std::char_traits, std::allocator >&&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >&&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >&&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >&&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >&&, fastdeploy::RuntimeOption&&, int&&) (__fn=<unknown type in /home/share/disk1/bzp/cudnn8.1/FastDeploy-release-1.0.2/examples/vision/ocr/PP-OCRv2/cpp/build/infer_demo_thread, CU 0x0, DIE 0x62ace>,
__args#0=<unknown type in /home/share/disk1/bzp/cudnn8.1/FastDeploy-release-1.0.2/examples/vision/ocr/PP-OCRv2/cpp/build/infer_demo_thread, CU 0x0, DIE 0x62b0a>,
__args#1=<unknown type in /home/share/disk1/bzp/cudnn8.1/FastDeploy-release-1.0.2/examples/vision/ocr/PP-OCRv2/cpp/build/infer_demo_thread, CU 0x0, DIE 0x62b1a>,
__args#2=<unknown type in /home/share/disk1/bzp/cudnn8.1/FastDeploy-release-1.0.2/examples/vision/ocr/PP-OCRv2/cpp/build/infer_demo_thread, CU 0x0, DIE 0x62b2a>,
__args#3=<unknown type in /home/share/disk1/bzp/cudnn8.1/FastDeploy-release-1.0.2/examples/vision/ocr/PP-OCRv2/cpp/build/infer_demo_thread, CU 0x0, DIE 0x62b3a>,
__args#4=<unknown type in /home/share/disk1/bzp/cudnn8.1/FastDeploy-release-1.0.2/examples/vision/ocr/PP-OCRv2/cpp/build/infer_demo_thread, CU 0x0, DIE 0x62b4a>,
__args#5=<unknown type in /home/share/disk1/bzp/cudnn8.1/FastDeploy-release-1.0.2/examples/vision/ocr/PP-OCRv2/cpp/build/infer_demo_thread, CU 0x0, DIE 0x62b5a>,
__args#6=<unknown type in /home/share/disk1/bzp/cudnn8.1/FastDeploy-release-1.0.2/examples/vision/ocr/PP-OCRv2/cpp/build/infer_demo_thread, CU 0x0, DIE 0x62b69>) at /usr/local/gcc-8.2/include/c++/8.2.0/bits/invoke.h:95
#40 0x0000000000426f44 in std::thread::_Invoker<std::tuple<void ()(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, fastdeploy::RuntimeOption const&, int), std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, fastdeploy::RuntimeOption, int> >::_M_invoke<0ul, 1ul, 2ul, 3ul, 4ul, 5ul, 6ul, 7ul> (this=0x2df30c8)
at /usr/local/gcc-8.2/include/c++/8.2.0/thread:234
#41 0x0000000000426e5a in std::thread::_Invoker<std::tuple<void ()(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, fastdeploy::RuntimeOption const&, int), std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, fastdeploy::RuntimeOption, int> >::operator() (this=0x2df30c8) at /usr/local/gcc-8.2/include/c++/8.2.0/thread:243
#42 0x0000000000426e3e in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, fastdeploy::RuntimeOption const&, int), std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, fastdeploy::RuntimeOption, int> > >::_M_run (this=0x2df30c0)
at /usr/local/gcc-8.2/include/c++/8.2.0/thread:186
#43 0x00007fff5696d05f in execute_native_thread_routine () from /home/share/disk1/bzp/cudnn8.1/fastdeploy-linux-x64-gpu-1.0.2/third_libs/install/opencv/lib64/libopencv_core.so.3.4
---Type to continue, or q to quit---
#44 0x00007fff5a044ea5 in start_thread () from /usr/lib64/libpthread.so.0
#45 0x00007fff555609fd in clone () from /usr/lib64/libc.so.6
复现过程及代码
修改FastDeploy-release-1.0.2/examples/vision/ocr/PP-OCRv2/cpp/infer.cc为多线程
选择Paddle推理
修改CMakeLists.txt编译通过后执行:
gdb --args ./build/infer_demo_thread ./model/ch_PP-OCRv2_det_infer ./model/ch_ppocr_mobile_v2.0_cls_infer ./model/ch_PP-OCRv2_rec_infer ./model/ppocr_keys_v1.txt ./imgs/1.jpg 1
The text was updated successfully, but these errors were encountered: