google-coral / edgetpu

Coral issue tracker (and legacy Edge TPU API source)
https://coral.ai
Apache License 2.0
426 stars 125 forks source link

apex Process X is opening a node held by X #359

Closed azsecured closed 3 years ago

azsecured commented 3 years ago

Hi.

I use M.2 Accelerator TPU on Ubuntu 20.04.

One proccess working normally.But when i run second script (parallel) have error.

Error:

ValueError: Failed to load delegate from libedgetpu.so.1

test@test:/$ dmesg | grep apex
[    5.297131] apex 0000:2e:00.0: enabling device (0140 -> 0142)
[   10.460228] apex 0000:2e:00.0: Apex performance not throttled due to temperature
[  266.094108] apex 0000:2e:00.0: entry 6144 is not free
[  746.852382] apex 0000:2e:00.0: Process 4906 is opening a node held by 4844.
[ 5720.205446] apex 0000:2e:00.0: Process 26744 is opening a node held by 5412.
[ 5722.377865] apex 0000:2e:00.0: Process 26779 is opening a node held by 5412.
[ 5732.815429] apex 0000:2e:00.0: Process 26914 is opening a node held by 5412.
[ 5733.693730] apex 0000:2e:00.0: Process 26946 is opening a node held by 5412.
[ 5752.850833] apex 0000:2e:00.0: Process 27033 is opening a node held by 5412.
[ 5753.612604] apex 0000:2e:00.0: Process 27062 is opening a node held by 5412.
[ 6329.260882] apex 0000:2e:00.0: Process 29579 is opening a node held by 5412.

Code example:

interpreter = make_interpreter('models/ssd_mobilenet_v2_coco_quant_postprocess_edgetpu.tflite')

Have solution for multiple use script one TPU?

manoj7410 commented 3 years ago

@azsecured Here is an example of Multiple models on single TPU https://github.com/google-coral/pycoral/blob/master/examples/two_models_inference.py. You can take reference from this one.