Skip to content
This repository has been archived by the owner on Sep 3, 2022. It is now read-only.

Latest commit

 

History

History
43 lines (29 loc) · 1.58 KB

README.md

File metadata and controls

43 lines (29 loc) · 1.58 KB

Build TFLite Runtime for ARM boards (with musl libc)

Donate

This page describes how to build the TensorFlow Lite tflite_runtime Python library for ARM devices using musl libc.

Cross-compilation

  1. Clone TensorFlow repository:
git clone --depth 1 --branch v2.5.2 https://github.com/tensorflow/tensorflow
cd tensorflow
  1. Install the musl-based toolchains download tool:
wget https://github.com/kasitoru/tflite_runtime-musl/raw/v2.5.1/download_toolchains.sh -O tensorflow/lite/tools/cmake/download_toolchains.sh
  1. Fix issue google/XNNPACK#981:
wget https://github.com/kasitoru/tflite_runtime-musl/raw/v2.5.1/xnnpack.patch
git apply xnnpack.patch
rm xnnpack.patch
  1. Start compiling (more details):
tensorflow/tools/ci_build/ci_build.sh PI-PYTHON38 tensorflow/lite/tools/pip_package/build_pip_package_with_cmake.sh armhf

The binary files will be located in the directory tensorflow/lite/tools/pip_package/gen/tflite_pip/python3.8/dist/.

References