Toybrick

楼主: chuyee

关于mobilenet rknn模型的推理时间问题

chuyee

中级会员

积分
352
11#
 楼主| 发表于 2019-2-15 15:43:31 | 只看该作者
slim 发表于 2019-2-15 11:20
@chuyee I got the same results. About ~0.7s for mobilenet_ssd.  rknn.eval_perf() is the simulator  ...

That's a critical issue. Can someone from RK confirm?
回复

使用道具 举报

zhangzj

超级版主

积分
1109
12#
发表于 2019-2-15 15:49:49 | 只看该作者
rknn.inference()这个接口耗时是有异常,rockchip工程师目前正在定位,估计下个版本rknn-toolkit会解决。
rknn.eval_perf()这个评估时间是准确的,记录了NPU在推理时的所有op的耗时情况。
回复

使用道具 举报

chuyee

中级会员

积分
352
13#
 楼主| 发表于 2019-2-15 16:39:20 | 只看该作者
One more information, seems like this is a Python specific bug. C API result is much faster. Below is my rknn_mobilenet running time:

rknn_init takes 0.068531s
rknn_query takes 0.000018s
rknn_inputs_set takes 0.001168s
rknn_run takes 0.000126s
rknn_outputs_get takes 0.000637s

perf_run.run_duration = 9993 us

Does anyone know how to map each rknn functions to the perf duration (~10ms)? I know rknn_run() is non-blocking call and rknn_outputs_get() is blocking. But it's only 0.6ms. What else does the 10ms include?
回复

使用道具 举报

yhc

注册会员

积分
177
14#
发表于 2019-2-18 09:48:43 | 只看该作者
这是rknn-toolkit里面的问题,等待更新
回复

使用道具 举报

程子

中级会员

积分
386
15#
发表于 2019-2-19 14:56:59 | 只看该作者
啥时候能修好?
回复

使用道具 举报

zhangzj

超级版主

积分
1109
16#
发表于 2019-2-19 16:38:45 | 只看该作者
程子 发表于 2019-2-19 14:56
啥时候能修好?

下个发布版本就能解决,我这边拿到的内部版本简单测试结果如下:
mobilenet_v1: inference time:0.015120s
mobilenet-ssd:inference time: 0.030780s
回复

使用道具 举报

MraxZhao

注册会员

积分
55
17#
发表于 2019-2-20 20:58:37 | 只看该作者
slim 发表于 2019-2-15 11:20
@chuyee I got the same results. About ~0.7s for mobilenet_ssd.  rknn.eval_perf() is the simulator  ...

怎么确定是否使用NPU?有没有方法
回复

使用道具 举报

MraxZhao

注册会员

积分
55
18#
发表于 2019-2-21 12:39:36 | 只看该作者
slim 发表于 2019-2-15 11:20
@chuyee I got the same results. About ~0.7s for mobilenet_ssd.  rknn.eval_perf() is the simulator  ...

how can i  get the information inferance function using?is NPU or is CPU
回复

使用道具 举报

chuyee

中级会员

积分
352
19#
 楼主| 发表于 2019-2-22 04:43:10 | 只看该作者
MraxZhao 发表于 2019-2-21 12:39
how can i  get the information inferance function using?is NPU or is CPU

I don't know either. I guess it might be done by CPU because inference result is correct while the speed is much slower.
回复

使用道具 举报

troy

版主

积分
2350
20#
发表于 2019-2-26 16:45:45 | 只看该作者
slim 发表于 2019-2-15 11:20
@chuyee I got the same results. About ~0.7s for mobilenet_ssd.  rknn.eval_perf() is the simulator  ...

rknn python推理慢的问题,后续更新版本解决。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

产品中心 购买渠道 开源社区 Wiki教程 资料下载 关于Toybrick


快速回复 返回顶部 返回列表