google-coral / pycoral

Python API for ML inferencing and transfer-learning on Coral devices
https://coral.ai
Apache License 2.0
347 stars 144 forks source link

Coral EdgeTPU USB Support - Not recognized/not changing vendor ID #94

Closed dollarusername2 closed 1 year ago

dollarusername2 commented 1 year ago

Description

Hey folks,

I am trying to get the awesome frigate project to run with my newly bought Coral EdgeTPU USB.

It works fine on the "old" server (details see below), but somehow only shows as the generic USB device in the new, will not be picked up by frigate and will not change vendor ID.

The strange thing: I am using exactly the same docker container of frigate (tested both, latest stable 0.11.1 and 0.10.1), incl. same docker-compose.yaml and frigate.conf file. (Only thing I changed is the name of the HDD volumes). Even the Host OS (Ubuntu Server) is nearly identical. Old server running 22.04.0, new 22.04.1. Both machines where only used for frigate, so no other software installed.

Yet, somehow, the Coral does not seem to work with the newer server.

I tried direct connection, different USB Cable, and two types of external powered HUBs. ALL of them work at the old server, none at the new. So I guess this is not really related to hardware.

The hardware of the "new" (used) server is actually pretty mainstream: Fujitsu ESPRIMO P756 MT | i5-6500 CPU.

Do you have any idea where/how to start debugging this?

Thanks a lot!

PS: The frigate projected pointed me here - if this is the wrong place for this question, could you kindly point me to the right project? Thanks!

Edit: See here for context: https://github.com/blakeblackshear/frigate/issues/4463

Click to expand! ### Issue Type Support ### Operating System Ubuntu ### Coral Device USB Accelerator ### Other Devices _No response_ ### Programming Language Other ### Relevant Log Output ```shell frigate | Traceback (most recent call last): frigate | File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 160, in load_delegate frigate | delegate = Delegate(library, options) frigate | File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 119, in __init__ frigate | raise ValueError(capture.message) frigate | ValueError frigate | frigate | During handling of the above exception, another exception occurred: frigate | frigate | Traceback (most recent call last): frigate | File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap frigate | self.run() frigate | File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run frigate | self._target(*self._args, **self._kwargs) frigate | File "/opt/frigate/frigate/edgetpu.py", line 135, in run_detector frigate | object_detector = LocalObjectDetector( frigate | File "/opt/frigate/frigate/edgetpu.py", line 43, in __init__ frigate | edge_tpu_delegate = load_delegate("libedgetpu.so.1.0", device_config) frigate | File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 162, in load_delegate frigate | raise ValueError('Failed to load delegate from {}\n{}'.format( frigate | ValueError: Failed to load delegate from libedgetpu.so.1.0 frigate | ```
soysauce10 commented 1 year ago

I'm also trying to fix something similar with my setup, but have you seen this? https://github.com/blakeblackshear/frigate/discussions/2599#discussioncomment-3621686

dollarusername2 commented 1 year ago

Hey @soysauce10 ,

Thanks for pointing this out. I tried this at the beginning, but it didn't help. Just to make sure: I just tried again to move the USB from devices to volumes and it didn't help...

Where are you stuck?

hjonnala commented 1 year ago

Hi @dollarusername2 can you try the demo adding the below lines at: https://github.com/google-coral/pycoral/blob/master/examples/classify_image.py#L41 and share the logs..

from pycoral.pybind._pywrap_coral import SetVerbosity as set_verbosity
set_verbosity(10)
dollarusername2 commented 1 year ago

Good evening @hjonnala ,

the demo works fine (after installing virtualenv and the old python...). Vendor ID is changed after running the demo. (However frigate is still not working).

Anyway, please find the verbose logs attached.

