Toybrick

标题: 无法开启NPU,推理报错 [打印本页]

作者: tof3d    时间: 2019-2-27 12:02
标题: 无法开启NPU,推理报错
本帖最后由 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    时间: 2019-2-27 14:40
这个没有办法解决?
作者: tof3d    时间: 2019-2-27 15:26
你们的demo都没有办法开启npu,我买到一个假的开发板?
作者: elooon    时间: 2019-2-27 15:38
我手上的板子跑得好好的,你这个感觉像是通信出了问题。
1.敲一下lsusb命令看看
2.可能npu休眠了?有个命令可以唤醒:npu_powerctrl -r
作者: tof3d    时间: 2019-2-27 16:15
[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    时间: 2019-2-27 16:45
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    时间: 2019-2-27 17:00
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    时间: 2019-2-27 17:11
重新上电,然后输入lsusb试下,正常300s会进入休眠。
作者: tof3d    时间: 2019-2-27 17:23
本帖最后由 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    时间: 2019-2-27 17:26
程序仍然报错,要做什么操作吗
作者: 395876134    时间: 2019-2-27 17:37
系统起来就没有1808吗?lsusb的时候!
作者: tof3d    时间: 2019-2-27 18:51
请求帮助
作者: tof3d    时间: 2019-2-27 19:09
请求帮助
作者: tof3d    时间: 2019-2-27 19:10
什么1808,可以截图吗,好像是没有
作者: 程子    时间: 2019-2-27 20:49
[attach]140[/attach]

作者: 程子    时间: 2019-2-27 20:51
RK的Vender ID是2207,推测这个1808应该就是其NPU。

NPU居然是走USB总线的,神奇。
作者: tof3d    时间: 2019-2-28 10:08
没有找到1808 设备,tb rk3399 prod
作者: tof3d    时间: 2019-2-28 14:35
求救,应该如何解决,lsusb 无法找到1808 设备,板子是TB rk3399 proD
作者: jefferyzhang    时间: 2019-2-28 15:19
tof3d 发表于 2019-2-28 14:35
求救,应该如何解决,lsusb 无法找到1808 设备,板子是TB rk3399 proD

进安卓和linux分别试试,如果都无法打开npu的话,就赶紧联系淘宝客服吧
作者: cdzs_3411    时间: 2019-4-11 09:24
请问这个问题最后怎么解决的哇?




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