Skip to content
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

(External) CUBLAS error(7) #8

Open
shiyutang opened this issue Aug 28, 2023 · 1 comment
Open

(External) CUBLAS error(7) #8

shiyutang opened this issue Aug 28, 2023 · 1 comment
Labels

Comments

@shiyutang
Copy link
Owner

  • 系统环境/System Environment:centos7
  • 版本号/Version:Paddle:2.5.1 PaddleOCR:2.7.0.2 问题相关组件/Related components:
  • 运行指令/Command Code: paddleocr --image_dir word_1.jpg --lang=ch
  • CUDA: cuda 10.2
  • 完整报错/Complete Error Message:
    [2023/08/28 16:53:26] ppocr DEBUG: Namespace(alpha=1.0, benchmark=False, beta=1.0, cls_batch_num=6, cls_image_shape='3, 48, 192', cls_model_dir='/root/.paddleocr/whl/cls/ch_ppocr_mobile_v2.0_cls_infer', cls_thresh=0.9, cpu_threads=10, crop_res_save_dir='./output', det=True, det_algorithm='DB', det_box_type='quad', det_db_box_thresh=0.6, det_db_score_mode='fast', det_db_thresh=0.3, det_db_unclip_ratio=1.5, det_east_cover_thresh=0.1, det_east_nms_thresh=0.2, det_east_score_thresh=0.8, det_limit_side_len=960, det_limit_type='max', det_model_dir='/root/.paddleocr/whl/det/ch/ch_PP-OCRv4_det_infer', det_pse_box_thresh=0.85, det_pse_min_area=16, det_pse_scale=1, det_pse_thresh=0, det_sast_nms_thresh=0.2, det_sast_score_thresh=0.5, draw_img_save_dir='./inference_results', drop_score=0.5, e2e_algorithm='PGNet', e2e_char_dict_path='./ppocr/utils/ic15_dict.txt', e2e_limit_side_len=768, e2e_limit_type='max', e2e_model_dir=None, e2e_pgnet_mode='fast', e2e_pgnet_score_thresh=0.5, e2e_pgnet_valid_set='totaltext', enable_mkldnn=False, fourier_degree=5, gpu_id=0, gpu_mem=500, help='==SUPPRESS==', image_dir='/opt/ai/liucong/Project/video-to-text-ocr/ppocr_img/ch/word_1.jpg', image_orientation=False, ir_optim=True, kie_algorithm='LayoutXLM', label_list=['0', '180'], lang='ch', layout=True, layout_dict_path=None, layout_model_dir=None, layout_nms_threshold=0.5, layout_score_threshold=0.5, max_batch_size=10, max_text_length=25, merge_no_span_structure=True, min_subgraph_size=15, mode='structure', ocr=True, ocr_order_method=None, ocr_version='PP-OCRv4', output='./output', page_num=0, precision='fp32', process_id=0, re_model_dir=None, rec=True, rec_algorithm='SVTR_LCNet', rec_batch_num=6, rec_char_dict_path='/home/zg/anaconda-zg/anaconda3/envs/py38/lib/python3.8/site-packages/paddleocr/ppocr/utils/ppocr_keys_v1.txt', rec_image_inverse=True, rec_image_shape='3, 48, 320', rec_model_dir='/root/.paddleocr/whl/rec/ch/ch_PP-OCRv4_rec_infer', recovery=False, return_word_box=False, save_crop_res=False, save_log_path='./log_output/', scales=[8, 16, 32], ser_dict_path='../train_data/XFUND/class_list_xfun.txt', ser_model_dir=None, show_log=True, sr_batch_num=1, sr_image_shape='3, 32, 128', sr_model_dir=None, structure_version='PP-StructureV2', table=True, table_algorithm='TableAttn', table_char_dict_path=None, table_max_len=488, table_model_dir=None, total_process_num=1, type='ocr', use_angle_cls=False, use_dilation=False, use_gpu=True, use_mp=False, use_npu=False, use_onnx=False, use_pdf2docx_api=False, use_pdserving=False, use_space_char=True, use_tensorrt=False, use_visual_backbone=True, use_xpu=False, vis_font_path='./doc/fonts/simfang.ttf', warmup=False)

