benchmark/scripts/READMD.md
cmake 3.x
os < 12.3 (see FAQ Q1)
command line tool < 13.3 (see FAQ Q3)
Xcode use Legacy Build System (see FAQ Q4)
android sdk and ndk < r22 (see FAQ Q2), ANDROID_SDK and ANDROID_NDK env var should be set
apt install -y android-sdk # switch mirror when slow, link: https://blog.csdn.net/qq_31456593/article/details/89638163
ANDROID_SDK=/usr/lib/android-sdk
curl -LO https://dl.google.com/android/repository/android-ndk-r21-linux-x86_64.zip
unzip android-ndk-r21-linux-x86_64.zip -d $ANDROID_SDK 1>/dev/null
echo -e "\nexport ANDROID_SDK=$ANDROID_SDK\nexport ANDROID_NDK=$ANDROID_SDK/android-ndk-r21" >> ~/.bashrc
Install Android Studio, download ndk 21.x in SDK Manager
ruby from rbenv # avoid abuse root permission
brew install rbenv # avoid abuse root permission
rbenv install 3.1.2
rbenv global 3.1.2
echo -e "\nexport PATH=\"$HOME/.rbenv/bin:$PATH\"\neval \"$(rbenv init -)\"" | tee -a ~/.bash_profile ~/.zshrc
./build.sh --pc --mnn-tag 90719ce2 --torch-tag v1.11.0 --tf-tag v2.7.0
./build.sh --android --mnn-tag 90719ce2 --torch-tag v1.11.0 --tf-tag v2.7.0
./build.sh --ios --mnn-tag 90719ce2 --torch-tag v1.11.0 --tf-tag v2.7.0
./convert.sh --mnn-tag 90719ce2 --torch-tag v1.11.0
./bench.sh --pc --mnn --torch --tf --sync-models --tooldir dist
./bench.sh --android --mnn --torch --tf --sync-models --tooldir dist
./bench.sh --ios --mnn --torch --tf --sync-models --tooldir dist
<b>Q4: Building for iOS, but the linked and embedded framework 'TensorFlowLiteBenchmarkC.framework' was built for iOS + iOS Simulator.</b> <b>A</b>: tflite produce ios_fat framework containing many arch, which isn't support on New Build System (need XCFramework)