专栏算法工具链运行报错(申请内存)

运行报错(申请内存)

已解决
我爱邢宝宝i2024-03-19
156
6

用户您好,请详细描述您所遇到的问题,详细的描述有助于帮助我们快速定位,解决问题~Thanks♪(・ω・)ノ

1. 芯片型号:J5 等

2. 天工开物开发包 OpenExplorer 版本:例如 J5_OE_1.1.40 等

3. 问题定位:板端部署

4. 问题具体描述:

运行命令./hrt_model_exec perf --model_file ../test_OE/maskformer-Swin-tiny_coco.bin --core_id 0 --thread_num 8 --frame_count 10
运行信息:I0000 00:00:00.000000 2537 vlog_is_on.cc:197] RAW: Set VLOG level for "*" to 3

[BPU_PLAT]BPU Platform Version(1.3.3)!

[HBRT] set log level as 0. version = 3.15.40.0

[DNN] Runtime version = 1.22.6_(3.15.40 HBRT)

[A][DNN][packed_model.cpp:246][Model](2000-01-01,08:55:56.299.2) [HorizonRT] The model builder version = 1.21.6

Load model to DDR cost 7014.05ms.

I0101 08:55:58.147534 2537 function_util.cpp:327] get model handle success

I0101 08:55:58.147662 2537 function_util.cpp:660] get model input count success

I0101 08:55:58.147902 2537 function_util.cpp:691] prepare input tensor success!

I0101 08:55:58.147961 2537 function_util.cpp:697] get model output count success

报错信息:[ion] Failed to do ION_IOC_SHARE(ret=-1)!

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3344.44065][2508:2519][ION_ALLOCATOR] Fail to share ion memory(Too many open files).

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3344.44070][2508:2519][ION_ALLOCATOR] Fail to allocate handle and buf(ret=-16777210).

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3344.44073][2508:2519][MEM_ALLOCATOR] Fail to allocate memory(Too many opened fd).

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3344.44075][2508:2519][MEM_ALLOCATOR] Fail to allocate common buffer(ret=-16777211).

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3344.44077][2508:2519][HBMEM] Fail to allocate buffer(ret=-16777211).

 [E][DNN][hbm_exec_plan.cpp:185][Plan](2000-01-01,08:55:42.937.358) alloc memory failed!

 [E][DNN][hbm_exec_plan.cpp:1298][Plan](2000-01-01,08:55:42.937.388) PrepareExecInfo failed!

 [E][DNN][engine.cpp:51][Engine](2000-01-01,08:55:42.992.325) Engine CopyNew failed

 [E][DNN][executor.cpp:39][Engine](2000-01-01,08:55:42.992.384) AllocEngine failed!

 [E][DNN][multi_model_task.cpp:1023][Task](2000-01-01,08:55:42.992.413) ri Start failed, ri_id: 2

E0101 08:55:42.992522 2530 function_util.cpp:611] hbDNNWaitTaskDone failed, error code:-6000012

[ion] Failed to do ION_IOC_SHARE(ret=-1)!

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3344.53742][2508:2520][ION_ALLOCATOR] Fail to share ion memory(Too many open files).

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3344.53749][2508:2520][ION_ALLOCATOR] Fail to allocate handle and buf(ret=-16777210).

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3344.53753][2508:2520][MEM_ALLOCATOR] Fail to allocate memory(Too many opened fd).

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3344.53756][2508:2520][MEM_ALLOCATOR] Fail to allocate common buffer(ret=-16777211).

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3344.53760][2508:2520][HBMEM] Fail to allocate buffer(ret=-16777211).

 [E][DNN][hbm_exec_plan.cpp:185][Plan](2000-01-01,08:55:43.34.196) alloc memory failed!

 [E][DNN][hbm_exec_plan.cpp:1298][Plan](2000-01-01,08:55:43.34.239) PrepareExecInfo failed!

 [E][DNN][engine.cpp:51][Engine](2000-01-01,08:55:43.89.627) Engine CopyNew failed

 [E][DNN][executor.cpp:39][Engine](2000-01-01,08:55:43.89.721) AllocEngine failed!

 [E][DNN][multi_model_task.cpp:1023][Task](2000-01-01,08:55:43.89.762) ri Start failed, ri_id: 3

