-
Notifications
You must be signed in to change notification settings - Fork 2
/
notes.txt
42 lines (39 loc) · 1.71 KB
/
notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
**** Build TFLite Android ****
export CFLAGS="std=c11 -Wl -export-dynamic"
export CXXFLAGS="std=c++14 -Wl -export-dynamic"
cmake -DCMAKE_TOOLCHAIN_FILE=/home/alexander/Android/Sdk/ndk/25.2.9519653/build/cmake/android.toolchain.cmake \
-DANDROID_ABI=arm64-v8a \
-DANDROID_PLATFORM=android-26 \
-DTFLITE_ENABLE_XNNPACK=ON \
-DTFLITE_ENABLE_RUY=ON \
-DTFLITE_ENABLE_NNAPI=ON \
-DTFLITE_ENABLE_GPU=ON \
-DTFLITE_ENABLE_MMAP=ON ../tensorflow/tensorflow/lite
**** Build TFLite Local ****
export CFLAGS="-std=c11 -W -export-dynamic"
export CXXFLAGS="-std=c++14 -W -export-dynamic"
cmake \
-DTFLITE_ENABLE_XNNPACK=ON \
-DTFLITE_ENABLE_RUY=ON \
-DTFLITE_ENABLE_NNAPI=ON \
-DTFLITE_ENABLE_GPU=ON \
-DTFLITE_ENABLE_MMAP=ON ../tensorflow/tensorflow/lite
**** Build Android ****
export CFLAGS="std=c11 -export-dynamic"
export CXXFLAGS="std=c++17 -Wl -export-dynamic -fPIC"
export TFLITE_BUILD_DIR="/home/alexander/workspace/chatandroid/deps/tflite_android"
export TENSORFLOW_DIR="/home/alexander/workspace/chatandroid/deps/tensorflow"
cmake -DCMAKE_TOOLCHAIN_FILE=/home/alexander/Android/Sdk/ndk/25.2.9519653/build/cmake/android.toolchain.cmake \
-DANDROID_ABI=arm64-v8a \
-DANDROID_PLATFORM="26" \
-DTENSORFLOW_BUILD_DIR=$TFLITE_BUILD_DIR \
-DTENSORFLOW_SOURCE_DIR=$TENSORFLOW_DIR \
-DCMAKE_CROSSCOMPILING=true ../..
**** Build Local ****
export CFLAGS="-std=c11 -W -export-dynamic"
export CXXFLAGS="-std=c++17 -W -export-dynamic"
export TFLITE_BUILD_DIR="/home/alexander/workspace/chatandroid/deps/tflite_local"
export TENSORFLOW_DIR="/home/alexander/workspace/chatandroid/deps/tensorflow"
cmake \
-DTENSORFLOW_BUILD_DIR=$TFLITE_BUILD_DIR \
-DTENSORFLOW_SOURCE_DIR=$TENSORFLOW_DIR ../..