Tensorflow Lite
TensorFlow is a free and open-source AI/ML framework from Google used for training and inferencing of neural networks. Tensorflow Lite is designed as a smaller subset of Tensorflow aimed at deployment on mobile and edge devices.
Requirements
Clone
cpuinfofrom https://github.com/pytorch/cpuinfo.gitClone
pthreadpoolfrom https://github.com/Maratyszcza/pthreadpool.gitClone
XNNPACKfrom https://github.com/everton1984/XNNPACK.git and use branchwoa_enablementClone
tensorflowfrom https://github.com/everton1984/tensorflow.git and use branchwoa_enablement2Download LLVM for WoA at least
18.1.0Download bazel for WoA version
6.5.0Make sure to take a look into
XNNPACK’s andtensorflow’sworkspaceand update the addresses forcpuinfo,pthreadpoolandXNNPACKto your respective local clones
Steps
Make sure to set the environment variables
BAZEL_LLVM,BAZEL_VCandTF_PYTHON_VERSIONto the respective proper directories on your system as well as the Python version you are using.Go to the XNNPACK folder and open the
WORKSPACEfile. Fix the directory of the local repositories to match to your own clones of pthreadpool and cpuinfo. Do the same for Tensorflow undertensorflow\workspace2.bzlNow run
bazel.exe build //tensorflow/lite:tensorflowlite --cpu=arm64_windows --compiler=clang-cl --copt="/clang:-march=armv8-a+dotprod+fp16+i8mm" --cxxopt="/clang:-march=armv8-a+dotprod+fp16+i8mm"You will find
tensorflow.dllinside thebazel-bin\tensorflowdirectory