Click me `(pycoral-test) mira@esprimo:~/pycoral-test/pycoral$ python3 examples/classify_image.py --model test_data/mobilenet_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/driver_factory_default.cc:31] Failed to open /sys/class/apex: No such file or directory I driver/usb/local_usb_device.cc:944] EnumerateDevices: vendor:0x1a6e, product:0x89a I driver/usb/local_usb_device.cc:979] EnumerateDevices: checking bus[2] port[3] 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[0] I driver/usb/local_usb_device.cc:944] EnumerateDevices: vendor:0x18d1, product:0x9302 I driver/usb/local_usb_device.cc:979] EnumerateDevices: checking bus[2] port[3] I driver/usb/local_usb_device.cc:998] EnumerateDevices: found [/sys/bus/usb/devices/2-3] 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[0] I driver/beagle/beagle_usb_driver_provider.cc:225] Enumerate: adding path [/sys/bus/usb/devices/2-3] I tflite/edgetpu_manager_direct.cc:471] No device of type Apex (PCIe) is available. I tflite/edgetpu_context_direct.cc:106] USB always DFU: False (default) I tflite/edgetpu_context_direct.cc:147] USB bulk-in queue capacity: 8 I tflite/edgetpu_context_direct.cc:63] Performance expectation: High when USB connected EdgeTpu is throttled I driver/usb/usb_driver.cc:1383] Open device and check if DFU is needed I driver/usb/local_usb_device.cc:1013] OpenDevice: [/sys/bus/usb/devices/2-3] I driver/usb/local_usb_device.cc:1050] OpenDevice: checking bus[2] port[3] I driver/usb/local_usb_device.cc:1081] OpenDevice: device opened 0x561e7b38d730 I driver/usb/local_usb_device.cc:184] LocalUsbDevice I driver/usb/usb_standard_commands.cc:36] UsbStandardCommands I driver/usb/usb_dfu_commands.cc:37] UsbDfuCommands I driver/usb/usb_standard_commands.cc:43] GetDeviceDescriptor I driver/usb/local_usb_device.cc:398] GetDescriptor I driver/usb/usb_standard_commands.cc:78] Vender ID: 0x18d1 I driver/usb/usb_standard_commands.cc:79] Product ID: 0x9302 I driver/usb/usb_driver.cc:1410] Device is already in application mode, skipping DFU I driver/usb/usb_driver.cc:1422] Resetting device I driver/usb/local_usb_device.cc:243] Close: closing device 0x561e7b38d730 I driver/usb/local_usb_device.cc:216] DoCancelAllTransfers: cancelling 0 async transfers I driver/usb/local_usb_device.cc:224] DoCancelAllTransfers: waiting for all async transfers to complete I driver/usb/local_usb_device.cc:234] DoCancelAllTransfers: all async transfers have completed I driver/usb/local_usb_device.cc:276] Close: releasing 0 transfer buffers I driver/usb/local_usb_device.cc:289] Close: performing graceful reset I driver/usb/local_usb_device.cc:322] Close: final clean up completed I driver/usb/usb_driver.cc:1364] Opening device expecting application mode I driver/usb/local_usb_device.cc:1013] OpenDevice: [/sys/bus/usb/devices/2-3] I driver/usb/local_usb_device.cc:1050] OpenDevice: checking bus[2] port[3] I driver/usb/local_usb_device.cc:1081] OpenDevice: device opened 0x561e7b397de0 I driver/usb/local_usb_device.cc:184] LocalUsbDevice I driver/usb/usb_standard_commands.cc:36] UsbStandardCommands I driver/usb/usb_ml_commands.cc:47] UsbMlCommands I driver/usb/usb_dfu_commands.cc:40] ~UsbDfuCommands I driver/usb/usb_standard_commands.cc:39] ~UsbStandardCommands I driver/usb/local_usb_device.cc:196] ~LocalUsbDevice I driver/usb/local_usb_device.cc:243] Close: closing device (nil) I driver/usb/local_usb_device.cc:352] ClaimInterface I driver/usb/usb_ml_commands.cc:80] ReadRegister32 offset 0x1a30c I driver/usb/local_usb_device.cc:514] SendControlCommandWithDataIn I driver/usb/local_usb_device.cc:521] SYNC CTRL WITH DATA IN begin I driver/usb/local_usb_device.cc:538] SYNC CTRL WITH DATA IN end I driver/usb/usb_ml_commands.cc:110] ReadRegister32 [0x1A30C] == 0xF0059 I driver/usb/usb_ml_commands.cc:153] WriteRegister32 [0x1A30C] := 0xF0059 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:80] ReadRegister32 offset 0x1a314 I driver/usb/local_usb_device.cc:514] SendControlCommandWithDataIn I driver/usb/local_usb_device.cc:521] SYNC CTRL WITH DATA IN begin I driver/usb/local_usb_device.cc:538] SYNC CTRL WITH DATA IN end I driver/usb/usb_ml_commands.cc:110] ReadRegister32 [0x1A314] == 0x110000 I driver/usb/usb_ml_commands.cc:80] ReadRegister32 offset 0x1a318 I driver/usb/local_usb_device.cc:514] SendControlCommandWithDataIn I driver/usb/local_usb_device.cc:521] SYNC CTRL WITH DATA IN begin I driver/usb/local_usb_device.cc:538] SYNC CTRL WITH DATA IN end I driver/usb/usb_ml_commands.cc:110] ReadRegister32 [0x1A318] == 0x50C5025C I driver/usb/usb_ml_commands.cc:80] ReadRegister32 offset 0x1a318 I driver/usb/local_usb_device.cc:514] SendControlCommandWithDataIn I driver/usb/local_usb_device.cc:521] SYNC CTRL WITH DATA IN begin I driver/usb/local_usb_device.cc:538] SYNC CTRL WITH DATA IN end I driver/usb/usb_ml_commands.cc:110] ReadRegister32 [0x1A318] == 0x50C5025C I driver/usb/usb_ml_commands.cc:153] WriteRegister32 [0x1A318] := 0x5085025C I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:80] ReadRegister32 offset 0x1a318 I driver/usb/local_usb_device.cc:514] SendControlCommandWithDataIn I driver/usb/local_usb_device.cc:521] SYNC CTRL WITH DATA IN begin I driver/usb/local_usb_device.cc:538] SYNC CTRL WITH DATA IN end I driver/usb/usb_ml_commands.cc:110] ReadRegister32 [0x1A318] == 0x50850004 I driver/usb/usb_ml_commands.cc:117] ReadRegister64 offset 0x44018 I driver/usb/local_usb_device.cc:514] SendControlCommandWithDataIn I driver/usb/local_usb_device.cc:521] SYNC CTRL WITH DATA IN begin I driver/usb/local_usb_device.cc:538] SYNC CTRL WITH DATA IN end I driver/usb/usb_ml_commands.cc:147] ReadRegister64 [0x44018] == 0x0 I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x4A000] := 0x1 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x48788] := 0x7F I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:117] ReadRegister64 offset 0x48788 I driver/usb/local_usb_device.cc:514] SendControlCommandWithDataIn I driver/usb/local_usb_device.cc:521] SYNC CTRL WITH DATA IN begin I driver/usb/local_usb_device.cc:538] SYNC CTRL WITH DATA IN end I driver/usb/usb_ml_commands.cc:147] ReadRegister64 [0x48788] == 0x7F I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x40020] := 0x1E02 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:80] ReadRegister32 offset 0x1a314 I driver/usb/local_usb_device.cc:514] SendControlCommandWithDataIn I driver/usb/local_usb_device.cc:521] SYNC CTRL WITH DATA IN begin I driver/usb/local_usb_device.cc:538] SYNC CTRL WITH DATA IN end I driver/usb/usb_ml_commands.cc:110] ReadRegister32 [0x1A314] == 0x110000 I driver/usb/usb_ml_commands.cc:153] WriteRegister32 [0x1A314] := 0x150000 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:80] ReadRegister32 offset 0x1a000 I driver/usb/local_usb_device.cc:514] SendControlCommandWithDataIn I driver/usb/local_usb_device.cc:521] SYNC CTRL WITH DATA IN begin I driver/usb/local_usb_device.cc:538] SYNC CTRL WITH DATA IN end I driver/usb/usb_ml_commands.cc:110] ReadRegister32 [0x1A000] == 0x219089A I driver/usb/usb_driver.cc:321] e-fuse programming revision: 2 I driver/usb/usb_driver.cc:328] InitializeChip Enabling only sc host interrupt descriptors I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x4C148] := 0xF0 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_driver.cc:341] InitializeChip Enabling single EP mode I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x4C160] := 0x0 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_driver.cc:369] InitializeChip Setting 1KB chunk for bulk-ins I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x4C058] := 0x80 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x44018] := 0x1 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x44158] := 0x1 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x44198] := 0x1 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x441D8] := 0x1 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x44218] := 0x1 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x48788] := 0x7F I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:117] ReadRegister64 offset 0x48788 I driver/usb/local_usb_device.cc:514] SendControlCommandWithDataIn I driver/usb/local_usb_device.cc:521] SYNC CTRL WITH DATA IN begin I driver/usb/local_usb_device.cc:538] SYNC CTRL WITH DATA IN end I driver/usb/usb_ml_commands.cc:147] ReadRegister64 [0x48788] == 0x7F I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x400C0] := 0x1 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x40150] := 0x1 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x40110] := 0x1 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x40250] := 0x1 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x40298] := 0x1 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x402E0] := 0x1 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x40328] := 0x1 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x40190] := 0x1 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x401D0] := 0x1 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x40210] := 0x1 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x4C060] := 0x1 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x4C070] := 0x1 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x4C080] := 0x1 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x4C090] := 0x1 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x4C0A0] := 0x1 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:80] ReadRegister32 offset 0x1a0d4 I driver/usb/local_usb_device.cc:514] SendControlCommandWithDataIn I driver/usb/local_usb_device.cc:521] SYNC CTRL WITH DATA IN begin I driver/usb/local_usb_device.cc:538] SYNC CTRL WITH DATA IN end I driver/usb/usb_ml_commands.cc:110] ReadRegister32 [0x1A0D4] == 0x1 I driver/usb/usb_ml_commands.cc:153] WriteRegister32 [0x1A0D4] := 0x80000001 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:80] ReadRegister32 offset 0x1a704 I driver/usb/local_usb_device.cc:514] SendControlCommandWithDataIn I driver/usb/local_usb_device.cc:521] SYNC CTRL WITH DATA IN begin I driver/usb/local_usb_device.cc:538] SYNC CTRL WITH DATA IN end I driver/usb/usb_ml_commands.cc:110] ReadRegister32 [0x1A704] == 0x70007F I driver/usb/usb_ml_commands.cc:153] WriteRegister32 [0x1A704] := 0x7F I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:80] ReadRegister32 offset 0x1a33c I driver/usb/local_usb_device.cc:514] SendControlCommandWithDataIn I driver/usb/local_usb_device.cc:521] SYNC CTRL WITH DATA IN begin I driver/usb/local_usb_device.cc:538] SYNC CTRL WITH DATA IN end I driver/usb/usb_ml_commands.cc:110] ReadRegister32 [0x1A33C] == 0xC003F I driver/usb/usb_ml_commands.cc:153] WriteRegister32 [0x1A33C] := 0x3F I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:153] WriteRegister32 [0x1A500] := 0x1 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:153] WriteRegister32 [0x1A600] := 0x1 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:153] WriteRegister32 [0x1A558] := 0x3 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:153] WriteRegister32 [0x1A658] := 0x3 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:80] ReadRegister32 offset 0x1a0d8 I driver/usb/local_usb_device.cc:514] SendControlCommandWithDataIn I driver/usb/local_usb_device.cc:521] SYNC CTRL WITH DATA IN begin I driver/usb/local_usb_device.cc:538] SYNC CTRL WITH DATA IN end I driver/usb/usb_ml_commands.cc:110] ReadRegister32 [0x1A0D8] == 0x0 I driver/usb/usb_ml_commands.cc:153] WriteRegister32 [0x1A0D8] := 0x80000000 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I tflite/edgetpu_context_direct.cc:174] Opening device at /sys/bus/usb/devices/2-3 I driver/usb/usb_driver.cc:1155] WorkerThreadFunc starting worker thread I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 0 callback events in worker thread I driver/usb/usb_driver.cc:1210] WorkerThreadFunc Re-installing event reader I driver/usb/local_usb_device.cc:748] AsyncBulkInTransfer I driver/usb/local_usb_device.cc:761] ASYNC IN 2 begin I driver/usb/usb_driver.cc:1232] WorkerThreadFunc Re-installing interrupt reader I driver/usb/local_usb_device.cc:785] AsyncInterruptInTransfer I driver/usb/local_usb_device.cc:798] ASYNC IN 3 begin I driver/usb/usb_driver.cc:1260] WorkerThreadFunc Installing bulk-in reader. buffer index [0] I driver/usb/local_usb_device.cc:748] AsyncBulkInTransfer I driver/usb/local_usb_device.cc:761] ASYNC IN 1 begin I driver/usb/usb_driver.cc:1260] WorkerThreadFunc Installing bulk-in reader. buffer index [1] I driver/usb/local_usb_device.cc:748] AsyncBulkInTransfer I driver/usb/local_usb_device.cc:761] ASYNC IN 1 begin I driver/usb/usb_driver.cc:1260] WorkerThreadFunc Installing bulk-in reader. buffer index [2] I driver/usb/local_usb_device.cc:748] AsyncBulkInTransfer I driver/usb/local_usb_device.cc:761] ASYNC IN 1 begin I driver/usb/usb_driver.cc:1260] WorkerThreadFunc Installing bulk-in reader. buffer index [3] I driver/usb/local_usb_device.cc:748] AsyncBulkInTransfer I driver/usb/local_usb_device.cc:761] ASYNC IN 1 begin I driver/usb/usb_driver.cc:1260] WorkerThreadFunc Installing bulk-in reader. buffer index [4] I driver/usb/local_usb_device.cc:748] AsyncBulkInTransfer I driver/usb/local_usb_device.cc:761] ASYNC IN 1 begin I driver/usb/usb_driver.cc:1260] WorkerThreadFunc Installing bulk-in reader. buffer index [5] I driver/usb/local_usb_device.cc:748] AsyncBulkInTransfer I driver/usb/local_usb_device.cc:761] ASYNC IN 1 begin I driver/usb/usb_driver.cc:1260] WorkerThreadFunc Installing bulk-in reader. buffer index [6] I driver/usb/local_usb_device.cc:748] AsyncBulkInTransfer I driver/usb/local_usb_device.cc:761] ASYNC IN 1 begin I driver/usb/usb_driver.cc:1260] WorkerThreadFunc Installing bulk-in reader. buffer index [7] I driver/usb/local_usb_device.cc:748] AsyncBulkInTransfer I driver/usb/local_usb_device.cc:761] ASYNC IN 1 begin I driver/usb/usb_driver.cc:1317] WorkerThreadFunc waiting on state change I driver/usb/usb_driver.cc:91] Unlocks both mutex /home/mira/pycoral-test/pycoral/examples/classify_image.py:82: DeprecationWarning: ANTIALIAS is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.LANCZOS instead. image = Image.open(args.input).convert('RGB').resize(size, Image.ANTIALIAS) ----INFERENCE TIME---- Note: The first inference on Edge TPU is slow because it includes loading the model into Edge TPU memory. I driver/request.cc:47] Adding input "map/TensorArrayStack/TensorArrayGatherV3" with 150528 bytes. I driver/request.cc:58] Adding output "prediction" with 965 bytes. I driver/request.cc:167] Request prepared, total batch size: 1, total TPU requests required: 1. I driver/driver.cc:307] Request [0]: Submitting P0 request immediately. I driver/driver.cc:369] Request [0]: Need to map parameters. I driver/driver.cc:249] Mapped params : Buffer(ptr=0x7fe28c070000) -> 0x00007fe28c070000, 3947392 bytes. I driver/driver.cc:249] Mapped params : Buffer(ptr=(nil)) -> 0x0000000000000000, 0 bytes. I driver/driver.cc:383] Request [0]: Need to do parameter-caching. I driver/single_tpu_request.cc:80] [0] Request constructed. I driver/instruction_buffers.cc:46] InstructionBuffers created. I driver/package_registry.cc:647] Created new instruction buffers. I driver/device_buffer_mapper.cc:75] Mapped scratch : Buffer(ptr=(nil)) -> 0x0000000000000000, 0 bytes. I driver/single_tpu_request.cc:365] MapDataBuffers() done. I driver/executable_util.cc:187] Linking Parameter: 0x00007fe28c070000 I driver/device_buffer_mapper.cc:222] Mapped "instructions" : Buffer(ptr=0x561e7b40a000) -> 0x0000561e7b40a000, 10064 bytes. Direction=1 I driver/single_tpu_request.cc:381] MapInstructionBuffers() done. I driver/single_tpu_request.cc:478] [0] SetState old=0, new=1. I driver/single_tpu_request.cc:390] [0] NotifyRequestSubmitted() I driver/single_tpu_request.cc:478] [0] SetState old=1, new=2. I driver/single_queue_dma_scheduler.cc:82] Request[0]: Submitted I driver/dma_info_extractor.cc:166] DMA[0]: Instruction: device_address = 0x561e7b40a000, bytes = 10064, pending I driver/dma_info_extractor.cc:166] DMA[1]: Parameter: device_address = 0x7fe28c070000, bytes = 3947392, pending I driver/dma_info_extractor.cc:166] DMA[2]: SC interrupt 0 I driver/single_tpu_request.cc:80] [1] Request constructed. I driver/single_tpu_request.cc:113] Adding input "map/TensorArrayStack/TensorArrayGatherV3" with 150528 bytes. I driver/single_tpu_request.cc:187] Adding output "prediction" with 965 bytes. I driver/usb/usb_driver.cc:86] lock (does nothing) I driver/usb/usb_driver.cc:1322] WorkerThreadFunc driver state change detected I driver/instruction_buffers.cc:46] InstructionBuffers created. I driver/package_registry.cc:647] Created new instruction buffers. I driver/device_buffer_mapper.cc:75] Mapped scratch : Buffer(ptr=(nil)) -> 0x0000000000000000, 0 bytes. I driver/device_buffer_mapper.cc:222] Mapped "map/TensorArrayStack/TensorArrayGatherV3" : Buffer(ptr=0x561e7b3b0c40) -> 0x0000561e7b3b0c40, 150528 bytes. Direction=1 I driver/device_buffer_mapper.cc:222] Mapped "prediction" : Buffer(ptr=0x561e7b40f000) -> 0x0000561e7b40f000, 968 bytes. Direction=2 I driver/single_tpu_request.cc:365] MapDataBuffers() done. I driver/executable_util.cc:93] Linking map/TensorArrayStack/TensorArrayGatherV3[0]: 0x0000561e7b3b0c40 I driver/executable_util.cc:93] Linking prediction[0]: 0x0000561e7b40f000 I driver/device_buffer_mapper.cc:222] Mapped "instructions" : Buffer(ptr=0x561e7b42f000) -> 0x0000561e7b42f000, 261920 bytes. Direction=1 I driver/device_buffer_mapper.cc:222] Mapped "instructions" : Buffer(ptr=0x561e7b411000) -> 0x0000561e7b411000, 10224 bytes. Direction=1 I driver/single_tpu_request.cc:381] MapInstructionBuffers() done. I driver/single_tpu_request.cc:478] [1] SetState old=0, new=1. I driver/single_tpu_request.cc:390] [1] NotifyRequestSubmitted() I driver/single_tpu_request.cc:478] [1] SetState old=1, new=2. I driver/single_queue_dma_scheduler.cc:82] Request[1]: Submitted I driver/dma_info_extractor.cc:166] DMA[0]: Instruction: device_address = 0x561e7b42f000, bytes = 261920, pending I driver/dma_info_extractor.cc:166] DMA[1]: Input activation: device_address = 0x561e7b3b0c40, bytes = 150528, pending I driver/dma_info_extractor.cc:166] DMA[2]: Instruction: device_address = 0x561e7b411000, bytes = 10224, pending I driver/dma_info_extractor.cc:166] DMA[3]: Output activation: device_address = 0x561e7b40f000, bytes = 968, pending I driver/dma_info_extractor.cc:166] DMA[4]: SC interrupt 0 I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 0 callback events in worker thread I driver/single_tpu_request.cc:398] [0] NotifyRequestActive() I driver/single_tpu_request.cc:478] [0] SetState old=2, new=3. I driver/single_queue_dma_scheduler.cc:132] Request[0]: Scheduling DMA[0] I driver/single_queue_dma_scheduler.cc:132] Request[0]: Scheduling DMA[1] I driver/single_queue_dma_scheduler.cc:132] Request[0]: Scheduling DMA[2] I driver/single_tpu_request.cc:398] [1] NotifyRequestActive() I driver/single_tpu_request.cc:478] [1] SetState old=2, new=3. I driver/single_queue_dma_scheduler.cc:132] Request[1]: Scheduling DMA[0] I driver/single_queue_dma_scheduler.cc:132] Request[1]: Scheduling DMA[1] I driver/single_queue_dma_scheduler.cc:132] Request[1]: Scheduling DMA[2] I driver/single_queue_dma_scheduler.cc:132] Request[1]: Scheduling DMA[3] I driver/single_queue_dma_scheduler.cc:132] Request[1]: Scheduling DMA[4] I driver/usb/usb_driver.cc:777] ProcessIo [0-0] bulk out header I driver/usb/usb_ml_commands.cc:215] PrepareHeader ep 1: header hex 50 27 0 0 - 0 0 0 0 I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/dma_chunker.cc:42] Completed 0 bytes; Outstanding 0 bytes; Processing next 10064 bytes I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/usb/usb_driver.cc:777] ProcessIo [1-2] bulk out header I driver/usb/usb_ml_commands.cc:215] PrepareHeader ep 1: header hex 80 3b 3c 0 - 2 0 0 0 I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/dma_chunker.cc:42] Completed 0 bytes; Outstanding 0 bytes; Processing next 1048576 bytes I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:1310] WorkerThreadFunc re-evaluation is needed I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 1 callback events in worker thread I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/usb_driver.cc:796] [0-0] bulk out for header done I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:850] operator() [0-0] bulk out for 10064 bytes done I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/single_queue_dma_scheduler.cc:154] Completing DMA[0] I driver/usb/usb_driver.cc:550] IO completed I driver/dma_chunker.cc:42] Completed 0 bytes; Outstanding 1048576 bytes; Processing next 1048576 bytes I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/usb/usb_driver.cc:1310] WorkerThreadFunc re-evaluation is needed I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 1 callback events in worker thread I driver/usb/usb_driver.cc:796] [1-2] bulk out for header done I driver/dma_chunker.cc:42] Completed 0 bytes; Outstanding 2097152 bytes; Processing next 1048576 bytes I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/usb/usb_driver.cc:1310] WorkerThreadFunc re-evaluation is needed I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 0 callback events in worker thread I driver/usb/usb_driver.cc:643] [1-2] number of concurrent transfers too high, wait (3 >= 3) I driver/usb/usb_driver.cc:1317] WorkerThreadFunc waiting on state change I driver/usb/usb_driver.cc:91] Unlocks both mutex I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:86] lock (does nothing) I driver/usb/usb_driver.cc:1322] WorkerThreadFunc driver state change detected I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 1 callback events in worker thread I driver/usb/usb_driver.cc:850] operator() [1-2] bulk out for 1048576 bytes done I driver/dma_chunker.cc:42] Completed 1048576 bytes; Outstanding 2097152 bytes; Processing next 801664 bytes I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/usb/usb_driver.cc:643] [0-0] number of concurrent transfers too high, wait (3 >= 3) I driver/usb/usb_driver.cc:1310] WorkerThreadFunc re-evaluation is needed I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 0 callback events in worker thread I driver/usb/usb_driver.cc:643] [1-2] number of concurrent transfers too high, wait (3 >= 3) I driver/usb/usb_driver.cc:1317] WorkerThreadFunc waiting on state change I driver/usb/usb_driver.cc:91] Unlocks both mutex I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:86] lock (does nothing) I driver/usb/usb_driver.cc:1322] WorkerThreadFunc driver state change detected I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 1 callback events in worker thread I driver/usb/usb_driver.cc:850] operator() [1-2] bulk out for 1048576 bytes done I driver/usb/usb_driver.cc:777] ProcessIo [0-0] bulk out header I driver/usb/usb_ml_commands.cc:215] PrepareHeader ep 1: header hex 20 ff 3 0 - 0 0 0 0 I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/dma_chunker.cc:42] Completed 0 bytes; Outstanding 0 bytes; Processing next 261920 bytes I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/usb/usb_driver.cc:643] [1-1] number of concurrent transfers too high, wait (4 >= 3) I driver/usb/usb_driver.cc:1310] WorkerThreadFunc re-evaluation is needed I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 0 callback events in worker thread I driver/usb/usb_driver.cc:643] [0-0] number of concurrent transfers too high, wait (3 >= 3) I driver/usb/usb_driver.cc:1317] WorkerThreadFunc waiting on state change I driver/usb/usb_driver.cc:91] Unlocks both mutex I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:86] lock (does nothing) I driver/usb/usb_driver.cc:1322] WorkerThreadFunc driver state change detected I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 1 callback events in worker thread I driver/usb/usb_driver.cc:850] operator() [1-2] bulk out for 1048576 bytes done I driver/usb/usb_driver.cc:777] ProcessIo [1-1] bulk out header I driver/usb/usb_ml_commands.cc:215] PrepareHeader ep 1: header hex 0 4c 2 0 - 1 0 0 0 I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/dma_chunker.cc:42] Completed 0 bytes; Outstanding 0 bytes; Processing next 150528 bytes I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/usb/usb_driver.cc:643] [2-0] number of concurrent transfers too high, wait (4 >= 3) I driver/usb/usb_driver.cc:1310] WorkerThreadFunc re-evaluation is needed I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 0 callback events in worker thread I driver/usb/usb_driver.cc:643] [1-1] number of concurrent transfers too high, wait (3 >= 3) I driver/usb/usb_driver.cc:1317] WorkerThreadFunc waiting on state change I driver/usb/usb_driver.cc:91] Unlocks both mutex I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/usb_driver.cc:86] lock (does nothing) I driver/usb/usb_driver.cc:1322] WorkerThreadFunc driver state change detected I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 2 callback events in worker thread I driver/usb/local_usb_device.cc:672] ASYNC IN 2 end I driver/usb/usb_ml_commands.cc:258] operator() tag:4, offset:0x0, length 0 I driver/usb/usb_driver.cc:850] operator() [1-2] bulk out for 801664 bytes done I driver/usb/usb_ml_commands.cc:266] operator() callback done I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:796] [0-0] bulk out for header done I driver/usb/usb_driver.cc:1050] Digesting descriptor from device tag[4], data[0x0], size[0] I driver/usb/usb_io_request.cc:94] DMA[2] hint matched with descriptor I driver/usb/usb_driver.cc:1210] WorkerThreadFunc Re-installing event reader I driver/usb/local_usb_device.cc:748] AsyncBulkInTransfer I driver/usb/local_usb_device.cc:761] ASYNC IN 2 begin I driver/single_queue_dma_scheduler.cc:154] Completing DMA[1] I driver/usb/usb_driver.cc:550] IO completed I driver/single_queue_dma_scheduler.cc:154] Completing DMA[2] I driver/single_tpu_request.cc:410] [0] NotifyCompletion() I driver/package_registry.cc:658] Returned instruction buffers back to executable reference I driver/single_tpu_request.cc:478] [0] SetState old=3, new=4. I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/single_queue_dma_scheduler.cc:234] Request[0]: Completed I driver/single_tpu_request.cc:96] [0] Request destroyed. I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/usb_driver.cc:550] IO completed I driver/usb/usb_driver.cc:777] ProcessIo [2-0] bulk out header I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_ml_commands.cc:215] PrepareHeader ep 1: header hex f0 27 0 0 - 0 0 0 0 I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/dma_chunker.cc:42] Completed 0 bytes; Outstanding 0 bytes; Processing next 10224 bytes I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/usb/usb_driver.cc:1310] WorkerThreadFunc re-evaluation is needed I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 4 callback events in worker thread I driver/usb/usb_driver.cc:850] operator() [0-0] bulk out for 261920 bytes done I driver/usb/usb_driver.cc:796] [1-1] bulk out for header done I driver/usb/usb_driver.cc:850] operator() [1-1] bulk out for 150528 bytes done I driver/usb/usb_driver.cc:796] [2-0] bulk out for header done I driver/single_queue_dma_scheduler.cc:154] Completing DMA[0] I driver/usb/usb_driver.cc:550] IO completed I driver/single_queue_dma_scheduler.cc:154] Completing DMA[1] I driver/usb/usb_driver.cc:550] IO completed I driver/usb/usb_driver.cc:1317] WorkerThreadFunc waiting on state change I driver/usb/usb_driver.cc:91] Unlocks both mutex I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:86] lock (does nothing) I driver/usb/usb_driver.cc:1322] WorkerThreadFunc driver state change detected I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 1 callback events in worker thread I driver/usb/usb_driver.cc:850] operator() [2-0] bulk out for 10224 bytes done I driver/single_queue_dma_scheduler.cc:154] Completing DMA[2] I driver/usb/usb_driver.cc:550] IO completed I driver/usb/usb_driver.cc:1317] WorkerThreadFunc waiting on state change I driver/usb/usb_driver.cc:91] Unlocks both mutex I driver/usb/local_usb_device.cc:672] ASYNC IN 1 end I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:86] lock (does nothing) I driver/usb/local_usb_device.cc:672] ASYNC IN 2 end I driver/usb/usb_ml_commands.cc:258] operator() tag:4, offset:0x0, length 0 I driver/usb/usb_ml_commands.cc:266] operator() callback done I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:1322] WorkerThreadFunc driver state change detected I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 2 callback events in worker thread I driver/usb/usb_driver.cc:1138] bulk in 968 bytes from buffer index [0] I driver/usb/usb_driver.cc:1050] Digesting descriptor from device tag[4], data[0x0], size[0] I driver/usb/usb_io_request.cc:94] DMA[4] hint matched with descriptor I driver/usb/usb_driver.cc:1210] WorkerThreadFunc Re-installing event reader I driver/usb/local_usb_device.cc:748] AsyncBulkInTransfer I driver/usb/local_usb_device.cc:761] ASYNC IN 2 begin I driver/dma_chunker.cc:30] Completed 0 bytes; Outstanding 0 bytes; Processing next 968 bytes I driver/usb/usb_driver.cc:916] [3-3] bulk in for 968 bytes has yielded 968 bytes from index [0] I driver/usb/usb_driver.cc:1310] WorkerThreadFunc re-evaluation is needed I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 0 callback events in worker thread I driver/usb/usb_driver.cc:1260] WorkerThreadFunc Installing bulk-in reader. buffer index [0] I driver/usb/local_usb_device.cc:748] AsyncBulkInTransfer I driver/usb/local_usb_device.cc:761] ASYNC IN 1 begin I driver/single_queue_dma_scheduler.cc:154] Completing DMA[3] I driver/usb/usb_driver.cc:550] IO completed I driver/single_queue_dma_scheduler.cc:154] Completing DMA[4] I driver/single_tpu_request.cc:410] [1] NotifyCompletion() I driver/package_registry.cc:658] Returned instruction buffers back to executable reference I driver/single_tpu_request.cc:478] [1] SetState old=3, new=4. I driver/single_queue_dma_scheduler.cc:234] Request[1]: Completed I driver/single_tpu_request.cc:96] [1] Request destroyed. I driver/usb/usb_driver.cc:550] IO completed I driver/usb/usb_driver.cc:1317] WorkerThreadFunc waiting on state change I driver/usb/usb_driver.cc:91] Unlocks both mutex 14.0ms I driver/request.cc:47] Adding input "map/TensorArrayStack/TensorArrayGatherV3" with 150528 bytes. I driver/request.cc:58] Adding output "prediction" with 965 bytes. I driver/request.cc:167] Request prepared, total batch size: 1, total TPU requests required: 1. I driver/driver.cc:307] Request [1]: Submitting P0 request immediately. I driver/single_tpu_request.cc:80] [2] Request constructed. I driver/single_tpu_request.cc:113] Adding input "map/TensorArrayStack/TensorArrayGatherV3" with 150528 bytes. I driver/single_tpu_request.cc:187] Adding output "prediction" with 965 bytes. I driver/package_registry.cc:639] Reusing old instruction buffers. I driver/device_buffer_mapper.cc:75] Mapped scratch : Buffer(ptr=(nil)) -> 0x0000000000000000, 0 bytes. I driver/device_buffer_mapper.cc:222] Mapped "map/TensorArrayStack/TensorArrayGatherV3" : Buffer(ptr=0x561e7b3b0c40) -> 0x0000561e7b3b0c40, 150528 bytes. Direction=1 I driver/device_buffer_mapper.cc:222] Mapped "prediction" : Buffer(ptr=0x561e7b403000) -> 0x0000561e7b403000, 968 bytes. Direction=2 I driver/single_tpu_request.cc:365] MapDataBuffers() done. I driver/executable_util.cc:93] Linking map/TensorArrayStack/TensorArrayGatherV3[0]: 0x0000561e7b3b0c40 I driver/executable_util.cc:93] Linking prediction[0]: 0x0000561e7b403000 I driver/device_buffer_mapper.cc:222] Mapped "instructions" : Buffer(ptr=0x561e7b42f000) -> 0x0000561e7b42f000, 261920 bytes. Direction=1 I driver/device_buffer_mapper.cc:222] Mapped "instructions" : Buffer(ptr=0x561e7b411000) -> 0x0000561e7b411000, 10224 bytes. Direction=1 I driver/single_tpu_request.cc:381] MapInstructionBuffers() done. I driver/single_tpu_request.cc:478] [2] SetState old=0, new=1. I driver/single_tpu_request.cc:390] [2] NotifyRequestSubmitted() I driver/single_tpu_request.cc:478] [2] SetState old=1, new=2. I driver/single_queue_dma_scheduler.cc:82] Request[2]: Submitted I driver/dma_info_extractor.cc:166] DMA[0]: Instruction: device_address = 0x561e7b42f000, bytes = 261920, pending I driver/dma_info_extractor.cc:166] DMA[1]: Input activation: device_address = 0x561e7b3b0c40, bytes = 150528, pending I driver/dma_info_extractor.cc:166] DMA[2]: Instruction: device_address = 0x561e7b411000, bytes = 10224, pending I driver/dma_info_extractor.cc:166] DMA[3]: Output activation: device_address = 0x561e7b403000, bytes = 968, pending I driver/dma_info_extractor.cc:166] DMA[4]: SC interrupt 0 I driver/usb/usb_driver.cc:86] lock (does nothing) I driver/usb/usb_driver.cc:1322] WorkerThreadFunc driver state change detected I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 0 callback events in worker thread I driver/single_tpu_request.cc:398] [2] NotifyRequestActive() I driver/single_tpu_request.cc:478] [2] SetState old=2, new=3. I driver/single_queue_dma_scheduler.cc:132] Request[2]: Scheduling DMA[0] I driver/single_queue_dma_scheduler.cc:132] Request[2]: Scheduling DMA[1] I driver/single_queue_dma_scheduler.cc:132] Request[2]: Scheduling DMA[2] I driver/single_queue_dma_scheduler.cc:132] Request[2]: Scheduling DMA[3] I driver/single_queue_dma_scheduler.cc:132] Request[2]: Scheduling DMA[4] I driver/usb/usb_driver.cc:777] ProcessIo [0-0] bulk out header I driver/usb/usb_ml_commands.cc:215] PrepareHeader ep 1: header hex 20 ff 3 0 - 0 0 0 0 I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/dma_chunker.cc:42] Completed 0 bytes; Outstanding 0 bytes; Processing next 261920 bytes I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:777] ProcessIo [1-1] bulk out header I driver/usb/usb_ml_commands.cc:215] PrepareHeader ep 1: header hex 0 4c 2 0 - 1 0 0 0 I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/dma_chunker.cc:42] Completed 0 bytes; Outstanding 0 bytes; Processing next 150528 bytes I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/usb/usb_driver.cc:643] [2-0] number of concurrent transfers too high, wait (4 >= 3) I driver/usb/usb_driver.cc:1310] WorkerThreadFunc re-evaluation is needed I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 1 callback events in worker thread I driver/usb/usb_driver.cc:796] [0-0] bulk out for header done I driver/usb/usb_driver.cc:777] ProcessIo [2-0] bulk out header I driver/usb/usb_ml_commands.cc:215] PrepareHeader ep 1: header hex f0 27 0 0 - 0 0 0 0 I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/dma_chunker.cc:42] Completed 0 bytes; Outstanding 0 bytes; Processing next 10224 bytes I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/usb/usb_driver.cc:1310] WorkerThreadFunc re-evaluation is needed I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 0 callback events in worker thread I driver/usb/usb_driver.cc:643] [2-0] number of concurrent transfers too high, wait (3 >= 3) I driver/usb/usb_driver.cc:1317] WorkerThreadFunc waiting on state change I driver/usb/usb_driver.cc:91] Unlocks both mutex I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:86] lock (does nothing) I driver/usb/usb_driver.cc:1322] WorkerThreadFunc driver state change detected I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 2 callback events in worker thread I driver/usb/usb_driver.cc:850] operator() [0-0] bulk out for 261920 bytes done I driver/usb/usb_driver.cc:796] [1-1] bulk out for header done I driver/single_queue_dma_scheduler.cc:154] Completing DMA[0] I driver/usb/usb_driver.cc:550] IO completed I driver/usb/usb_driver.cc:1317] WorkerThreadFunc waiting on state change I driver/usb/usb_driver.cc:91] Unlocks both mutex I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:86] lock (does nothing) I driver/usb/usb_driver.cc:1322] WorkerThreadFunc driver state change detected I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 1 callback events in worker thread I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:850] operator() [1-1] bulk out for 150528 bytes done I driver/usb/usb_driver.cc:796] [2-0] bulk out for header done I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/single_queue_dma_scheduler.cc:154] Completing DMA[1] I driver/usb/usb_driver.cc:550] IO completed I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:1324] WorkerThreadFunc callback event available. skip waiting I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 1 callback events in worker thread I driver/usb/usb_driver.cc:850] operator() [2-0] bulk out for 10224 bytes done I driver/single_queue_dma_scheduler.cc:154] Completing DMA[2] I driver/usb/usb_driver.cc:550] IO completed I driver/usb/usb_driver.cc:1317] WorkerThreadFunc waiting on state change I driver/usb/usb_driver.cc:91] Unlocks both mutex I driver/usb/local_usb_device.cc:672] ASYNC IN 1 end I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/local_usb_device.cc:672] ASYNC IN 2 end I driver/usb/usb_ml_commands.cc:258] operator() tag:4, offset:0x0, length 0 I driver/usb/usb_ml_commands.cc:266] operator() callback done I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:86] lock (does nothing) I driver/usb/usb_driver.cc:1322] WorkerThreadFunc driver state change detected I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 2 callback events in worker thread I driver/usb/usb_driver.cc:1138] bulk in 968 bytes from buffer index [1] I driver/usb/usb_driver.cc:1050] Digesting descriptor from device tag[4], data[0x0], size[0] I driver/usb/usb_io_request.cc:94] DMA[4] hint matched with descriptor I driver/usb/usb_driver.cc:1210] WorkerThreadFunc Re-installing event reader I driver/usb/local_usb_device.cc:748] AsyncBulkInTransfer I driver/usb/local_usb_device.cc:761] ASYNC IN 2 begin I driver/dma_chunker.cc:30] Completed 0 bytes; Outstanding 0 bytes; Processing next 968 bytes I driver/usb/usb_driver.cc:916] [3-3] bulk in for 968 bytes has yielded 968 bytes from index [1] I driver/usb/usb_driver.cc:1310] WorkerThreadFunc re-evaluation is needed I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 0 callback events in worker thread I driver/usb/usb_driver.cc:1260] WorkerThreadFunc Installing bulk-in reader. buffer index [1] I driver/usb/local_usb_device.cc:748] AsyncBulkInTransfer I driver/usb/local_usb_device.cc:761] ASYNC IN 1 begin I driver/single_queue_dma_scheduler.cc:154] Completing DMA[3] I driver/usb/usb_driver.cc:550] IO completed I driver/single_queue_dma_scheduler.cc:154] Completing DMA[4] I driver/single_tpu_request.cc:410] [2] NotifyCompletion() I driver/package_registry.cc:658] Returned instruction buffers back to executable reference I driver/single_tpu_request.cc:478] [2] SetState old=3, new=4. I driver/single_queue_dma_scheduler.cc:234] Request[2]: Completed I driver/single_tpu_request.cc:96] [2] Request destroyed. I driver/usb/usb_driver.cc:550] IO completed I driver/usb/usb_driver.cc:1317] WorkerThreadFunc waiting on state change I driver/usb/usb_driver.cc:91] Unlocks both mutex 5.7ms I driver/request.cc:47] Adding input "map/TensorArrayStack/TensorArrayGatherV3" with 150528 bytes. I driver/request.cc:58] Adding output "prediction" with 965 bytes. I driver/request.cc:167] Request prepared, total batch size: 1, total TPU requests required: 1. I driver/driver.cc:307] Request [2]: Submitting P0 request immediately. I driver/single_tpu_request.cc:80] [3] Request constructed. I driver/single_tpu_request.cc:113] Adding input "map/TensorArrayStack/TensorArrayGatherV3" with 150528 bytes. I driver/single_tpu_request.cc:187] Adding output "prediction" with 965 bytes. I driver/package_registry.cc:639] Reusing old instruction buffers. I driver/device_buffer_mapper.cc:75] Mapped scratch : Buffer(ptr=(nil)) -> 0x0000000000000000, 0 bytes. I driver/device_buffer_mapper.cc:222] Mapped "map/TensorArrayStack/TensorArrayGatherV3" : Buffer(ptr=0x561e7b3b0c40) -> 0x0000561e7b3b0c40, 150528 bytes. Direction=1 I driver/device_buffer_mapper.cc:222] Mapped "prediction" : Buffer(ptr=0x561e7b403000) -> 0x0000561e7b403000, 968 bytes. Direction=2 I driver/single_tpu_request.cc:365] MapDataBuffers() done. I driver/executable_util.cc:93] Linking map/TensorArrayStack/TensorArrayGatherV3[0]: 0x0000561e7b3b0c40 I driver/executable_util.cc:93] Linking prediction[0]: 0x0000561e7b403000 I driver/device_buffer_mapper.cc:222] Mapped "instructions" : Buffer(ptr=0x561e7b42f000) -> 0x0000561e7b42f000, 261920 bytes. Direction=1 I driver/device_buffer_mapper.cc:222] Mapped "instructions" : Buffer(ptr=0x561e7b411000) -> 0x0000561e7b411000, 10224 bytes. Direction=1 I driver/single_tpu_request.cc:381] MapInstructionBuffers() done. I driver/single_tpu_request.cc:478] [3] SetState old=0, new=1. I driver/single_tpu_request.cc:390] [3] NotifyRequestSubmitted() I driver/single_tpu_request.cc:478] [3] SetState old=1, new=2. I driver/single_queue_dma_scheduler.cc:82] Request[3]: Submitted I driver/dma_info_extractor.cc:166] DMA[0]: Instruction: device_address = 0x561e7b42f000, bytes = 261920, pending I driver/dma_info_extractor.cc:166] DMA[1]: Input activation: device_address = 0x561e7b3b0c40, bytes = 150528, pending I driver/dma_info_extractor.cc:166] DMA[2]: Instruction: device_address = 0x561e7b411000, bytes = 10224, pending I driver/dma_info_extractor.cc:166] DMA[3]: Output activation: device_address = 0x561e7b403000, bytes = 968, pending I driver/dma_info_extractor.cc:166] DMA[4]: SC interrupt 0 I driver/usb/usb_driver.cc:86] lock (does nothing) I driver/usb/usb_driver.cc:1322] WorkerThreadFunc driver state change detected I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 0 callback events in worker thread I driver/single_tpu_request.cc:398] [3] NotifyRequestActive() I driver/single_tpu_request.cc:478] [3] SetState old=2, new=3. I driver/single_queue_dma_scheduler.cc:132] Request[3]: Scheduling DMA[0] I driver/single_queue_dma_scheduler.cc:132] Request[3]: Scheduling DMA[1] I driver/single_queue_dma_scheduler.cc:132] Request[3]: Scheduling DMA[2] I driver/single_queue_dma_scheduler.cc:132] Request[3]: Scheduling DMA[3] I driver/single_queue_dma_scheduler.cc:132] Request[3]: Scheduling DMA[4] I driver/usb/usb_driver.cc:777] ProcessIo [0-0] bulk out header I driver/usb/usb_ml_commands.cc:215] PrepareHeader ep 1: header hex 20 ff 3 0 - 0 0 0 0 I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/dma_chunker.cc:42] Completed 0 bytes; Outstanding 0 bytes; Processing next 261920 bytes I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:777] ProcessIo [1-1] bulk out header I driver/usb/usb_ml_commands.cc:215] PrepareHeader ep 1: header hex 0 4c 2 0 - 1 0 0 0 I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/dma_chunker.cc:42] Completed 0 bytes; Outstanding 0 bytes; Processing next 150528 bytes I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/usb/usb_driver.cc:643] [2-0] number of concurrent transfers too high, wait (4 >= 3) I driver/usb/usb_driver.cc:1310] WorkerThreadFunc re-evaluation is needed I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 1 callback events in worker thread I driver/usb/usb_driver.cc:796] [0-0] bulk out for header done I driver/usb/usb_driver.cc:777] ProcessIo [2-0] bulk out header I driver/usb/usb_ml_commands.cc:215] PrepareHeader ep 1: header hex f0 27 0 0 - 0 0 0 0 I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/dma_chunker.cc:42] Completed 0 bytes; Outstanding 0 bytes; Processing next 10224 bytes I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/usb/usb_driver.cc:1310] WorkerThreadFunc re-evaluation is needed I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 0 callback events in worker thread I driver/usb/usb_driver.cc:643] [2-0] number of concurrent transfers too high, wait (3 >= 3) I driver/usb/usb_driver.cc:1317] WorkerThreadFunc waiting on state change I driver/usb/usb_driver.cc:91] Unlocks both mutex I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:86] lock (does nothing) I driver/usb/usb_driver.cc:1322] WorkerThreadFunc driver state change detected I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 1 callback events in worker thread I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/usb_driver.cc:850] operator() [0-0] bulk out for 261920 bytes done I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:796] [1-1] bulk out for header done I driver/single_queue_dma_scheduler.cc:154] Completing DMA[0] I driver/usb/usb_driver.cc:550] IO completed I driver/usb/usb_driver.cc:1317] WorkerThreadFunc waiting on state change I driver/usb/usb_driver.cc:91] Unlocks both mutex I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:86] lock (does nothing) I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:1322] WorkerThreadFunc driver state change detected I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 2 callback events in worker thread I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/usb_driver.cc:850] operator() [1-1] bulk out for 150528 bytes done I driver/usb/usb_driver.cc:796] [2-0] bulk out for header done I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:850] operator() [2-0] bulk out for 10224 bytes done I driver/single_queue_dma_scheduler.cc:154] Completing DMA[1] I driver/usb/usb_driver.cc:550] IO completed I driver/single_queue_dma_scheduler.cc:154] Completing DMA[2] I driver/usb/usb_driver.cc:550] IO completed I driver/usb/usb_driver.cc:1317] WorkerThreadFunc waiting on state change I driver/usb/usb_driver.cc:91] Unlocks both mutex I driver/usb/local_usb_device.cc:672] ASYNC IN 1 end I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/local_usb_device.cc:672] ASYNC IN 2 end I driver/usb/usb_ml_commands.cc:258] operator() tag:4, offset:0x0, length 0 I driver/usb/usb_ml_commands.cc:266] operator() callback done I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:86] lock (does nothing) I driver/usb/usb_driver.cc:1322] WorkerThreadFunc driver state change detected I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 2 callback events in worker thread I driver/usb/usb_driver.cc:1138] bulk in 968 bytes from buffer index [2] I driver/usb/usb_driver.cc:1050] Digesting descriptor from device tag[4], data[0x0], size[0] I driver/usb/usb_io_request.cc:94] DMA[4] hint matched with descriptor I driver/usb/usb_driver.cc:1210] WorkerThreadFunc Re-installing event reader I driver/usb/local_usb_device.cc:748] AsyncBulkInTransfer I driver/usb/local_usb_device.cc:761] ASYNC IN 2 begin I driver/dma_chunker.cc:30] Completed 0 bytes; Outstanding 0 bytes; Processing next 968 bytes I driver/usb/usb_driver.cc:916] [3-3] bulk in for 968 bytes has yielded 968 bytes from index [2] I driver/usb/usb_driver.cc:1310] WorkerThreadFunc re-evaluation is needed I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 0 callback events in worker thread I driver/usb/usb_driver.cc:1260] WorkerThreadFunc Installing bulk-in reader. buffer index [2] I driver/usb/local_usb_device.cc:748] AsyncBulkInTransfer I driver/usb/local_usb_device.cc:761] ASYNC IN 1 begin I driver/single_queue_dma_scheduler.cc:154] Completing DMA[3] I driver/usb/usb_driver.cc:550] IO completed I driver/single_queue_dma_scheduler.cc:154] Completing DMA[4] I driver/single_tpu_request.cc:410] [3] NotifyCompletion() I driver/package_registry.cc:658] Returned instruction buffers back to executable reference I driver/single_tpu_request.cc:478] [3] SetState old=3, new=4. I driver/single_queue_dma_scheduler.cc:234] Request[3]: Completed I driver/single_tpu_request.cc:96] [3] Request destroyed. I driver/usb/usb_driver.cc:550] IO completed I driver/usb/usb_driver.cc:1317] WorkerThreadFunc waiting on state change I driver/usb/usb_driver.cc:91] Unlocks both mutex 5.7ms I driver/request.cc:47] Adding input "map/TensorArrayStack/TensorArrayGatherV3" with 150528 bytes. I driver/request.cc:58] Adding output "prediction" with 965 bytes. I driver/request.cc:167] Request prepared, total batch size: 1, total TPU requests required: 1. I driver/driver.cc:307] Request [3]: Submitting P0 request immediately. I driver/single_tpu_request.cc:80] [4] Request constructed. I driver/single_tpu_request.cc:113] Adding input "map/TensorArrayStack/TensorArrayGatherV3" with 150528 bytes. I driver/single_tpu_request.cc:187] Adding output "prediction" with 965 bytes. I driver/package_registry.cc:639] Reusing old instruction buffers. I driver/device_buffer_mapper.cc:75] Mapped scratch : Buffer(ptr=(nil)) -> 0x0000000000000000, 0 bytes. I driver/device_buffer_mapper.cc:222] Mapped "map/TensorArrayStack/TensorArrayGatherV3" : Buffer(ptr=0x561e7b3b0c40) -> 0x0000561e7b3b0c40, 150528 bytes. Direction=1 I driver/device_buffer_mapper.cc:222] Mapped "prediction" : Buffer(ptr=0x561e7b403000) -> 0x0000561e7b403000, 968 bytes. Direction=2 I driver/single_tpu_request.cc:365] MapDataBuffers() done. I driver/executable_util.cc:93] Linking map/TensorArrayStack/TensorArrayGatherV3[0]: 0x0000561e7b3b0c40 I driver/executable_util.cc:93] Linking prediction[0]: 0x0000561e7b403000 I driver/device_buffer_mapper.cc:222] Mapped "instructions" : Buffer(ptr=0x561e7b42f000) -> 0x0000561e7b42f000, 261920 bytes. Direction=1 I driver/device_buffer_mapper.cc:222] Mapped "instructions" : Buffer(ptr=0x561e7b411000) -> 0x0000561e7b411000, 10224 bytes. Direction=1 I driver/single_tpu_request.cc:381] MapInstructionBuffers() done. I driver/single_tpu_request.cc:478] [4] SetState old=0, new=1. I driver/single_tpu_request.cc:390] [4] NotifyRequestSubmitted() I driver/single_tpu_request.cc:478] [4] SetState old=1, new=2. I driver/single_queue_dma_scheduler.cc:82] Request[4]: Submitted I driver/dma_info_extractor.cc:166] DMA[0]: Instruction: device_address = 0x561e7b42f000, bytes = 261920, pending I driver/dma_info_extractor.cc:166] DMA[1]: Input activation: device_address = 0x561e7b3b0c40, bytes = 150528, pending I driver/dma_info_extractor.cc:166] DMA[2]: Instruction: device_address = 0x561e7b411000, bytes = 10224, pending I driver/dma_info_extractor.cc:166] DMA[3]: Output activation: device_address = 0x561e7b403000, bytes = 968, pending I driver/dma_info_extractor.cc:166] DMA[4]: SC interrupt 0 I driver/usb/usb_driver.cc:86] lock (does nothing) I driver/usb/usb_driver.cc:1322] WorkerThreadFunc driver state change detected I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 0 callback events in worker thread I driver/single_tpu_request.cc:398] [4] NotifyRequestActive() I driver/single_tpu_request.cc:478] [4] SetState old=2, new=3. I driver/single_queue_dma_scheduler.cc:132] Request[4]: Scheduling DMA[0] I driver/single_queue_dma_scheduler.cc:132] Request[4]: Scheduling DMA[1] I driver/single_queue_dma_scheduler.cc:132] Request[4]: Scheduling DMA[2] I driver/single_queue_dma_scheduler.cc:132] Request[4]: Scheduling DMA[3] I driver/single_queue_dma_scheduler.cc:132] Request[4]: Scheduling DMA[4] I driver/usb/usb_driver.cc:777] ProcessIo [0-0] bulk out header I driver/usb/usb_ml_commands.cc:215] PrepareHeader ep 1: header hex 20 ff 3 0 - 0 0 0 0 I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/dma_chunker.cc:42] Completed 0 bytes; Outstanding 0 bytes; Processing next 261920 bytes I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:777] ProcessIo [1-1] bulk out header I driver/usb/usb_ml_commands.cc:215] PrepareHeader ep 1: header hex 0 4c 2 0 - 1 0 0 0 I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/dma_chunker.cc:42] Completed 0 bytes; Outstanding 0 bytes; Processing next 150528 bytes I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/usb/usb_driver.cc:643] [2-0] number of concurrent transfers too high, wait (4 >= 3) I driver/usb/usb_driver.cc:1310] WorkerThreadFunc re-evaluation is needed I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 1 callback events in worker thread I driver/usb/usb_driver.cc:796] [0-0] bulk out for header done I driver/usb/usb_driver.cc:777] ProcessIo [2-0] bulk out header I driver/usb/usb_ml_commands.cc:215] PrepareHeader ep 1: header hex f0 27 0 0 - 0 0 0 0 I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/dma_chunker.cc:42] Completed 0 bytes; Outstanding 0 bytes; Processing next 10224 bytes I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/usb/usb_driver.cc:1310] WorkerThreadFunc re-evaluation is needed I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 0 callback events in worker thread I driver/usb/usb_driver.cc:643] [2-0] number of concurrent transfers too high, wait (3 >= 3) I driver/usb/usb_driver.cc:1317] WorkerThreadFunc waiting on state change I driver/usb/usb_driver.cc:91] Unlocks both mutex I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:86] lock (does nothing) I driver/usb/usb_driver.cc:1322] WorkerThreadFunc driver state change detected I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 1 callback events in worker thread I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/usb_driver.cc:850] operator() [0-0] bulk out for 261920 bytes done I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:796] [1-1] bulk out for header done I driver/single_queue_dma_scheduler.cc:154] Completing DMA[0] I driver/usb/usb_driver.cc:550] IO completed I driver/usb/usb_driver.cc:1317] WorkerThreadFunc waiting on state change I driver/usb/usb_driver.cc:91] Unlocks both mutex I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:86] lock (does nothing) I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:1322] WorkerThreadFunc driver state change detected I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 2 callback events in worker thread I driver/usb/usb_driver.cc:850] operator() [1-1] bulk out for 150528 bytes done I driver/usb/usb_driver.cc:796] [2-0] bulk out for header done I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:850] operator() [2-0] bulk out for 10224 bytes done I driver/single_queue_dma_scheduler.cc:154] Completing DMA[1] I driver/usb/usb_driver.cc:550] IO completed I driver/single_queue_dma_scheduler.cc:154] Completing DMA[2] I driver/usb/usb_driver.cc:550] IO completed I driver/usb/usb_driver.cc:1317] WorkerThreadFunc waiting on state change I driver/usb/usb_driver.cc:91] Unlocks both mutex I driver/usb/local_usb_device.cc:672] ASYNC IN 1 end I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:86] lock (does nothing) I driver/usb/local_usb_device.cc:672] ASYNC IN 2 end I driver/usb/usb_driver.cc:1322] WorkerThreadFunc driver state change detected I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 1 callback events in worker thread I driver/usb/usb_driver.cc:1138] bulk in 968 bytes from buffer index [3] I driver/usb/usb_ml_commands.cc:258] operator() tag:4, offset:0x0, length 0 I driver/dma_chunker.cc:30] Completed 0 bytes; Outstanding 0 bytes; Processing next 968 bytes I driver/usb/usb_ml_commands.cc:266] operator() callback done I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:916] [3-3] bulk in for 968 bytes has yielded 968 bytes from index [3] I driver/usb/usb_driver.cc:1310] WorkerThreadFunc re-evaluation is needed I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 1 callback events in worker thread I driver/usb/usb_driver.cc:1050] Digesting descriptor from device tag[4], data[0x0], size[0] I driver/usb/usb_io_request.cc:94] DMA[4] hint matched with descriptor I driver/usb/usb_driver.cc:1210] WorkerThreadFunc Re-installing event reader I driver/usb/local_usb_device.cc:748] AsyncBulkInTransfer I driver/usb/local_usb_device.cc:761] ASYNC IN 2 begin I driver/usb/usb_driver.cc:1260] WorkerThreadFunc Installing bulk-in reader. buffer index [3] I driver/usb/local_usb_device.cc:748] AsyncBulkInTransfer I driver/usb/local_usb_device.cc:761] ASYNC IN 1 begin I driver/single_queue_dma_scheduler.cc:154] Completing DMA[3] I driver/usb/usb_driver.cc:550] IO completed I driver/single_queue_dma_scheduler.cc:154] Completing DMA[4] I driver/single_tpu_request.cc:410] [4] NotifyCompletion() I driver/package_registry.cc:658] Returned instruction buffers back to executable reference I driver/single_tpu_request.cc:478] [4] SetState old=3, new=4. I driver/single_queue_dma_scheduler.cc:234] Request[4]: Completed I driver/single_tpu_request.cc:96] [4] Request destroyed. I driver/usb/usb_driver.cc:550] IO completed I driver/usb/usb_driver.cc:1317] WorkerThreadFunc waiting on state change I driver/usb/usb_driver.cc:91] Unlocks both mutex 5.7ms I driver/request.cc:47] Adding input "map/TensorArrayStack/TensorArrayGatherV3" with 150528 bytes. I driver/request.cc:58] Adding output "prediction" with 965 bytes. I driver/request.cc:167] Request prepared, total batch size: 1, total TPU requests required: 1. I driver/driver.cc:307] Request [4]: Submitting P0 request immediately. I driver/single_tpu_request.cc:80] [5] Request constructed. I driver/single_tpu_request.cc:113] Adding input "map/TensorArrayStack/TensorArrayGatherV3" with 150528 bytes. I driver/single_tpu_request.cc:187] Adding output "prediction" with 965 bytes. I driver/package_registry.cc:639] Reusing old instruction buffers. I driver/device_buffer_mapper.cc:75] Mapped scratch : Buffer(ptr=(nil)) -> 0x0000000000000000, 0 bytes. I driver/device_buffer_mapper.cc:222] Mapped "map/TensorArrayStack/TensorArrayGatherV3" : Buffer(ptr=0x561e7b3b0c40) -> 0x0000561e7b3b0c40, 150528 bytes. Direction=1 I driver/device_buffer_mapper.cc:222] Mapped "prediction" : Buffer(ptr=0x561e7b403000) -> 0x0000561e7b403000, 968 bytes. Direction=2 I driver/single_tpu_request.cc:365] MapDataBuffers() done. I driver/executable_util.cc:93] Linking map/TensorArrayStack/TensorArrayGatherV3[0]: 0x0000561e7b3b0c40 I driver/executable_util.cc:93] Linking prediction[0]: 0x0000561e7b403000 I driver/device_buffer_mapper.cc:222] Mapped "instructions" : Buffer(ptr=0x561e7b42f000) -> 0x0000561e7b42f000, 261920 bytes. Direction=1 I driver/device_buffer_mapper.cc:222] Mapped "instructions" : Buffer(ptr=0x561e7b411000) -> 0x0000561e7b411000, 10224 bytes. Direction=1 I driver/single_tpu_request.cc:381] MapInstructionBuffers() done. I driver/single_tpu_request.cc:478] [5] SetState old=0, new=1. I driver/single_tpu_request.cc:390] [5] NotifyRequestSubmitted() I driver/single_tpu_request.cc:478] [5] SetState old=1, new=2. I driver/single_queue_dma_scheduler.cc:82] Request[5]: Submitted I driver/dma_info_extractor.cc:166] DMA[0]: Instruction: device_address = 0x561e7b42f000, bytes = 261920, pending I driver/dma_info_extractor.cc:166] DMA[1]: Input activation: device_address = 0x561e7b3b0c40, bytes = 150528, pending I driver/dma_info_extractor.cc:166] DMA[2]: Instruction: device_address = 0x561e7b411000, bytes = 10224, pending I driver/dma_info_extractor.cc:166] DMA[3]: Output activation: device_address = 0x561e7b403000, bytes = 968, pending I driver/dma_info_extractor.cc:166] DMA[4]: SC interrupt 0 I driver/usb/usb_driver.cc:86] lock (does nothing) I driver/usb/usb_driver.cc:1322] WorkerThreadFunc driver state change detected I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 0 callback events in worker thread I driver/single_tpu_request.cc:398] [5] NotifyRequestActive() I driver/single_tpu_request.cc:478] [5] SetState old=2, new=3. I driver/single_queue_dma_scheduler.cc:132] Request[5]: Scheduling DMA[0] I driver/single_queue_dma_scheduler.cc:132] Request[5]: Scheduling DMA[1] I driver/single_queue_dma_scheduler.cc:132] Request[5]: Scheduling DMA[2] I driver/single_queue_dma_scheduler.cc:132] Request[5]: Scheduling DMA[3] I driver/single_queue_dma_scheduler.cc:132] Request[5]: Scheduling DMA[4] I driver/usb/usb_driver.cc:777] ProcessIo [0-0] bulk out header I driver/usb/usb_ml_commands.cc:215] PrepareHeader ep 1: header hex 20 ff 3 0 - 0 0 0 0 I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/dma_chunker.cc:42] Completed 0 bytes; Outstanding 0 bytes; Processing next 261920 bytes I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:777] ProcessIo [1-1] bulk out header I driver/usb/usb_ml_commands.cc:215] PrepareHeader ep 1: header hex 0 4c 2 0 - 1 0 0 0 I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/dma_chunker.cc:42] Completed 0 bytes; Outstanding 0 bytes; Processing next 150528 bytes I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/usb/usb_driver.cc:643] [2-0] number of concurrent transfers too high, wait (4 >= 3) I driver/usb/usb_driver.cc:1310] WorkerThreadFunc re-evaluation is needed I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 1 callback events in worker thread I driver/usb/usb_driver.cc:796] [0-0] bulk out for header done I driver/usb/usb_driver.cc:777] ProcessIo [2-0] bulk out header I driver/usb/usb_ml_commands.cc:215] PrepareHeader ep 1: header hex f0 27 0 0 - 0 0 0 0 I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/dma_chunker.cc:42] Completed 0 bytes; Outstanding 0 bytes; Processing next 10224 bytes I driver/usb/local_usb_device.cc:708] AsyncBulkOutTransfer I driver/usb/local_usb_device.cc:722] ASYNC OUT 1 begin I driver/usb/usb_driver.cc:1310] WorkerThreadFunc re-evaluation is needed I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 0 callback events in worker thread I driver/usb/usb_driver.cc:643] [2-0] number of concurrent transfers too high, wait (3 >= 3) I driver/usb/usb_driver.cc:1317] WorkerThreadFunc waiting on state change I driver/usb/usb_driver.cc:91] Unlocks both mutex I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:86] lock (does nothing) I driver/usb/usb_driver.cc:1322] WorkerThreadFunc driver state change detected I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 1 callback events in worker thread I driver/usb/usb_driver.cc:850] operator() [0-0] bulk out for 261920 bytes done I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/single_queue_dma_scheduler.cc:154] Completing DMA[0] I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:550] IO completed I driver/usb/usb_driver.cc:1324] WorkerThreadFunc callback event available. skip waiting I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 1 callback events in worker thread I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:796] [1-1] bulk out for header done I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:850] operator() [1-1] bulk out for 150528 bytes done I driver/usb/local_usb_device.cc:657] ASYNC OUT 1 end I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:796] [2-0] bulk out for header done I driver/usb/usb_driver.cc:850] operator() [2-0] bulk out for 10224 bytes done I driver/single_queue_dma_scheduler.cc:154] Completing DMA[1] I driver/usb/usb_driver.cc:550] IO completed I driver/single_queue_dma_scheduler.cc:154] Completing DMA[2] I driver/usb/usb_driver.cc:550] IO completed I driver/usb/usb_driver.cc:1317] WorkerThreadFunc waiting on state change I driver/usb/usb_driver.cc:91] Unlocks both mutex I driver/usb/local_usb_device.cc:672] ASYNC IN 1 end I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:86] lock (does nothing) I driver/usb/local_usb_device.cc:672] ASYNC IN 2 end I driver/usb/usb_driver.cc:1322] WorkerThreadFunc driver state change detected I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 1 callback events in worker thread I driver/usb/usb_driver.cc:1138] bulk in 968 bytes from buffer index [4] I driver/dma_chunker.cc:30] Completed 0 bytes; Outstanding 0 bytes; Processing next 968 bytes I driver/usb/usb_ml_commands.cc:258] operator() tag:4, offset:0x0, length 0 I driver/usb/usb_ml_commands.cc:266] operator() callback done I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/usb_driver.cc:916] [3-3] bulk in for 968 bytes has yielded 968 bytes from index [4] I driver/usb/usb_driver.cc:1310] WorkerThreadFunc re-evaluation is needed I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 1 callback events in worker thread I driver/usb/usb_driver.cc:1050] Digesting descriptor from device tag[4], data[0x0], size[0] I driver/usb/usb_io_request.cc:94] DMA[4] hint matched with descriptor I driver/usb/usb_driver.cc:1210] WorkerThreadFunc Re-installing event reader I driver/usb/local_usb_device.cc:748] AsyncBulkInTransfer I driver/usb/local_usb_device.cc:761] ASYNC IN 2 begin I driver/usb/usb_driver.cc:1260] WorkerThreadFunc Installing bulk-in reader. buffer index [4] I driver/usb/local_usb_device.cc:748] AsyncBulkInTransfer I driver/usb/local_usb_device.cc:761] ASYNC IN 1 begin I driver/single_queue_dma_scheduler.cc:154] Completing DMA[3] I driver/usb/usb_driver.cc:550] IO completed I driver/single_queue_dma_scheduler.cc:154] Completing DMA[4] I driver/single_tpu_request.cc:410] [5] NotifyCompletion() I driver/package_registry.cc:658] Returned instruction buffers back to executable reference I driver/single_tpu_request.cc:478] [5] SetState old=3, new=4. I driver/single_queue_dma_scheduler.cc:234] Request[5]: Completed I driver/single_tpu_request.cc:96] [5] Request destroyed. I driver/usb/usb_driver.cc:550] IO completed I driver/usb/usb_driver.cc:1317] WorkerThreadFunc waiting on state change I driver/usb/usb_driver.cc:91] Unlocks both mutex 5.6ms -------RESULTS-------- Ara macao (Scarlet Macaw): 0.75781 I driver/instruction_buffers.cc:51] InstructionBuffers destroyed. I driver/instruction_buffers.cc:51] InstructionBuffers destroyed. I tflite/edgetpu_manager_direct.cc:226] Releasing Edge TPU device at /sys/bus/usb/devices/2-3 I tflite/edgetpu_context_direct.cc:180] Closing Edge TPU device at /sys/bus/usb/devices/2-3 I driver/usb/local_usb_device.cc:216] DoCancelAllTransfers: cancelling 10 async transfers I driver/usb/usb_driver.cc:86] lock (does nothing) I driver/usb/usb_driver.cc:1322] WorkerThreadFunc driver state change detected I driver/usb/local_usb_device.cc:672] ASYNC IN 1 end I driver/usb/local_usb_device.cc:97] ConvertLibUsbTransferStatus: USB transfer error 3 [LibUsbDataInCallback] I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/local_usb_device.cc:224] DoCancelAllTransfers: waiting for all async transfers to complete I driver/usb/local_usb_device.cc:672] ASYNC IN 2 end I driver/usb/local_usb_device.cc:97] ConvertLibUsbTransferStatus: USB transfer error 3 [LibUsbDataInCallback] I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/local_usb_device.cc:672] ASYNC IN 1 end I driver/usb/local_usb_device.cc:97] ConvertLibUsbTransferStatus: USB transfer error 3 [LibUsbDataInCallback] I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/local_usb_device.cc:672] ASYNC IN 1 end I driver/usb/local_usb_device.cc:97] ConvertLibUsbTransferStatus: USB transfer error 3 [LibUsbDataInCallback] I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/local_usb_device.cc:672] ASYNC IN 1 end I driver/usb/local_usb_device.cc:97] ConvertLibUsbTransferStatus: USB transfer error 3 [LibUsbDataInCallback] I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/local_usb_device.cc:672] ASYNC IN 3 end I driver/usb/local_usb_device.cc:97] ConvertLibUsbTransferStatus: USB transfer error 3 [LibUsbDataInCallback] I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/local_usb_device.cc:672] ASYNC IN 1 end I driver/usb/local_usb_device.cc:97] ConvertLibUsbTransferStatus: USB transfer error 3 [LibUsbDataInCallback] I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/local_usb_device.cc:672] ASYNC IN 1 end I driver/usb/local_usb_device.cc:97] ConvertLibUsbTransferStatus: USB transfer error 3 [LibUsbDataInCallback] I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/local_usb_device.cc:672] ASYNC IN 1 end I driver/usb/local_usb_device.cc:97] ConvertLibUsbTransferStatus: USB transfer error 3 [LibUsbDataInCallback] I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/local_usb_device.cc:672] ASYNC IN 1 end I driver/usb/local_usb_device.cc:97] ConvertLibUsbTransferStatus: USB transfer error 3 [LibUsbDataInCallback] I driver/usb/local_usb_device.cc:642] UnregisterCompletedTransfer I driver/usb/local_usb_device.cc:234] DoCancelAllTransfers: all async transfers have completed I driver/usb/usb_driver.cc:1174] WorkerThreadFunc dispatching 10 callback events in worker thread I driver/usb/usb_driver.cc:404] HandleEvent cancelled, ignore. I driver/usb/usb_driver.cc:466] HandleInterrupt cancelled, ignore. I driver/usb/usb_driver.cc:1194] All bulk-in buffers are available I driver/usb/usb_driver.cc:1201] Driver is closing, and all async operations have completed. I driver/usb/usb_driver.cc:1330] WorkerThreadFunc leaving worker thread I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x4C070] := 0x0 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x4C080] := 0x0 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x4C090] := 0x0 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x4C0A0] := 0x0 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:80] ReadRegister32 offset 0x1a0d4 I driver/usb/local_usb_device.cc:514] SendControlCommandWithDataIn I driver/usb/local_usb_device.cc:521] SYNC CTRL WITH DATA IN begin I driver/usb/local_usb_device.cc:538] SYNC CTRL WITH DATA IN end I driver/usb/usb_ml_commands.cc:110] ReadRegister32 [0x1A0D4] == 0x80000001 I driver/usb/usb_ml_commands.cc:153] WriteRegister32 [0x1A0D4] := 0x1 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:80] ReadRegister32 offset 0x1a704 I driver/usb/local_usb_device.cc:514] SendControlCommandWithDataIn I driver/usb/local_usb_device.cc:521] SYNC CTRL WITH DATA IN begin I driver/usb/local_usb_device.cc:538] SYNC CTRL WITH DATA IN end I driver/usb/usb_ml_commands.cc:110] ReadRegister32 [0x1A704] == 0x7F I driver/usb/usb_ml_commands.cc:153] WriteRegister32 [0x1A704] := 0x70007F I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:80] ReadRegister32 offset 0x1a33c I driver/usb/local_usb_device.cc:514] SendControlCommandWithDataIn I driver/usb/local_usb_device.cc:521] SYNC CTRL WITH DATA IN begin I driver/usb/local_usb_device.cc:538] SYNC CTRL WITH DATA IN end I driver/usb/usb_ml_commands.cc:110] ReadRegister32 [0x1A33C] == 0x3F I driver/usb/usb_ml_commands.cc:153] WriteRegister32 [0x1A33C] := 0xC003F I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:153] WriteRegister32 [0x1A500] := 0x0 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:153] WriteRegister32 [0x1A600] := 0x0 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:153] WriteRegister32 [0x1A558] := 0x0 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:153] WriteRegister32 [0x1A658] := 0x0 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:80] ReadRegister32 offset 0x1a0d8 I driver/usb/local_usb_device.cc:514] SendControlCommandWithDataIn I driver/usb/local_usb_device.cc:521] SYNC CTRL WITH DATA IN begin I driver/usb/local_usb_device.cc:538] SYNC CTRL WITH DATA IN end I driver/usb/usb_ml_commands.cc:110] ReadRegister32 [0x1A0D8] == 0x80000000 I driver/usb/usb_ml_commands.cc:153] WriteRegister32 [0x1A0D8] := 0x0 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x4C060] := 0x0 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x44018] := 0x2 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x44158] := 0x2 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x44198] := 0x2 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x441D8] := 0x2 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x44218] := 0x2 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x48788] := 0x7F I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:117] ReadRegister64 offset 0x48788 I driver/usb/local_usb_device.cc:514] SendControlCommandWithDataIn I driver/usb/local_usb_device.cc:521] SYNC CTRL WITH DATA IN begin I driver/usb/local_usb_device.cc:538] SYNC CTRL WITH DATA IN end I driver/usb/usb_ml_commands.cc:147] ReadRegister64 [0x48788] == 0x7F I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x400C0] := 0x2 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x40150] := 0x2 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x40110] := 0x2 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x40250] := 0x2 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x40298] := 0x2 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x402E0] := 0x2 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x40328] := 0x2 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x40190] := 0x2 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x401D0] := 0x2 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:178] WriteRegister64 [0x40210] := 0x2 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:80] ReadRegister32 offset 0x1a318 I driver/usb/local_usb_device.cc:514] SendControlCommandWithDataIn I driver/usb/local_usb_device.cc:521] SYNC CTRL WITH DATA IN begin I driver/usb/local_usb_device.cc:538] SYNC CTRL WITH DATA IN end I driver/usb/usb_ml_commands.cc:110] ReadRegister32 [0x1A318] == 0x5085000C I driver/usb/usb_ml_commands.cc:153] WriteRegister32 [0x1A318] := 0x50C5000C I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:80] ReadRegister32 offset 0x1a318 I driver/usb/local_usb_device.cc:514] SendControlCommandWithDataIn I driver/usb/local_usb_device.cc:521] SYNC CTRL WITH DATA IN begin I driver/usb/local_usb_device.cc:538] SYNC CTRL WITH DATA IN end I driver/usb/usb_ml_commands.cc:110] ReadRegister32 [0x1A318] == 0x50C5025C I driver/usb/usb_ml_commands.cc:153] WriteRegister32 [0x1907C] := 0xF I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:153] WriteRegister32 [0x1907C] := 0x0 I driver/usb/local_usb_device.cc:475] SendControlCommandWithDataOut I driver/usb/local_usb_device.cc:482] SYNC CTRL WITH DATA OUT begin I driver/usb/local_usb_device.cc:499] SYNC CTRL WITH DATA OUT end I driver/usb/usb_ml_commands.cc:50] ~UsbMlCommands I driver/usb/usb_standard_commands.cc:39] ~UsbStandardCommands I driver/usb/local_usb_device.cc:196] ~LocalUsbDevice I driver/usb/local_usb_device.cc:243] Close: closing device 0x561e7b397de0 I driver/usb/local_usb_device.cc:263] Close: releasing claimed interface 0 I driver/usb/local_usb_device.cc:216] DoCancelAllTransfers: cancelling 0 async transfers I driver/usb/local_usb_device.cc:224] DoCancelAllTransfers: waiting for all async transfers to complete I driver/usb/local_usb_device.cc:234] DoCancelAllTransfers: all async transfers have completed I driver/usb/local_usb_device.cc:276] Close: releasing 0 transfer buffers I driver/usb/local_usb_device.cc:322] Close: final clean up completed`
hjonnala commented 1 year ago

