Toybrick

无法开启NPU,推理报错

tof3d

中级会员

积分
210
发表于 2019-2-27 12:02:23    查看: 26396|回复: 19 | [复制链接]    打印 | 显示全部楼层
本帖最后由 tof3d 于 2019-2-27 16:19 编辑

信息如下,
E NPUTransfer: Transfer interface open failed!, ret = -4
E Catch exception when init runtime!
T Traceback (most recent call last):
T   File "rknn/api/rknn_base.py", line 506, in rknn.api.rknn_base.RKNNBase.init_runtime
T   File "rknn/api/rknn_runtime.py", line 270, in rknn.api.rknn_runtime.RKNNRuntime.build_graph
T Exception: RKNN init failed. error code: RKNN_ERR_DEVICE_UNAVAILABLE
--> Init runtime environment
E NPUTransfer: Transfer interface open failed!, ret = -4
E Catch exception when init runtime!
T Traceback (most recent call last):
T   File "rknn/api/rknn_base.py", line 506, in rknn.api.rknn_base.RKNNBase.init_runtime
T   File "rknn/api/rknn_runtime.py", line 270, in rknn.api.rknn_runtime.RKNNRuntime.build_graph
T Exception: RKNN init failed. error code: RKNN_ERR_DEVICE_UNAVAILABLE

回复

使用道具 举报

tof3d

中级会员

积分
210
 楼主| 发表于 2019-2-27 14:40:28 | 显示全部楼层
这个没有办法解决?
回复

使用道具 举报

tof3d

中级会员

积分
210
 楼主| 发表于 2019-2-27 15:26:10 | 显示全部楼层
你们的demo都没有办法开启npu,我买到一个假的开发板?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复

使用道具 举报

elooon

注册会员

积分
139
发表于 2019-2-27 15:38:10 | 显示全部楼层
我手上的板子跑得好好的,你这个感觉像是通信出了问题。
1.敲一下lsusb命令看看
2.可能npu休眠了?有个命令可以唤醒:npu_powerctrl -r
回复

使用道具 举报

tof3d

中级会员

积分
210
 楼主| 发表于 2019-2-27 16:15:48 | 显示全部楼层
[toybrick@localhost ~]$ lsusb
Bus 002 Device 002: ID 05e3:0616 Genesys Logic, Inc. hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 1a2c:0042 China Resource Semico Co., Ltd
Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 0bda:d723 Realtek Semiconductor Corp.
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub



npu_powerctrl -r
resume 0


[root@localhost mobilenet-ssd]# ls
box_priors.txt  coco_labels_list.txt  dataset.txt  road.bmp  ssd_mobilenet_v1_coco_2017_11_17.pb  ssd_mobilenet_v1_coco.rknn  ssd.py
[root@localhost mobilenet-ssd]# python3 ssd.py
/usr/lib64/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
--> Loading model
done
--> Building model
done
--> Init runtime environment
E NPUTransfer: Transfer interface open failed!, ret = -4
E Catch exception when init runtime!
T Traceback (most recent call last):
T   File "rknn/api/rknn_base.py", line 506, in rknn.api.rknn_base.RKNNBase.init_runtime
T   File "rknn/api/rknn_runtime.py", line 270, in rknn.api.rknn_runtime.RKNNRuntime.build_graph
T Exception: RKNN init failed. error code: RKNN_ERR_DEVICE_UNAVAILABLE
回复

使用道具 举报

elooon

注册会员

积分
139
发表于 2019-2-27 16:45:31 | 显示全部楼层
tof3d 发表于 2019-2-27 16:15
[toybrick@localhost ~]$ lsusb
Bus 002 Device 002: ID 05e3:0616 Genesys Logic, Inc. hub
Bus 002 Devic ...

你可以usb3.0口插个U盘,lsusb看一下能不能认到,排除下是不是usb3.0有问题。
回复

使用道具 举报

tof3d

中级会员

积分
210
 楼主| 发表于 2019-2-27 17:00:19 | 显示全部楼层
usb3.0可以识别到键盘

[root@localhost toybrick]# lsusb
Bus 002 Device 002: ID 05e3:0616 Genesys Logic, Inc. hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 0c45:7603 Microdia
Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 0bda:d723 Realtek Semiconductor Corp.
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[root@localhost toybrick]#
[root@localhost toybrick]#
[root@localhost toybrick]#
[root@localhost toybrick]#
[root@localhost toybrick]# lsusb
Bus 002 Device 002: ID 05e3:0616 Genesys Logic, Inc. hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 0bda:d723 Realtek Semiconductor Corp.
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
回复

使用道具 举报

395876134

版主

积分
1099
发表于 2019-2-27 17:11:43 | 显示全部楼层
重新上电,然后输入lsusb试下,正常300s会进入休眠。
回复

使用道具 举报

tof3d

中级会员

积分
210
 楼主| 发表于 2019-2-27 17:23:21 | 显示全部楼层
本帖最后由 tof3d 于 2019-2-27 17:24 编辑

重拔以后lsusb 这样
toybrick@localhost ~]$ sudo -s
[root@localhost toybrick]# lsusb
Bus 002 Device 002: ID 05e3:0616 Genesys Logic, Inc. hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 0bda:d723 Realtek Semiconductor Corp.
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 0bda:d723 Realtek Semiconductor Corp.
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
然后呢?不明白休眠什么意思

回复

使用道具 举报

tof3d

中级会员

积分
210
 楼主| 发表于 2019-2-27 17:26:39 | 显示全部楼层
程序仍然报错,要做什么操作吗
回复

使用道具 举报

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

本版积分规则

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


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