Tensorflow Lite移植到ARM v7 上的问题汇总。
error1: make: arm-linux-gnueabihf-: Command not found
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR/../../.."
CC_PREFIX=arm-linux-gnueabihf- make -j 3 -f tensorflow/contrib/lite/Makefile TARGET=RPI TARGET_ARCH=armv7
extra space cause this problem
==>
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR/../../.."
CC_PREFIX=arm-linux-gnueabihf-
make -j 3 -f tensorflow/contrib/lite/Makefile TARGET=RPI TARGET_ARCH=armv7
error2: gcc: error: unrecognized command line option ‘-mfpu=neon-vfpv4’
From stackoverflow
Advanced SIMD (aka NEON) is mandatory for AArch64, so no command line option is needed to instruct the compiler to use NEON.
If you want to enable auto vectorization optimisations so that the compiler automatically uses NEON instructions, then compile with -O3 or -O2 -ftree-vectorize.
The AArch64 and ARM backends are completely separate in gcc. The ARM back end only targets the traditional 32 bit ARM instructions sets (ARM, Thumb, Thumb-2). This is in contrast to the situation with x86, where the 32 bit and 64 bit code generation is combined into a single GCC back end.