Can you please share similar logs form the frigate container and the output of lsusb command inside the container.

dollarusername2 commented 1 year ago

Hello @hjonnala ,

thanks for helping me out! Unfortunately there is no lsusb inside that specific container. However I managed to run the test example:

` root@757605ae6e65:~/pycoral-test/tmp/pycoral-test/pycoral# python3 examples/classify_image.py \

--model test_data/mobilenet_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/driver_factory_default.cc:31] Failed to open /sys/class/apex: No such file or directory I driver/usb/local_usb_device.cc:944] EnumerateDevices: vendor:0x1a6e, product:0x89a I driver/usb/local_usb_device.cc:979] EnumerateDevices: checking bus[2] port[3] 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[0] I driver/usb/local_usb_device.cc:944] EnumerateDevices: vendor:0x18d1, product:0x9302 I driver/usb/local_usb_device.cc:979] EnumerateDevices: checking bus[2] port[3] I driver/usb/local_usb_device.cc:998] EnumerateDevices: found [/sys/bus/usb/devices/2-3] 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[0] I driver/beagle/beagle_usb_driver_provider.cc:225] Enumerate: adding path [/sys/bus/usb/devices/2-3] I tflite/edgetpu_manager_direct.cc:471] No device of type Apex (PCIe) is available. I tflite/edgetpu_context_direct.cc:106] USB always DFU: False (default) I tflite/edgetpu_context_direct.cc:147] USB bulk-in queue capacity: 8 I tflite/edgetpu_context_direct.cc:67] Performance expectation: Max (default) I driver/usb/usb_driver.cc:1383] Open device and check if DFU is needed I driver/usb/local_usb_device.cc:1013] OpenDevice: [/sys/bus/usb/devices/2-3] I driver/usb/local_usb_device.cc:1050] OpenDevice: checking bus[2] port[3] I driver/usb/local_usb_device.cc:60] ConvertLibUsbError: USB error -3 [OpenDevice] I driver/usb/local_usb_device.cc:1013] OpenDevice: [/sys/bus/usb/devices/2-3] I driver/usb/local_usb_device.cc:1050] OpenDevice: checking bus[2] port[3] I driver/usb/local_usb_device.cc:60] ConvertLibUsbError: USB error -3 [OpenDevice] I driver/usb/local_usb_device.cc:1013] OpenDevice: [/sys/bus/usb/devices/2-3] I driver/usb/local_usb_device.cc:1050] OpenDevice: checking bus[2] port[3] I driver/usb/local_usb_device.cc:60] ConvertLibUsbError: USB error -3 [OpenDevice] I driver/usb/local_usb_device.cc:1013] OpenDevice: [/sys/bus/usb/devices/2-3] I driver/usb/local_usb_device.cc:1050] OpenDevice: checking bus[2] port[3] I driver/usb/local_usb_device.cc:60] ConvertLibUsbError: USB error -3 [OpenDevice] I driver/usb/local_usb_device.cc:1013] OpenDevice: [/sys/bus/usb/devices/2-3] I driver/usb/local_usb_device.cc:1050] OpenDevice: checking bus[2] port[3] I driver/usb/local_usb_device.cc:60] ConvertLibUsbError: USB error -3 [OpenDevice] I driver/usb/local_usb_device.cc:1013] OpenDevice: [/sys/bus/usb/devices/2-3] I driver/usb/local_usb_device.cc:1050] OpenDevice: checking bus[2] port[3] I driver/usb/local_usb_device.cc:60] ConvertLibUsbError: USB error -3 [OpenDevice] I driver/usb/local_usb_device.cc:1013] OpenDevice: [/sys/bus/usb/devices/2-3] I driver/usb/local_usb_device.cc:1050] OpenDevice: checking bus[2] port[3] I driver/usb/local_usb_device.cc:60] ConvertLibUsbError: USB error -3 [OpenDevice] I driver/usb/local_usb_device.cc:1013] OpenDevice: [/sys/bus/usb/devices/2-3] I driver/usb/local_usb_device.cc:1050] OpenDevice: checking bus[2] port[3] I driver/usb/local_usb_device.cc:60] ConvertLibUsbError: USB error -3 [OpenDevice] I driver/usb/local_usb_device.cc:1013] OpenDevice: [/sys/bus/usb/devices/2-3] I driver/usb/local_usb_device.cc:1050] OpenDevice: checking bus[2] port[3] I driver/usb/local_usb_device.cc:60] ConvertLibUsbError: USB error -3 [OpenDevice] I driver/usb/local_usb_device.cc:1013] OpenDevice: [/sys/bus/usb/devices/2-3] I driver/usb/local_usb_device.cc:1050] OpenDevice: checking bus[2] port[3] I driver/usb/local_usb_device.cc:60] ConvertLibUsbError: USB error -3 [OpenDevice] I driver/usb/local_usb_device.cc:1013] OpenDevice: [/sys/bus/usb/devices/2-3] I driver/usb/local_usb_device.cc:1050] OpenDevice: checking bus[2] port[3] I driver/usb/local_usb_device.cc:60] ConvertLibUsbError: USB error -3 [OpenDevice] I driver/usb/local_usb_device.cc:1013] OpenDevice: [/sys/bus/usb/devices/2-3] I driver/usb/local_usb_device.cc:1050] OpenDevice: checking bus[2] port[3] I driver/usb/local_usb_device.cc:60] ConvertLibUsbError: USB error -3 [OpenDevice] I driver/usb/local_usb_device.cc:1013] OpenDevice: [/sys/bus/usb/devices/2-3] I driver/usb/local_usb_device.cc:1050] OpenDevice: checking bus[2] port[3] I driver/usb/local_usb_device.cc:60] ConvertLibUsbError: USB error -3 [OpenDevice] I driver/usb/local_usb_device.cc:1013] OpenDevice: [/sys/bus/usb/devices/2-3] I driver/usb/local_usb_device.cc:1050] OpenDevice: checking bus[2] port[3] I driver/usb/local_usb_device.cc:60] ConvertLibUsbError: USB error -3 [OpenDevice] I driver/usb/local_usb_device.cc:1013] OpenDevice: [/sys/bus/usb/devices/2-3] I driver/usb/local_usb_device.cc:1050] OpenDevice: checking bus[2] port[3] I driver/usb/local_usb_device.cc:60] ConvertLibUsbError: USB error -3 [OpenDevice] I driver/usb/local_usb_device.cc:1013] OpenDevice: [/sys/bus/usb/devices/2-3] I driver/usb/local_usb_device.cc:1050] OpenDevice: checking bus[2] port[3] I driver/usb/local_usb_device.cc:60] ConvertLibUsbError: USB error -3 [OpenDevice] I driver/usb/local_usb_device.cc:1013] OpenDevice: [/sys/bus/usb/devices/2-3] I driver/usb/local_usb_device.cc:1050] OpenDevice: checking bus[2] port[3] ...and so on and so on... I tflite/edgetpu_context_direct.cc:401] Failed to open device [Apex (USB)] at [/sys/bus/usb/devices/2-3]: Permission denied: USB error -3 [OpenDevice] 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/pycoral-test/tmp/pycoral-test/pycoral/examples/classify_image.py", line 124, in main() File "/root/pycoral-test/tmp/pycoral-test/pycoral/examples/classify_image.py", line 74, in main interpreter = make_interpreter(*args.model.split('@')) File "/usr/lib/python3/dist-packages/pycoral/utils/edgetpu.py", line 87, in make_interpreter delegates = [load_edgetpu_delegate({'device': device} if device else {})] File "/usr/lib/python3/dist-packages/pycoral/utils/edgetpu.py", line 52, in load_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 `

