NPU not working on CM3

I’m trying to get the NPU running on the CM3 but it just won’t work.
I’ve remove the overlay “rk3568-disable-npu”, updated the kernel and tried all the examples. I’ve also tried the Debian and the Ubuntu version, but everytime I get the message:

E RKNN: [16:35:36.210] failed to open rknpu module, need to insmod rknpu dirver!
E RKNN: [16:35:36.211] failed to open rknn device!
rknn_init fail! ret=-1

Can anyone help me with this?

Hello

Which mirror are you using?

Which mirror? Don’t know what exactly you are referring to.

You can try to use this mirror,I remove the overlay “rk3568-disable-npu”, NPU is available
https://github.com/radxa/debos-radxa/releases/download/20230101-1010/radxa-cm3-io-debian-bullseye-xfce4-arm64-20230101-1153-gpt.img.xz

Oh, i see.
I was using the one from the wiki:


I will try your one. Seems to be newer. Maybe it helps.

A little bit has changed: when I remove the overlay rk3568-disable-npu the NPU seems somehow to be available. At least the RAM decreased by 512MB.
But the rest did not change. When I execute the examples from the repository:


I still get the error:
E RKNN: [12:50:42.310] failed to open rknpu module, need to insmod rknpu dirver!
E RKNN: [12:50:42.311] failed to open rknn device!
rknn_init fail! ret=-1

@Alvin did you manage to get the tutorial running?

https://wiki.radxa.com/Rock3/dev/npu-run-test

Yes, I have successfully run RKNN2 SSD DEMO according to the tutorial

Thanks for your reply. There seems to be something wrong with my board. The WLAN0 device is also not available. Maybe there are some hardware issues.

Hello, I checked your log, have you modified the dts, if not, you need to check the hardware
RKNPU fde40000.npu: RKNPU: failed to get vdd regulator for rknpu: -517

Hi,
I have not modified the dts. How do I “check the hardware”? I do have a microscope. Anything that I have to look at? Or measure?

I mean: I just bought it and it did not work from the beginning.

What is the version number of the hardware?

20220526 V1.31A

I didn’t find ModuleV1.31A, I used V1.3 to test RKNPU is available, are you using the Radxa-cm3-io baseboard? Maybe it has something to do with the hardware.

I’m using the Raspberry IO Board. But there seems to be some issues with the CM itself. Wifi used to work in the beginning. But no I just “cant find it anymore”.

I just purchased a new board (2GB RAM / 16GB eMMC / WiFi).
Installed the latest Debian: https://github.com/radxa-build/radxa-cm3-rpi-cm4-io/releases/download/b15/radxa-cm3-rpi-cm4-io_debian_bullseye_cli_b15.img.xz
But can’t get the NPU to run. It always says “failed to open rknn device”.

I also tried:

  • renaming the /boot/dtbo/rk3568-npu-enable.dtbo.disabled to /boot/dtbo/rk3568-npu-enable.dtbo
  • sudo u-boot-update
  • reboot

But still no success. Can someone tell me what to do? @Alvin

I confirmed with the “radxa-cm3-rpi-cm4-io_debian_bullseye_cli_b15.img.xz” you mentioned.
However, we are happy to report that we did not see the symptoms you mentioned.

The criterion for determining whether “NPU” worked as expected is the item “Step3: Run RKNN2 SSD DEMO” listed in “npu-run-test” that you presented.
As a result of executing the contents described here as is, the result was exactly the same as the picture presented as a sample.
Since I am not familiar with “NPU” myself, I have determined that it is functioning correctly based on the above results.

Personally, I think it is unlikely to be hardware dependent, but
The hardware configuration used for verification is presented below.

    Module: "Ver 1.31A(20220526), RAM:4GB, without (eMMC/ WiFi)"
    Carrier board: "Waveshare: CM4-IO-BASE-C"

I should add that in the “radxa-cm3-rpi-cm4-io_debian_bullseye_cli_b15.img.xz” you presented, the “NPU” is enabled by default.
Therefore, there is no need to add any special operations.(etc. add parameter “k3568-npu-enable.dtbo.disabled”)

Could there be something more fundamentally wrong ?
I think it will be difficult to resolve the issue unless your presented detailed of logs.

What kind of logs do you need?

I’m using the Raspberry IO board. Could this be a problem? Other that that it‘s a brand new CM3. But WiFi is not available also. So it might be a problem with the hardware.

If NPU is enabled by default: how much RAM is available then? In my case it‘s the full 2GB. So it‘s not 500MB missing for the NPU.

On CLI version we do not install Rockchip related packages by default. Please retry with the Debian Desktop variant.

You should also enable the overlay via rsetup, which will check if overlays are compatible with your running device.