|
本帖最后由 Lubagov 于 2021-3-2 20:44 编辑
I was glad to receive an answer, thank you very much!
It seems ASUS is not going to update the API at all. What I have is version 1.3.0 released a year ago in Debain 9, and 1.3.2 in Android.
Even though the firmware was updated in December.
I continue to play with this Debian rootfs, and if use form Debian 10 (NPU FW from ASUS, no other seems to work with it):
If i compile app over with preinstalled libs:
- gcc ./main.c -L. -lrknn_api -lpthread
- D RKNNAPI: ==============================================
- D RKNNAPI: RKNN VERSION:
- D RKNNAPI: API: 1.4.0 (bbe0dfc build: 2020-09-14 14:06:05)
- D RKNNAPI: DRV: 1.3.2 (f113d64 build: 2020-04-23 09:35:26)
- D RKNNAPI: ==============================================
and when i check:
- $ strings /usr/lib/aarch64-linux-gnu/librknn_api.so | grep build:
- (bbe0dfc build: 2020-09-14 14:06:05
When i use Python:
- D RKNNAPI: ==============================================
- D RKNNAPI: RKNN VERSION:
- D RKNNAPI: API: 1.6.0 (79320de build: 2020-12-29 10:57:09)
- D RKNNAPI: DRV: 1.3.2 (f113d64 build: 2020-04-23 09:35:26)
- D RKNNAPI: ==============================================
Have small fix it for it can update/download packages fine.
It seems you didn't really want it to be used this image on other boards.
But I am think packages have been updated correctly from your repository.
By the way, the guide in the first post seems a little outdated:
If I execute this command, it becomes very bad:
- pip3 install --user -U tensorflow == 1.14.0
Version is already preinstalled, 2.0.0 and it works, version 1.14.0 does not work.
But it is not solve my problem, in any case, i have same problem when call `rknn_init`, with any other firmware expect 1.3.2 from ASUS:
in c:
- toybrick@debian10:~/test_npu/comp$ ./a.out
- E RKNNAPI: rknn_init, recv(MsgLoadAck) fail, -9(ERROR_PIPE) != 368!
- rknn_init fail! ret=-3
- Segmentation fault
in Python:
- toybrick@debian10:~/test_npu$ python3 testapi.py
- --> Loading RKNN model
- done
- I NPUTransfer: Starting NPU Transfer Client, Transfer version 2.1.0 (b5861e7@2020-11-23T11:50:51)
- E RKNNAPI: rknn_init, recv(MsgLoadAck) fail, -9(ERROR_PIPE) != 368!
- E Catch exception when init runtime!
- E Traceback (most recent call last):
- E File "rknn/api/rknn_base.py", line 844, in rknn.api.rknn_base.RKNNBase.init_runtime
- E File "rknn/api/rknn_runtime.py", line 340, in rknn.api.rknn_runtime.RKNNRuntime.build_graph
- E Exception: RKNN init failed. error code: RKNN_ERR_DEVICE_UNAVAILABLE
- --> Running model
- W We need do some initial work, it will increase call time of inference for the first time.
- I NPUTransfer: Starting NPU Transfer Client, Transfer version 2.1.0 (b5861e7@2020-11-23T11:50:51)
- E NPUTransfer: Transfer interface open failed!, ret = -1
- E RKNNAPI: rknn_init, driver open fail! ret = -1(ERROR_IO)!
- E Catch exception when init model!
- E Traceback (most recent call last):
- E File "rknn/api/rknn_base.py", line 931, in rknn.api.rknn_base.RKNNBase.inference
- E File "rknn/api/rknn_runtime.py", line 340, in rknn.api.rknn_runtime.RKNNRuntime.build_graph
- E Exception: RKNN init failed. error code: RKNN_ERR_DEVICE_UNAVAILABLE
- done
dmesg output in NPU:
- [ 873.529384] android_work: sent uevent USB_STATE=DISCONNECTED
- [ 873.530761] configfs-gadget gadget: unbind function 'Function FS Gadget'/ffffffc0052c1e38
- [ 873.530845] configfs-gadget gadget: unbind function 'Function FS Gadget'/ffffffc0052c1c38
- [ 873.531441] read descriptors
- [ 873.531466] read strings
- [ 874.545684] configfs-gadget fd000000.dwc3: failed to start rockchip: -19
- [ 874.573016] read descriptors
- [ 874.573057] read strings
- [ 874.579310] android_work: did not send uevent (0 0 (null))
- [ 874.706836] android_work: did not send uevent (0 0 (null))
- [ 874.788465] android_work: sent uevent USB_STATE=CONNECTED
- [ 874.819649] configfs-gadget gadget: super-speed config #1: b
- [ 874.819883] android_work: sent uevent USB_STATE=CONFIGURED
|
|