Pycoral / Tensorflow lite on Jetson AGX with PCI on TPUs

Hello All,

Hope you are good.

I am trying to run pycoral and tensorflow lite on jetson AGX to make inference on external PCI that have TPUs and I am already running pycoral edge models but it always fails with below error
Note :
1- setted export LD_LIBRARY_PATH=/usr/lib/aarch64-linux-gnu:$LD_LIBRARY_PATH

2- I tested same model on CPU and it works fine

python3 classify.py

=========================
Loading …/all_models/mobilenet_v2_1.0_224_quant_edgetpu.tflite with …/all_models/imagenet_labels.txt labels.
Traceback (most recent call last):
File “/home/deerorin2/.local/lib/python3.8/site-packages/tflite_runtime/interpreter.py”, line 166, in load_delegate
delegate = Delegate(library, options)
File “/home/deerorin2/.local/lib/python3.8/site-packages/tflite_runtime/interpreter.py”, line 104, in init
raise ValueError(capture.message)
ValueError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “classify.py”, line 99, in
main()
File “classify.py”, line 66, in main
interpreter = make_interpreter(args.model)
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 “/home/deerorin2/.local/lib/python3.8/site-packages/tflite_runtime/interpreter.py”, line 168, in load_delegate
raise ValueError(‘Failed to load delegate from {}\n{}’.format(
ValueError: Failed to load delegate from libedgetpu.so.1

Error from linux using dmsg command

dmsg | grep -i apex
[ 10.105125] apex 0005:03:00.0: Adding to iommu group 12
[ 10.105475] apex 0005:03:00.0: enabling device (0000 → 0002)
[ 10.115446] apex 0005:04:00.0: Adding to iommu group 12
[ 10.115756] apex 0005:04:00.0: enabling device (0000 → 0002)
[ 10.124078] apex 0005:05:00.0: Adding to iommu group 12
[ 10.124404] apex 0005:05:00.0: enabling device (0000 → 0002)
[ 10.147703] apex 0005:06:00.0: Adding to iommu group 12
[ 10.148016] apex 0005:06:00.0: enabling device (0000 → 0002)
[ 10.151619] apex 0005:06:00.0: Couldn’t initialize interrupts: -28
[ 10.157479] apex 0005:08:00.0: Adding to iommu group 12
[ 10.157815] apex 0005:08:00.0: enabling device (0000 → 0002)
[ 10.160166] apex 0005:08:00.0: Couldn’t initialize interrupts: -28
[ 10.166530] apex 0005:09:00.0: Adding to iommu group 12
[ 10.166865] apex 0005:09:00.0: enabling device (0000 → 0002)
[ 10.172237] apex 0005:09:00.0: Couldn’t initialize interrupts: -28
[ 10.187023] apex 0005:0a:00.0: Adding to iommu group 12
[ 10.187340] apex 0005:0a:00.0: enabling device (0000 → 0002)
[ 10.189488] apex 0005:0a:00.0: Couldn’t initialize interrupts: -28
[ 10.194756] apex 0005:0b:00.0: Adding to iommu group 12
[ 10.195053] apex 0005:0b:00.0: enabling device (0000 → 0002)
[ 10.196648] apex 0005:0b:00.0: Couldn’t initialize interrupts: -28
[ 10.203227] apex 0005:0c:00.0: Adding to iommu group 12
[ 10.203535] apex 0005:0c:00.0: enabling device (0000 → 0002)
[ 10.205517] apex 0005:0c:00.0: Couldn’t initialize interrupts: -28
[ 10.218297] apex 0005:0e:00.0: Adding to iommu group 12
[ 10.218649] apex 0005:0e:00.0: enabling device (0000 → 0002)
[ 10.222601] apex 0005:0e:00.0: Couldn’t initialize interrupts: -28
[ 130.679487] apex 0005:0c:00.0: Couldn’t reinit interrupts: -28
[ 130.679705] apex 0005:0c:00.0: Permission checking failed.

Appreciate your help what can we do to fix this issue

Hello,

Thanks for visiting the NVIDIA Developer forums! Your topic will be best served in the Jetson category.

I will move this post over for visibility.

Cheers,
Tom

There is no update from you for a period, assuming this is not an issue anymore.
Hence, we are closing this topic. If need further support, please open a new one.
Thanks

Hi,

We will need more info to know more about the issue.

Does the inference run on GPU or PCIe hardware?
Is the memory used located on Xavier?

Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.