E0101 08:55:43.089865 2531 function_util.cpp:611] hbDNNWaitTaskDone failed, error code:-6000012

[ion] Failed to do ION_IOC_SHARE(ret=-1)!

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3344.63439][2508:2521][ION_ALLOCATOR] Fail to share ion memory(Too many open files).

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3344.63445][2508:2521][ION_ALLOCATOR] Fail to allocate handle and buf(ret=-16777210).

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3344.63447][2508:2521][MEM_ALLOCATOR] Fail to allocate memory(Too many opened fd).

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3344.63449][2508:2521][MEM_ALLOCATOR] Fail to allocate common buffer(ret=-16777211).

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3344.63452][2508:2521][HBMEM] Fail to allocate buffer(ret=-16777211).

 [E][DNN][hbm_exec_plan.cpp:185][Plan](2000-01-01,08:55:43.131.102) alloc memory failed!

 [E][DNN][hbm_exec_plan.cpp:1298][Plan](2000-01-01,08:55:43.131.133) PrepareExecInfo failed!

 [E][DNN][engine.cpp:51][Engine](2000-01-01,08:55:43.187.117) Engine CopyNew failed

 [E][DNN][executor.cpp:39][Engine](2000-01-01,08:55:43.187.178) AllocEngine failed!

 [E][DNN][multi_model_task.cpp:1023][Task](2000-01-01,08:55:43.187.211) ri Start failed, ri_id: 4

E0101 08:55:43.187312 2532 function_util.cpp:611] hbDNNWaitTaskDone failed, error code:-6000012

[ion] Failed to do ION_IOC_SHARE(ret=-1)!

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3344.73266][2508:2522][ION_ALLOCATOR] Fail to share ion memory(Too many open files).

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3344.73271][2508:2522][ION_ALLOCATOR] Fail to allocate handle and buf(ret=-16777210).

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3344.73273][2508:2522][MEM_ALLOCATOR] Fail to allocate memory(Too many opened fd).

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3344.73275][2508:2522][MEM_ALLOCATOR] Fail to allocate common buffer(ret=-16777211).

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3344.73278][2508:2522][HBMEM] Fail to allocate buffer(ret=-16777211).

 [E][DNN][hbm_exec_plan.cpp:185][Plan](2000-01-01,08:55:43.229.363) alloc memory failed!

 [E][DNN][hbm_exec_plan.cpp:1298][Plan](2000-01-01,08:55:43.229.391) PrepareExecInfo failed!

 [E][DNN][engine.cpp:51][Engine](2000-01-01,08:55:43.283.671) Engine CopyNew failed

 [E][DNN][executor.cpp:39][Engine](2000-01-01,08:55:43.283.726) AllocEngine failed!

 [E][DNN][multi_model_task.cpp:1023][Task](2000-01-01,08:55:43.283.755) ri Start failed, ri_id: 5

E0101 08:55:43.283855 2533 function_util.cpp:611] hbDNNWaitTaskDone failed, error code:-6000012

[ion] Failed to do ION_IOC_SHARE(ret=-1)!

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3344.82855][2508:2523][ION_ALLOCATOR] Fail to share ion memory(Too many open files).

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3344.82859][2508:2523][ION_ALLOCATOR] Fail to allocate handle and buf(ret=-16777210).

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3344.82862][2508:2523][MEM_ALLOCATOR] Fail to allocate memory(Too many opened fd).

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3344.82864][2508:2523][MEM_ALLOCATOR] Fail to allocate common buffer(ret=-16777211).

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3344.82867][2508:2523][HBMEM] Fail to allocate buffer(ret=-16777211).

 [E][DNN][hbm_exec_plan.cpp:185][Plan](2000-01-01,08:55:43.325.250) alloc memory failed!

 [E][DNN][hbm_exec_plan.cpp:1298][Plan](2000-01-01,08:55:43.325.330) PrepareExecInfo failed!

 [E][DNN][engine.cpp:51][Engine](2000-01-01,08:55:43.379.299) Engine CopyNew failed

 [E][DNN][executor.cpp:39][Engine](2000-01-01,08:55:43.379.352) AllocEngine failed!

 [E][DNN][multi_model_task.cpp:1023][Task](2000-01-01,08:55:43.379.382) ri Start failed, ri_id: 6

