Toybrick
标题:
关于rk3588零拷贝api和MMZ库的问题
[打印本页]
作者:
roy
时间:
2023-4-18 10:39
标题:
关于rk3588零拷贝api和MMZ库的问题
本帖最后由 roy 于 2023-4-18 10:43 编辑
以下是我现在遇到的问题:
1.我下载了github上的rknpu2源码,想要编译rknn_api_demo,使用脚本 rknpu2/examples/rknn_api_demo/build-android_RK3588.sh想要编译零拷贝相关代码,其中
前2个没有使用到libmpimmz.so这个库,可以运行,但使用里面的接口测试,在1280*960灰度图输入,模型一个1*5*3*3sobel卷积核求五个偏导,1280*960*5灰度图输出下比通用api接口慢很多(零拷贝推理的速度和通用api输入+推理+输出的速度相比慢很多)
2.我想使用下面三个,下面三个会用到libmpimmz.so这个库,但是都运行出错,在两块板子上都是这样,系统是刷的TB-RK3588X_Images_Android_V1.0,应该是目前最新的
dmesg:
[ 1183.423880] RKNPU: failed to wait job, task counter: 0, flags: 0x5, ret = 0, elapsed time: 6132049us
[ 1183.530566] RKNPU: job timeout, flags: 0x0, irq status: 0x0, raw status: 0xc0010000, require mask: 0x300, task counter: 0x0, elapsed time: 6238742us
[ 1183.637225] RKNPU: soft reset
...
[ 1513.179760] RKNPU: failed to wait job, task counter: 0, flags: 0x5, ret = -512, elapsed time: 2266391us
[ 1513.283795] RKNPU: job abort, flags: 0x0, ret: -512, elapsed time: 2370426us
[ 1531.091631] RKNPU: failed to wait job, task counter: 0, flags: 0x5, ret = -512, elapsed time: 1396435us
[ 1531.197047] RKNPU: job abort, flags: 0x0, ret: -512, elapsed time: 1501853us
程序输出:
rk3588_s:/data/rknn_api_demo_Android # ./rknn_set_internal_mem_from_phy_demo model/RK3588/mobilenet_v1.rknn model/dog_224x224.jpg
rknn_api/rknnrt version: 1.4.0 (a10f100eb@2022-09-09T09:06:40), driver version: 0.8.2
total weight size: 4320448, total internal size: 1756160
model input num: 1, output num: 1
input tensors:
index=0, name=input, n_dims=4, dims=[1, 224, 224, 3], n_elems=150528, size=150528, fmt=NHWC, type=INT8, qnt_type=AFFINE, zp=0, scale=0.007812
output tensors:
index=0, name=MobilenetV1/Predictions/Reshape_1, n_dims=2, dims=[1, 1001, 0, 0], n_elems=1001, size=1001, fmt=UNDEFINED, type=INT8, qnt_type=AFFINE, zp=-128, scale=0.003906
custom string:
weight mb info: virt = 0x712bca0000, phys = 0xffffffffffffffff, size: 4320448
internal mb info: virt = 0x712baf3000, phys = 0xffffffffffffffff, size: 1756160
input mb info: virt = 0x73c0441000, phys = 0xffffffffffffffff, size: 150528
output0 mb info: virt = 0x73c1a52000, phys = 0xffffffffffffffff, size = 4004
Begin perf ...
rknn run error -1
作者:
roy
时间:
2023-4-18 10:40
补充:
cat /proc/meminfo:
......
CmaTotal: 131072 kB
CmaAllocated: 5300 kB
CmaReleased: 125772 kB
CmaFree: 124472 kB
欢迎光临 Toybrick (https://t.rock-chips.com/)
Powered by Discuz! X3.3