ValYouW / tflite-dist

TensorFlow Lite C/C++ distribution libraries and headers
MIT License
111 stars 19 forks source link

Can we use xnnpack in android use libtensorflowlite.so ? #17

Closed moyans closed 2 years ago

ValYouW commented 2 years ago

I don't know, I did run it on Windows but never tested Android... If you try please share.

moyans commented 2 years ago

I used the C library and didn't find the interface of xnnpack. I found that the xnnpack backend needs to add --define tflite_with_xnnpack=true during bazel build

ValYouW commented 2 years ago

See this video of mine, the flag is not really necessary, only use the xnnpack delegate:

https://youtu.be/vWbtLIwMrRE

moyans commented 2 years ago

Thanks, I successfully used xnnpack on Android and increased the speed by 20+%