-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to load delegate from libedgetpu.so.1 M.2 Accelerator with Dual Edge TPU #611
Comments
Hello @tehniemer can you please add the below lines here and share the logs.
|
|
can you please try the demo after performing step 3 and 4 at: https://coral.ai/docs/m2/get-started/#2a-on-linux |
I followed that guide from start to finish, including the troubleshooting steps. |
Here's the results from running under the user
|
can you please try the below options:
|
Same errors
|
can you please share the EdgeTPU junction temperature here using the Command below on LInux.
|
root@nvr:~# cat /sys/class/apex/apex_0/temp
45050 |
Thanks! Also please share the output of below commands..
|
root@nvr:~# cat /sys/class/apex/apex_0/hw_temp_warn2
99800
root@nvr:~# cat /sys/class/apex/apex_0/hw_temp_warn2_en
1 |
can you try the demo changing this value to 0. |
Sorry, how do I change that value? |
Please try the command below as super user: |
Looks like the same results. root@nvr:~# cat /sys/class/apex/apex_0/hw_temp_warn2_en
0
root@nvr:~# cd coral/pycoral/
root@nvr:~/coral/pycoral# python3 examples/classify_image.py --model test_data/m obilenet_v2_1.0_224_inat_bird_quant_edgetpu.tflite --labels test_data/inat_bird_ labels.txt --input test_data/parrot.jpg
I tflite/edgetpu_manager_direct.cc:453] No matching device is already opened for shared ownership.
I driver/usb/local_usb_device.cc:944] EnumerateDevices: vendor:0x1a6e, product:0 x89a
I driver/usb/local_usb_device.cc:979] EnumerateDevices: checking bus[2] port[0]
I driver/usb/local_usb_device.cc:979] EnumerateDevices: checking bus[1] port[1]
I driver/usb/local_usb_device.cc:979] EnumerateDevices: checking bus[1] port[0]
I driver/usb/local_usb_device.cc:944] EnumerateDevices: vendor:0x18d1, product:0 x9302
I driver/usb/local_usb_device.cc:979] EnumerateDevices: checking bus[2] port[0]
I driver/usb/local_usb_device.cc:979] EnumerateDevices: checking bus[1] port[1]
I driver/usb/local_usb_device.cc:979] EnumerateDevices: checking bus[1] port[0]
I tflite/edgetpu_context_direct.cc:106] USB always DFU: False (default)
I tflite/edgetpu_context_direct.cc:128] USB bulk-in queue capacity: default
I tflite/edgetpu_context_direct.cc:67] Performance expectation: Max (default)
I ./driver/mmio/host_queue.h:266] Starting in normal mode
I driver/kernel/kernel_registers.cc:83] Opening /dev/apex_0. read_only=0
I driver/kernel/kernel_registers.cc:97] mmap_offset=0x0000000000040000, mmap_siz e=4096
I driver/kernel/kernel_registers.cc:108] Got map addr at 0x0x7f823456c000
I driver/kernel/kernel_registers.cc:97] mmap_offset=0x0000000000044000, mmap_siz e=4096
I driver/kernel/kernel_registers.cc:108] Got map addr at 0x0x7f823456b000
I driver/kernel/kernel_registers.cc:97] mmap_offset=0x0000000000048000, mmap_siz e=4096
I driver/kernel/kernel_registers.cc:108] Got map addr at 0x0x7f8231129000
I driver/kernel/kernel_registers.cc:211] Read: offset = 0x00000000000486f0, valu e: = 0x0000000000000000
I driver/kernel/kernel_registers.cc:190] Write: offset = 0x00000000000487a8, val ue = 0x0000000000000000
I driver/kernel/kernel_registers.cc:122] Closing /dev/apex_0. mmap_offset=0x0000 000000040000, mmap_size=4096, read_only=0
I driver/kernel/kernel_registers.cc:122] Closing /dev/apex_0. mmap_offset=0x0000 000000044000, mmap_size=4096, read_only=0
I driver/kernel/kernel_registers.cc:122] Closing /dev/apex_0. mmap_offset=0x0000 000000048000, mmap_size=4096, read_only=0
I tflite/edgetpu_context_direct.cc:401] Failed to open device [Apex (PCIe)] at [ /dev/apex_0]: Failed precondition: Could not partition page table. : 5 (Operatio n not permitted)
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 160, in load_delegate
delegate = Delegate(library, options)
File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 119, in __init__
raise ValueError(capture.message)
ValueError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/coral/pycoral/examples/classify_image.py", line 122, in <module>
main()
File "/root/coral/pycoral/examples/classify_image.py", line 72, in main
interpreter = make_interpreter(*args.model.split('@'))
File "/usr/lib/python3/dist-packages/pycoral/utils/edgetpu.py", line 87, in ma ke_interpreter
delegates = [load_edgetpu_delegate({'device': device} if device else {})]
File "/usr/lib/python3/dist-packages/pycoral/utils/edgetpu.py", line 52, in lo ad_edgetpu_delegate
return tflite.load_delegate(_EDGETPU_SHARED_LIB, options or {})
File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 162, in load_delegate
raise ValueError('Failed to load delegate from {}\n{}'.format(
ValueError: Failed to load delegate from libedgetpu.so.1 |
Okay, please revert revert the Can you please try the demo after unplug and plugin the device back to host machine, and restarting the machine. Also please share the output of below command:
|
Same results after re-seating the device. That command outputs nothing user@nvr:~/coral/pycoral$ lspci -vvv|grep -i MSI-X
user@nvr:~/coral/pycoral$ |
nevermind, forgot to sudo user@nvr:~/coral/pycoral$ sudo lspci -vvv|grep -i MSI-X
Capabilities: [d0] MSI-X: Enable- Count=128 Masked-
Capabilities: [b0] MSI-X: Enable- Count=4 Masked-
pcilib: sysfs_read_vpd: read failed: Input/output error
Capabilities: [b0] MSI-X: Enable- Count=9 Masked- |
I am not sure how to enable MSI-X support for your host system. It seems MSI-X is disabled on your host system, which is required for M.2/PCIE-e products: |
That was it. I had |
Description
The image classifier test from https://www.coral.ai/docs/m2/get-started/ fails. I had this coral device installed and working in Frigate for months before it quit.
Click to expand!
Issue Type
Support
Operating System
Linux
Coral Device
M.2 Accelerator with dual Edge TPU
Other Devices
No response
Programming Language
Python 3.9
Relevant Log Output
user@nvr:~/coral/pycoral$ ls /dev/apex_0 /dev/apex_0
user@nvr:/root$ lspci -nn | grep 089a 01:00.0 System peripheral [0880]: Global Unichip Corp. Coral Edge TPU [1ac1:089a]
The text was updated successfully, but these errors were encountered: