Toybrick

标题: 设置pre-compile=True,yolov5s.rknn模型在RV1126上运行出现GPU[0] hang [打印本页]

作者: theantbully    时间: 2021-9-1 11:13
标题: 设置pre-compile=True,yolov5s.rknn模型在RV1126上运行出现GPU[0] hang
Yolov5s来源于官网:https://github.com/ultralytics/yolov5/ matser 分支, 转换的toolkit为rknn-1.7.0

当设置pre-compile=False,模型load很慢,但结果正确:

当设置pre-compile=True, 模型load很快,但是报错GPU[0] hang:

有谁知知道这是啥毛病吗?
与rknn模型的导出方式有关系吗?我是在x86_64的PC上离线导出的,然后在RV1126上运行。

另外,我猜测当pre_compile=False的时候,导出的模型load要很久,是不是在RV1126上做pre_compile?
如果是这样,那么在RV1126上设置pre_compile=True,在线导出模型,下次再加载是不是就没这个问题了?



作者: theantbully    时间: 2021-9-1 11:17

[attach]2041[/attach]
pre_compile = False, 结果正常

[attach]2042[/attach]
pre_compile = True, 报错GPU[0] hang


作者: theantbully    时间: 2021-9-1 16:18
打开verbose=True,估计下面log相关:
I [vnn_CreateRKNN:6047]graph io initialize
D [setup_node:441]Setup node id[0] uid[0] op[NBG] name[nbg_0]
D [print_tensor:146]in(0) : id[   3] vtl[0] const[0] shape[ 640, 640, 3, 1   ] fmt[f16] qnt[NONE]
D [print_tensor:146]out(0): id[   0] vtl[0] const[0] shape[ 80, 80, 85, 3, 1 ] fmt[u8 ] qnt[ASM zp=213, scale=0.097085]
D [print_tensor:146]out(1): id[   1] vtl[0] const[0] shape[ 40, 40, 85, 3, 1 ] fmt[u8 ] qnt[ASM zp=183, scale=0.086296]
D [print_tensor:146]out(2): id[   2] vtl[0] const[0] shape[ 20, 20, 85, 3, 1 ] fmt[u8 ] qnt[ASM zp=179, scale=0.076124]
D [optimize_node:385]Backward optimize neural network
D [optimize_node:392]Forward optimize neural network
I [compute_node:327]Create vx node
D [compute_node:350]Instance node[0] "NBG" ...
E [compute_node:354]Create node[0] NBG fail
Create rknn graph fail!

Warning: NN VipSram is NULL, but SRAM is enabled!
I [remove_client_ops:5508]remove_client_ops num=0
I [remove_client_ops:5519]remove_client_ops finish
Create RKNN model fail, error=-6


作者: theantbully    时间: 2021-9-2 09:52
E [compute_node:354]Create node[0] NBG fail
Create rknn graph fail!

是由于在PC上init_runtime引起的。还是得看GPU[0] hang 的原因.




欢迎光临 Toybrick (https://t.rock-chips.com/) Powered by Discuz! X3.3