5 function preset_configure()
9 REQUIRED_UNITS+=("angkor" "cwrap" "pepper-str" "pepper-strcast" "pp")
10 REQUIRED_UNITS+=("oops" "pepper-assert" "pepper-csv2vec" "foder" "crew")
11 REQUIRED_UNITS+=("souschef")
12 REQUIRED_UNITS+=("safemain")
13 REQUIRED_UNITS+=("arser")
14 REQUIRED_UNITS+=("vconone")
15 # Hermes Logging Framework
16 REQUIRED_UNITS+=("hermes" "hermes-std")
17 # loco IR and related utilities
18 REQUIRED_UNITS+=("loco" "locop" "locomotiv" "logo-core" "logo")
20 REQUIRED_UNITS+=("mio-tflite280" "mio-circle05" "mio-tflite2121" "mio-circle06")
22 REQUIRED_UNITS+=("dio-hdf5")
24 REQUIRED_UNITS+=("luci-compute")
25 # Circle compiler library (.circle -> .circle)
26 REQUIRED_UNITS+=("luci")
27 # Python interface for circle schema
28 REQUIRED_UNITS+=("pics")
30 REQUIRED_UNITS+=("tflite2circle" "circle2circle" "tflchef")
31 REQUIRED_UNITS+=("circle-tensordump" "circledump")
32 REQUIRED_UNITS+=("tf2tfliteV2" "luci-interpreter")
33 REQUIRED_UNITS+=("luci-eval-driver")
34 REQUIRED_UNITS+=("record-minmax" "circle-quantizer" "rawdata2hdf5" "circle-mpqsolver")
35 REQUIRED_UNITS+=("circle-eval-diff" "circle-interpreter")
36 REQUIRED_UNITS+=("circle-partitioner" "circle-operator")
37 REQUIRED_UNITS+=("one-cmds")
38 REQUIRED_UNITS+=("bcq-tools")
39 REQUIRED_UNITS+=("dalgona")
40 REQUIRED_UNITS+=("visq")
42 # Dependent modules needed for build
43 REQUIRED_UNITS+=("circlechef")
44 REQUIRED_UNITS+=("circle-verify")
46 NPROC=$(cat /proc/cpuinfo | grep -c processor)
48 # TODO Use "nncc configure" and "nncc build"
51 -DUSE_PROTOBUF_LEGACY_IMPORT=ON \
52 -DCMAKE_EXE_LINKER_FLAGS="-Wl,--allow-multiple-definition" \
53 -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--allow-multiple-definition" \
55 -DDOWNLOAD_GTEST=OFF \
57 -DCMAKE_C_COMPILER=gcc \
58 -DCMAKE_CXX_COMPILER=g++ \
59 -DCMAKE_INSTALL_PREFIX="${NNCC_INSTALL_PREFIX}" \
60 -DCMAKE_BUILD_TYPE=release \
61 -DBUILD_WHITELIST=$(join_by ";" "${REQUIRED_UNITS[@]}") \
62 -DEXTERNALS_BUILD_THREADS=$((NPROC/2)) \
64 "${NNAS_PROJECT_PATH}/infra/nncc"
67 function preset_install()
69 # Install libraries to bin/ for Windows release
70 mv ${NNCC_INSTALL_PREFIX}/lib/*.dll ${NNCC_INSTALL_PREFIX}/bin
71 rm -rf ${NNCC_INSTALL_PREFIX}/lib
74 install -T -m 755 -D "${SCRIPT_PATH}/res/tf2nnpkg.${PRESET}" "${NNAS_INSTALL_PREFIX}/bin/tf2nnpkg"
76 # Though you have to install tensorflow to run 'tf2tfliteV2',
77 # tensorflow can't be installed in mingw. First, You can install tensorflow
78 # from Window native CMD(run as administrator) with python virtual environment.
79 # And, you must copy it to "${NNAS_INSTALL_PREFIX}/bin/venv"