hjonnala commented 1 year ago

I tflite/edgetpu_context_direct.cc:401] Failed to open device [Apex (USB)] at [/sys/bus/usb/devices/2-3]: Permission denied: USB error -3 [OpenDevice]

can you try the example with sudo and share the dockerfile and docker command used to run the container..

dollarusername2 commented 1 year ago

As seen in the log, there is only root inside the container, and the test was run as root (inside the container): root@757605ae6e65:~/pycoral-test/tmp/pycoral-test/pycoral# python3 examples/classify_image.py

The container itself is run in a rootless docker setup via command "docker compose up".

The docker-compose.yaml is here:

docker-compose.yaml

version: "3.9"
services:
  frigate:
    container_name: frigate
    privileged: true # this may not be necessary for all setups
    restart: unless-stopped
    image: blakeblackshear/frigate:stable
    shm_size: "64mb" # update for your cameras based on calculation above
    devices:
      - /dev/bus/usb:/dev/bus/usb # passes the USB Coral, needs to be modified for other versions
      #- /dev/apex_0:/dev/apex_0 # passes a PCIe Coral, follow driver instructions here https://coral.ai/docs/m2/get-started/#2a-on-linux
      - /dev/dri/renderD128 # for intel hwaccel, needs to be updated for your hardware
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /home/mira/frigate/config.yml:/config/config.yml:ro
      - /media/hdd/frigate-media:/media/frigate
      - type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
        target: /tmp/cache
        tmpfs:
          size: 1000000000
    ports:
      - "5000:5000"
      - "1935:1935" # RTMP feeds
    environment:
      FRIGATE_RTSP_PASSWORD: "pw"