[2023/08/28 16:53:29] ppocr INFO: /opt/ai/ppocr_img/ch/word_1.jpg
[2023/08/28 16:53:30] ppocr DEBUG: dt_boxes num : 31, elapse : 0.8258509635925293

Traceback (most recent call last):
File "/home/zg/anaconda-zg/anaconda3/envs/py38/bin/paddleocr", line 8, in
sys.exit(main())
File "/home/zg/anaconda-zg/anaconda3/envs/py38/lib/python3.8/site-packages/paddleocr/paddleocr.py", line 766, in main
result = engine.ocr(img_path,
File "/home/zg/anaconda-zg/anaconda3/envs/py38/lib/python3.8/site-packages/paddleocr/paddleocr.py", line 648, in ocr
dt_boxes, rec_res, _ = self.call(img, cls)
File "/home/zg/anaconda-zg/anaconda3/envs/py38/lib/python3.8/site-packages/paddleocr/tools/infer/predict_system.py", line 95, in call
rec_res, elapse = self.text_recognizer(img_crop_list)
File "/home/zg/anaconda-zg/anaconda3/envs/py38/lib/python3.8/site-packages/paddleocr/tools/infer/predict_rec.py", line 619, in call
self.predictor.run()
OSError: (External) CUBLAS error(7).
[Hint: 'CUBLAS_STATUS_INVALID_VALUE'. An unsupported value or parameter was passed to the function (a negative vector size, for example). To correct: ensure that all the parameters being passed have valid values. ] (at ../paddle/phi/backends/gpu/gpu_context.cc:599)
[operator < fc > error]

我们提供了AceIssueSolver来帮助你解答问题,你是否想要它来解答(请填写yes/no)?/We provide AceIssueSolver to solve issues, do you want it? (Please write yes/no):yes

请尽量不要包含图片在问题中/Please try to not include the image in the issue.

@aceissuesolver
Copy link

Issue Response

  • Introduction: Thanks for opening this issue, I am the AceIssueSolver that will help you with your questoins!
  • 🎯 First round response: The answer to your question is:

根据报错信息,您遇到了一个与CUBLAS相关的错误。这个错误提示表明在函数中传递了一个不支持的值或参数,导致了CUBLAS错误。

为了解决这个问题,您可以尝试以下步骤:

  1. 检查兼容性:确保PaddleOCR、PaddlePaddle和CUDA的版本相互兼容。在您的情况下,您正在使用PaddleOCR 2.7.0.2和CUDA 10.2。验证这些版本是否兼容。

  2. 检查输入图片:确保输入图片的格式正确,并且可以被PaddleOCR正确读取。您可以尝试使用OpenCV(cv2.imread())打开图片,以验证是否可以成功读取。

  3. 检查运行指令:仔细检查您用来运行PaddleOCR的指令代码。确保所有参数都是正确和有效的。在您的情况下,指令代码是 paddleocr --image_dir word_1.jpg --lang=ch。确保 image_dir 参数指向正确的图片文件。

  4. 检查GPU内存:验证您是否有足够的GPU内存来运行PaddleOCR。指令代码中的 gpu_mem 参数指定要使用的GPU内存量。如果内存不足,可以尝试减小这个值。

如果在尝试了这些步骤之后问题仍然存在,提供更多关于您的系统环境的信息可能会有助于进一步诊断问题,例如PaddleOCR、PaddlePaddle和CUDA的版本,以及其他相关细节。这将有助于进一步解决问题。

How to use

To invoke the AceIssueSolver, add a comment using one of the following commands:
@Ace-issue-solver <QUESTION>: Pose more questions on AceIssueSolver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant