I updated today to the latest fenix from github and compiled a SD-USB image for kernel 4.9, ubuntu focal, xfce. The system works well but the inception_v3 NPU demo now segfaults. It used to work about a month ago with the same build settings.
I see in the recent git logs that the NPU kernel driver was updated, but the demo binary from gitlab seems older. Maybe it just needs to be recompiled and posted to gitlab aml_npu_demo_binaries again?
here is a trace when I run inception_v3 in gdb:
Starting program: /root/aml_npu_demo_binaries/inceptionv3/VIM3/inceptionv3 inception_v3.nb …/goldfish_299x299.jpg
[Thread debugging using libthread_db enabled]
Using host libthread_db library “/lib/aarch64-linux-gnu/libthread_db.so.1”.
[New Thread 0x7fb591a1c0 (LWP 4970)]
E [_init_tensor:393]Create vx tensor fail.
E [vsi_nn_copy_tensor_patch:2095]Invalid parameter
E [vsi_nn_FillTensorWithValue:575]Copy data to tensor fail
E [_create_tensor:463]Create vx tensor fail.
Thread 1 “inceptionv3” received signal SIGSEGV, Segmentation fault.
0x0000007fb68a7f14 in vsi_nn_DumpGraphToJson () from /lib/libovxlib.so
Next build via ./build_vx.sh
The execute file is create into bin_r.
root@Khadas:~/npu/aml_npu_sdk_6.4.2.1.pour386/linux_sdk/demo/inceptionv3# ls -la bin_r/
total 36800
drwxr-xr-x 2 root root 4096 Nov 1 09:40 .
drwxr-xr-x 4 root root 4096 Nov 1 09:38 …
-rwxr-xr-x 1 root root 129056 Nov 1 09:34 inceptionv3
-rw-r–r-- 1 root root 268203 Nov 1 09:40 input_0.dat
-rw-r–r-- 1 root root 7000 Nov 1 09:34 main.o
-rw-r–r-- 1 root root 2002 Nov 1 09:40 output0_1001_1.dat
-rw-r–r-- 1 root root 4264 Nov 1 09:34 vnn_inceptionv3.o
-rw-r–r-- 1 root root 3952 Nov 1 09:34 vnn_post_process.o
-rw-r–r-- 1 root root 18088 Nov 1 09:34 vnn_pre_process.o
Next execute inceptionv3 :
root@Khadas:~/npu/aml_npu_sdk_6.4.2.1.pour386/linux_sdk/demo/inceptionv3/bin_r# ./inceptionv3 …/bin_demo/VIM3/inception_v3.nb …/bin_demo/goldfish_299x299.jpg
Create Neural Network: 63ms or 63713us
Verify…
Verify Graph: 1ms or 1920us
Start run graph [1] times…
Run the 1 time: 20ms or 20261us
vxProcessGraph execution time:
Total 20ms or 20291us
Average 20.29ms or 20291.00us
— Top5 —
2: 0.844238
795: 0.007973
974: 0.003458
408: 0.002039
393: 0.001868
If your recreate inception_v3.nb, Franck told me that it was necessary to prepare beforehand in your computer ( not khadas ). It is not simply but when we understand the trick, it’s cool…