hjonnala commented 1 year ago

The initial steps mentioned here working for me with docker run -ti --rm --entrypoint=/bin/bash --privileged -v /dev/bus/usb:/dev/bus/usb blakeblackshear/frigate:stable

Can you try adding - /dev/bus/usb:/dev/bus/usb to volumes instead of devices..Thanks!

dollarusername2 commented 1 year ago

Hi, as written in the issue at the frigate project: unfortunately this did not help in my case :-/

(To be sure, I just checked again)

dollarusername2 commented 1 year ago

Any ideas left?

hjonnala commented 1 year ago

Please try with the below steps..if its not working please share the verbose logs.

  1. run docker run -ti --rm --entrypoint=/bin/bash --privileged --mount type=bind,source=/dev,target=/dev blakeblackshear/frigate:stable

  2. inside container, run

    cd ~ \
    && apt-get -y update \
    && apt-get -y install curl \
    && mkdir test_data \
    && cd test_data \
    && curl -LO https://coral.ai/static/docs/images/parrot.jpg \
    && curl -LO https://raw.githubusercontent.com/google-coral/test_data/master/mobilenet_v2_1.0_224_inat_bird_quant_edgetpu.tflite \
    && curl -LO https://raw.githubusercontent.com/google-coral/test_data/master/inat_bird_labels.txt \
    && cd .. \
    && curl -LO https://raw.githubusercontent.com/google-coral/pycoral/master/examples/classify_image.py \
    && python3 classify_image.py \
    --model test_data/mobilenet_v2_1.0_224_inat_bird_quant_edgetpu.tflite  \
    --labels test_data/inat_bird_labels.txt \
    --input test_data/parrot.jpg
