PaddlePaddle / PaddleOCR

Awesome multilingual OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system, support 80+ languages recognition, provide data annotation and synthesis tools, support training and deployment among server, mobile, embedded and IoT devices)
https://paddlepaddle.github.io/PaddleOCR/
Apache License 2.0
44.47k stars 7.84k forks source link

paddle ocr运行错误 #13806

Closed renoyuan closed 2 months ago

renoyuan commented 2 months ago

🔎 Search before asking

🐛 Bug (问题描述)

paddle ocr运行错误 gpu NVIDIA L40S cuda 12.1 cudnn 8.9.7 paddle-bfloat 0.1.7 paddle2onnx 1.2.3 paddleocr 2.7.3 paddlepaddle-gpu 2.4.2.post117 x2paddle 1.4.1

outputs = self.forward(*inputs, *kwargs) File "/usr/local/lib/python3.7/dist-packages/paddle/nn/layer/conv.py", line 678, in forward use_cudnn=self._use_cudnn) File "/usr/local/lib/python3.7/dist-packages/paddle/nn/functional/conv.py", line 169, in _conv_nd type=op_type, inputs=inputs, outputs=outputs, attrs=attrs) File "/usr/local/lib/python3.7/dist-packages/paddle/fluid/layer_helper.py", line 44, in append_op return self.main_program.current_block().append_op(args, **kwargs) File "/usr/local/lib/python3.7/dist-packages/paddle/fluid/framework.py", line 3621, in append_op attrs=kwargs.get("attrs", None)) File "/usr/local/lib/python3.7/dist-packages/paddle/fluid/framework.py", line 2635, in init for frame in traceback.extract_stack():

ExternalError: CUDNN error(9), CUDNN_STATUS_NOT_SUPPORTED. 
  [Hint: Please search for the error code(9) on website (https://docs.nvidia.com/deeplearning/cudnn/api/index.html#cudnnStatus_t) to get Nvidia's official solution and advice about CUDNN Error.] (at /paddle/paddle/fluid/operators/fused/conv_fusion_op.cu:519)
  [operator < conv2d_fusion > error]

报错显示cudnn 版本不支持错误 不过相同环境在其他显卡上运行过,paddle 对这个显卡请问是兼容的吗?

🏃‍♂️ Environment (运行环境)

centOS7.9 gpu NVIDIA L40S cuda 12.1 cudnn 8.9.7 paddle-bfloat 0.1.7 paddle2onnx 1.2.3 paddleocr 2.7.3 paddlepaddle-gpu 2.4.2.post117 x2paddle 1.4.1

🌰 Minimal Reproducible Example (最小可复现问题的Demo)

use demo

GreatV commented 2 months ago

可以尝试升级一下paddle版本,兼容性问题建议去paddle主框架的那问。

renoyuan commented 2 months ago

可以尝试升级一下paddle版本,兼容性问题建议去paddle主框架的那问。 谢谢,我试下。 那边也问了,还没得到回复,想着这边有没有解决过类似的问题。因为ocr 涉及到cudnn 可能这边解决经验更丰富一下

renoyuan commented 2 months ago

感谢大佬,问题已解决 我的解决方法是添加 ~/conda/env/lib 到 LD_LIBRARY_PATH 环境变量中 ,Python环境中的lib目录有一个 符合版本要求的libstdc++.so.6,不过加载模型的时候没有用到