google-ai-edge / LiteRT

LiteRT is the new name for TensorFlow Lite (TFLite). While the name is new, it's still the same trusted, high-performance runtime for on-device AI, now with an expanded vision.
https://ai.google.dev/edge/litert
Apache License 2.0
169 stars 13 forks source link

Python Wheel generation of TensorFlow Lite 2.17 for ARMv7l 32 bits not working #37

Open gaikwadrahul8 opened 5 days ago

gaikwadrahul8 commented 5 days ago

I have previously crosscompiled different versions of TensorFlow lite (2.14, 2.15.1, 2.16.2) for Python 3.10 using CMAKE and following the instructions from the website .

So far the only changes required were to just set my armhf flags as:

echo "ARMCC_FLAGS=\"-march=armv7-a -mfpu=neon-vfpv3 -funsafe-math-optimizations \ adjust the python version in the MakeFile (tensorflow/lite/tools/pip_package/Makefile) and run the make command as:

make -C tensorflow/lite/tools/pip_package docker-build \ TENSORFLOW_TARGET=armhf PYTHON_VERSION=3.10 Now, I have tried the same approach for the release 2.17.0 ( ad6d8cc ) and although the build is executed and the wheel is generated without errors, I keep getting the following errorat the moment of importing the interpreter:

python3 simpletest.py 
Traceback (most recent call last):
  File "/mnt/simpletest.py", line 2, in <module>
    import tflite_runtime.interpreter as tflite
  File "/usr/local/lib/python3.10/dist-packages/tflite_runtime/interpreter.py", line 33, in <module>
    from tflite_runtime import _pywrap_tensorflow_interpreter_wrapper as _interpreter_wrapper
ImportError: /usr/local/lib/python3.10/dist-packages/tflite_runtime/_pywrap_tensorflow_interpreter_wrapper.so: undefined symbol: TfLiteXNNPackDelegateOptionsDefault
gaikwadrahul8 commented 2 days ago

This issue originally reported by @paguilar-pxc has been moved to this dedicated repository for LiteRT to enhance issue tracking and prioritization. To ensure continuity, we have created this new issue on your behalf.

We appreciate your understanding and look forward to your continued involvement.