dollarusername2 commented 1 year ago

Hi @hjonnala ,

thanks for helping me!

Running 1 just results in an error:# $ docker run -ti --rm --entrypoint=/bin/bash --privileged --mount type=bind,source=/dev,target=/dev blakeblackshear/frigate:stable docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: open /dev/console: permission denied: unknown.

Running with sudo the container starts and seems to be able to access the frigate: ----INFERENCE TIME---- Note: The first inference on Edge TPU is slow because it includes loading the model into Edge TPU memory. 11.8ms 2.8ms 2.7ms 2.7ms 2.9ms -------RESULTS-------- Ara macao (Scarlet Macaw): 0.76953

There seems to be some issue with the rootless docker setup?

hjonnala commented 1 year ago

There seems to be some issue with the rootless docker setup?

I think so, can you try the instructions at : https://linuxhandbook.com/rootless-docker/ or https://docs.docker.com/engine/security/rootless/

dollarusername2 commented 1 year ago

Hi @hjonnala ,

I double just the install (actually just did it again) and the error still persists. I am checking with the frigate people at their project, If anybody has an idea. Checking google this might also be a permission issue at the docker file. However, why would this only occur at the new machine?

Strange issue...

hjonnala commented 1 year ago

can you try the below commands and reboot the device and try the demo with docker.

sudo addgroup docker
sudo usermod -aG docker $USER 
dollarusername2 commented 1 year ago

Hi @hjonnala ,

The group was already exisiting and my user was already part of the user group. Anyway, I added it again, rebooted, and (no surprise): Issue stays the same like in https://github.com/google-coral/pycoral/issues/94#issuecomment-1344118195 :-/

hjonnala commented 1 year ago

hmm..Please try the suggested things on this thread: https://www.reddit.com/r/docker/comments/wo7si8/comment/ik9x5qo/?utm_source=share&utm_medium=web2x&context=3

dollarusername2 commented 1 year ago

Wohoo... that is a good tip @hjonnala !

Somehow the $DOCKER_HOST was missing from my env.

When I set it manually in my .bashrc, it works! Yeah!

Last issue left: Obviously I do want to start docker inkl. frigate at reboot automatically without login. This used to work with the systemctl approach, however the $DOCKER_HOST seems to be missing in this context as well. I need to research how to fix this (unless anybody knows by chance?).

Thanks!!!

google-coral-bot[bot] commented 1 year ago

Are you satisfied with the resolution of your issue? Yes No