google-coral / libedgetpu

Source code for the userspace level runtime driver for Coral.ai devices.
Apache License 2.0
181 stars 62 forks source link

Failed to set performance expectation for M.2 edgetpu #11

Closed YijinLiu closed 3 years ago

YijinLiu commented 3 years ago

The error message shows:

W :131] Could not set performance expectation : 11 (Inappropriate ioctl for device)

I am using Ubuntu 18.04, with kernel 5.4.0. I don't see this error message for USB accelerators. I get 7ms/frame on a USB accelerator, only 15ms on the M.2 one. Could the speed difference caused by the error?

marcin-kamionowski commented 3 years ago

Hi! I also had problem like this. I was using apex driver that comes from mainline linux. It does not support this ioctl.

theonlymb commented 3 years ago

Hello!

I am also receiving this message with NXP linux-imx kernel 5.4.70 which is based on Mainline Kernel.

Is this a real "problem" or just a message? My inference is running fine.

Namburger commented 3 years ago

Hey guys, I suggest blacklisting the mainline gasket module and use the one we provided

hack2spider commented 2 years ago

Hi all

I use 2 dual tpus however only one works on either tpu .. but when I click on frigate omn the debug section I can see both tpus (instead of 4 obviously due to the pcie lanes missing) however my inferrence is as bellow :

coral_pci0 | 17.5 | 0 | 232 -- | -- | -- | -- coral_pci1 | 17.41 | 0 | 234

isn`t this slighly high for pcie ?

Starting detection process: 232 [2021-11-16 10:38:54] detector.coral_pci1 INFO : Starting detection process: 234 W driver/beagle/beagle_kernel_top_level_handler.cc:131] Could not set performance expectation : 78 (Inappropriate ioctl for device) W driver/beagle/beagle_kernel_top_level_handler.cc:131] Could not set performance expectation : 80 (Inappropriate ioctl for device) [2021-11-16 10:38:54] frigate.edgetpu INFO : Attempting to load TPU as pci:1 [2021-11-16 10:38:54] ws4py INFO : Using epoll [2021-11-16 10:38:54] frigate.edgetpu INFO : Attempting to load TPU as pci:0 [2021-11-16 10:38:54] frigate.edgetpu INFO : TPU found [2021-11-16 10:38:54] frigate.edgetpu INFO : TPU found

i blacklisted the gasket and used the one provided on coral.ai however there is no difference using the other drivers.

I`m using an LCX and docker. uname -a Linux pve3 5.4.106-1-pve #1 SMP PVE 5.4.106-1 (Fri, 19 Mar 2021 11:08:47 +0100) x86_64 GNU/Linux

its interesting why there is such difference .. I would relly benefit if this could get imporved as I want to make the system more reliable in terms of facial recognition however with low res images you cant and you need proper rezolution and proper resolution and more frames = more tpu power ..

perhaps anyone can look more into this ?

soldierkam commented 2 years ago

Most likely it still uses old version. Please make sure that kernel loaded newer version of modules. There are two of them - gasket and apex (or smth similar).

hack2spider commented 2 years ago

Most likely it still uses old version. Please make sure that kernel loaded newer version of modules. There are two of them - gasket and apex (or smth similar).

thanks for reply ..

I`ve installed the drivers as follow :

1, echo “deb https://packages.cloud.google.com/apt coral-edgetpu-stable main” | tee /etc/apt/sources.list.d/coral-edgetpu.list

curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -

apt install gasket-dkms

sh -c “echo ‘SUBSYSTEM==“apex”, MODE=“0660”, GROUP=“apex”’ >> /etc/udev/rules.d/65-apex.rules”

groupadd apex

adduser $USER apex

apt-get update

apt-get install libedgetpu1-std

now my question is:

was I supposed to do these on the turnkey lxc ? or only on pve ?