部署OCR应用报错Call aclInit(nullptr) failed : 507008 问题求助
收藏回复举报
部署OCR应用报错Call aclInit(nullptr) failed : 507008 问题求助
t('forum.solved') 已解决
发表于2025-07-29 16:57:03
0 查看

在【Atlas800IA2】上通过docker方式部署ocr的定制化应用,启动报错如下: 

2025-07-25 19:18:06 [线程ID: 281473059091504] INFO [bcmocr.ocr_initializer:364]: OCR参数配置: {'use_angle_cls': True, 'lang': 'ch', 'text_detection_model_dir': './models/PP-OCRv5/PP-OCRv5_server_det_infer/', 'text_recognition_model_dir': './models/PP-OCRv5/PP-OCRv5_server_rec_infer/', 'rec_batch_num': 6, 'enable_mkldnn': True, 'cpu_threads': 10, 'det_limit_side_len': 960, 'text_det_thresh': 0.2, 'text_det_box_thresh': 0.5, 'text_det_unclip_ratio': 2.0, 'text_rec_score_thresh': 0.0, 'device': 'npu'}  

2025-07-25 19:18:06 [线程ID: 281473059091504] INFO [bcmocr.ocr_initializer:368]: 正在初始化PP-OCRv5引擎(完整配置)...  

/usr/local/lib/python3.10/dist-packages/bcmocr/ocr_initializer.py:371: UserWarning: `lang` and `ocr_version` will be ignored when model names or model directories are not `None`.  

  ocr = PaddleOCR(**valid_params)  

I0725 19:18:06.995957     1 init.cc:235] ENV [CUSTOM_DEVICE_ROOT]=/usr/local/lib/python3.10/dist-packages/paddle_custom_device  

I0725 19:18:06.996003     1 init.cc:144] Try loading custom device libs from: [/usr/local/lib/python3.10/dist-packages/paddle_custom_device]  

Call aclInit(nullptr) failed : 507008 at file /paddle/backends/npu/runtime/runtime.cc line 403  

EE1001: [PID: 1] 2025-07-25-19:18:07.265.468 The argument is invalid.Reason: rtGetDevMsg execute failed, reason=[context pointer null]  

        Solution: 1.Check the input parameter range of the function. 2.Check the function invocation relationship.  

        TraceBack (most recent call last):  

        [Init][Version]init soc version failed, ret = 507008[FUNC:ReportInnerError][FILE:log_inner.cpp][LINE:145]  

        ctx is NULL![FUNC:GetDevErrMsg][FILE:api_impl.cc][LINE:5372]  

        The argument is invalid.Reason: rtGetDevMsg execute failed, reason=[context pointer null] 

宿主机npu信息如下: 

[root@bms-57652300-001 ~]#  npu-smi info  

+------------------------------------------------------------------------------------------------+  

| npu-smi 24.1.0.3                 Version: 24.1.0.3                                             |  

+---------------------------+---------------+----------------------------------------------------+  

| NPU   Name                | Health        | Power(W)    Temp(C)           Hugepages-Usage(page)|  

| Chip                      | Bus-Id        | AICore(%)   Memory-Usage(MB)  HBM-Usage(MB)        |  

+===========================+===============+====================================================+  

| 0     910B2               | OK            | 99.3        45                0    / 0             |  

| 0                         | 0000:C1:00.0  | 0           0    / 0          3373 / 65536         |  

+===========================+===============+====================================================+  

| 1     910B2               | OK            | 89.8        44                0    / 0             |  

| 0                         | 0000:C2:00.0  | 0           0    / 0          3196 / 65536         |  

+===========================+===============+====================================================+  

| 2     910B2               | OK            | 91.8        47                0    / 0             |  

| 0                         | 0000:81:00.0  | 0           0    / 0          3196 / 65536         |  

+===========================+===============+====================================================+  

| 3     910B2               | OK            | 90.8        46                0    / 0             |  

| 0                         | 0000:82:00.0  | 0           0    / 0          3376 / 65536         |  

+===========================+===============+====================================================+  

| 4     910B2               | OK            | 93.8        50                0    / 0             |  

| 0                         | 0000:01:00.0  | 0           0    / 0          59607/ 65536         |  

+===========================+===============+====================================================+  

| 5     910B2               | OK            | 92.1        50                0    / 0             |  

| 0                         | 0000:02:00.0  | 0           0    / 0          59604/ 65536         |  

+===========================+===============+====================================================+  

| 6     910B2               | OK            | 93.9        49                0    / 0             |  

| 0                         | 0000:41:00.0  | 0           0    / 0          59605/ 65536         |  

+===========================+===============+====================================================+  

| 7     910B2               | OK            | 89.2        48                0    / 0             |  

| 0                         | 0000:42:00.0  | 0           0    / 0          59604/ 65536         |  

+===========================+===============+====================================================+  

+---------------------------+---------------+----------------------------------------------------+  

| NPU     Chip              | Process id    | Process name             | Process memory(MB)      |  

+===========================+===============+====================================================+  

| No running processes found in NPU 0                                                            |  

+===========================+===============+====================================================+  

| No running processes found in NPU 1                                                            |  

+===========================+===============+====================================================+  

| No running processes found in NPU 2                                                            |  

+===========================+===============+====================================================+  

| No running processes found in NPU 3                                                            |  

+===========================+===============+====================================================+  

| 4       0                 | 2071090       | mindie_llm_back          | 56277                   |  

+===========================+===============+====================================================+  

| 5       0                 | 2071092       | mindie_llm_back          | 56277                   |  

+===========================+===============+====================================================+  

| 6       0                 | 2071099       | mindie_llm_back          | 56277                   |  

+===========================+===============+====================================================+  

| 7       0                 | 2071106       | mindie_llm_back          | 56277                   |  

+===========================+===============+====================================================+ 

本帖最后由 匿名用户 于 2025/07/29 17:02:49 编辑

我要发帖子