ARM-software / armnn

Arm NN ML Software. The code here is a read-only mirror of https://review.mlplatform.org/admin/repos/ml/armnn
https://developer.arm.com/products/processors/machine-learning/arm-nn
MIT License
1.17k stars 310 forks source link

Does the prebuilt delegate binary still require building tflite_runtime? #539

Closed henriwoodcock-old closed 3 years ago

henriwoodcock-old commented 3 years ago

I've downloaded ArmNN-aarch64.tgz from the 21.02 release page. To integrate the delegate into Python, I followed the markdown guide. I installed TensorFlow Lite runtime following the steps found in the guide on their website https://www.tensorflow.org/lite/guide/python.

The line:

armnn_delegate = tflite.load_delegate( library="build-aarch64/libarmnnDelegate.so.24",
                                       options={"backends": "CpuAcc,GpuAcc,CpuRef", "logging-severity":"info"})

results in:

OSError: libtensorflow_lite_all.so: cannot open shared object file: No such file or directory

I know the BuildGuideNative.md builds "libtensorflow_all.so" and "libtensorflow_lite_all.so". Is this consistent with the libraries installed from the TensorFlow getting started guide and if so how can I fix this? Or do I need to build tflite_runtime from source to be able to use the delegate prebuilt binaries?

keidav01 commented 3 years ago

Closed issue

Reason for closing: It is necessary to build tensorflow lite first (as per https://github.com/ARM-software/armnn/blob/branches/armnn_21_02/delegate/BuildGuideNative.md).

libtensorflow_lite_all.so can then be linked to the delegate library file through setting it in LD_LIBRARY_PATH