Rockchip RK3588 and NPU performance.

 

About RK3588

Rockchip was published their new performance ARM(r) Cortex-A76 and A55 clustered SoC in 2020. It has 6 TOPs performance NPU – known as RKNN in SoC that shares system memory with exclusive SRAM.

RKNN

RKNN is a name of Rockchip’s Neural processor unit and it is officially posted supporting 6 tera operations per seconds.
So I need to test it is really useful feature on Embedded Linux kernel 5.10 or 6.1.

Driver upgrading

Most public github based kernels are only supports rknn driver version 0.9.2, not 0.9.6. I was modified kernel based sources to support latest version.

Download “rknpu version 0.9.6 for Linux kernel version 5.10.198”

rknpu-v0.9.6-for-kernel.5.10.198.tar-1.gz – Downloaded 8 times – 40.64 KB

Driver is should be replaced on your Kernel version 5.10.198 as this way.

  • Download above source codes to anywhere you wanted – may it will be to ~/Downloads.
  • Move to your Linux kernel source directory placed Makefile.
  • Remove or change name previous rknpu directory in ${kernel_source}/drivers/rknpu.
  • Extract downloaded source code in kernel source root : tar -xf ${your_download_path}/rknpu-v0.9.6-for-kernel.5.10.198.tar.gz -C .
  • And build kernel again.
  • And flash your kernel to RK3588 system.

When successfully upgraded your rknpu driver, you can see this in dmesg .

Basic tests

I followed rknn toolkit v2.1.0 in 100% C++ with FLTK. RKNN model is YOLOv5 (pre-trained).

Detecting objects in rknn_run(); took around 18 ms per 640×640 dimension and it is fixed issue for pre-trained YOLOv5 model.

Testing with V4L2

Made a graphical test with V4L2 and FLTK. Video source was a traffic video from Youtube on my iPhone.

And results are –

Conclusion

My UVC was 1080p@30Hz, and it detects many objects in real-time of 30 fps as well. It should be better with Rockchip librga engine to scaling image.

Leave a Reply