E0101 08:55:43.379485 2534 function_util.cpp:611] hbDNNWaitTaskDone failed, error code:-6000012

[ion] Failed to do ION_IOC_SHARE(ret=-1)!

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3344.92468][2508:2519][ION_ALLOCATOR] Fail to share ion memory(Too many open files).

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3344.92473][2508:2519][ION_ALLOCATOR] Fail to allocate handle and buf(ret=-16777210).

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3344.92476][2508:2519][MEM_ALLOCATOR] Fail to allocate memory(Too many opened fd).

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3344.92478][2508:2519][MEM_ALLOCATOR] Fail to allocate common buffer(ret=-16777211).

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3344.92480][2508:2519][HBMEM] Fail to allocate buffer(ret=-16777211).

 [E][DNN][hbm_exec_plan.cpp:185][Plan](2000-01-01,08:55:43.421.387) alloc memory failed!

 [E][DNN][hbm_exec_plan.cpp:1298][Plan](2000-01-01,08:55:43.421.428) PrepareExecInfo failed!

 [E][DNN][engine.cpp:51][Engine](2000-01-01,08:55:43.477.303) Engine CopyNew failed

 [E][DNN][executor.cpp:39][Engine](2000-01-01,08:55:43.477.363) AllocEngine failed!

 [E][DNN][multi_model_task.cpp:1023][Task](2000-01-01,08:55:43.477.392) ri Start failed, ri_id: 7

E0101 08:55:43.477602 2535 function_util.cpp:611] hbDNNWaitTaskDone failed, error code:-6000012

[ion] Failed to do ION_IOC_SHARE(ret=-1)!

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3345.02218][2508:2520][ION_ALLOCATOR] Fail to share ion memory(Too many open files).

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3345.02224][2508:2520][ION_ALLOCATOR] Fail to allocate handle and buf(ret=-16777210).

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3345.02228][2508:2520][MEM_ALLOCATOR] Fail to allocate memory(Too many opened fd).

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3345.02232][2508:2520][MEM_ALLOCATOR] Fail to allocate common buffer(ret=-16777211).

[ERROR][MEM][src/utils/mem_log.c:112] [ERROR][3345.02235][2508:2520][HBMEM] Fail to allocate buffer(ret=-16777211).

 [E][DNN][hbm_exec_plan.cpp:185][Plan](2000-01-01,08:55:43.518.949) alloc memory failed!

 [E][DNN][hbm_exec_plan.cpp:1298][Plan](2000-01-01,08:55:43.518.987) PrepareExecInfo failed!

 [E][DNN][engine.cpp:51][Engine](2000-01-01,08:55:43.574.946) Engine CopyNew failed

 [E][DNN][executor.cpp:39][Engine](2000-01-01,08:55:43.575.31) AllocEngine failed!

 [E][DNN][multi_model_task.cpp:1023][Task](2000-01-01,08:55:43.575.65) ri Start failed, ri_id: 8

E0101 08:55:43.575173 2536 function_util.cpp:611] hbDNNWaitTaskDone failed, error code:-6000012


算法工具链
征程5
评论6
0/1000
  • 我爱邢宝宝i
    Lv.2

    嗯嗯,线程数超过1,就出现上述问题,咱们有没有遇到过类似的情况

    2024-03-19
    1
    0
  • 我爱邢宝宝i
    Lv.2

    线程数为1的时候,即单核的时候,正常的


    2024-03-19
    0
    0
  • kotei左文亮
    Lv.3

    是在J5 上吗 这个模型有多大啊?


    2024-03-19
    0
    0
  • 我爱邢宝宝i
    Lv.2
    参数量5G左右,maskformer-Swin-tiny,这种报错是由什么引起的
    2024-03-19
    0
    0
  • kotei左文亮
    Lv.3
    这个模型应该也不小吧,加载到DDR花费了 7014.05ms , 开了8个线程,“ Fail to share ion memory(Too many open files).” 有可能在申请 输入和输出空间时候,内存不够,
    2024-03-19
    0
    0
  • kotei左文亮
    Lv.3

    您好,我目前还没遇到这种情况。

    2024-03-20
    0
    0