3 # NOTE purpose of this file is static analysis only
4 # new official preset will be added when new programs are ready
8 function preset_configure()
12 REQUIRED_UNITS+=("angkor" "cwrap" "pepper-str" "pepper-strcast" "pp" "stdex")
13 REQUIRED_UNITS+=("oops" "pepper-assert" "foder")
14 REQUIRED_UNITS+=("souschef")
15 REQUIRED_UNITS+=("safemain")
16 REQUIRED_UNITS+=("arser")
17 # Hermes Logging Framework
18 REQUIRED_UNITS+=("hermes" "hermes-std")
19 # loco IR and related utilities
20 REQUIRED_UNITS+=("loco" "locop" "locomotiv" "logo-core" "logo")
22 REQUIRED_UNITS+=("mio-tflite" "mio-circle")
23 # Circle compiler library (.circle -> .circle)
24 REQUIRED_UNITS+=("luci")
26 REQUIRED_UNITS+=("tflite2circle" "circle2circle" "tflchef" "circlechef")
27 REQUIRED_UNITS+=("tf2tfliteV2" "luci-interpreter" "circle-verify")
28 REQUIRED_UNITS+=("record-minmax" "circle-quantizer")
29 REQUIRED_UNITS+=("one-cmds")
31 # TODO Use "nncc configure" and "nncc build"
33 -DCMAKE_INSTALL_PREFIX="${NNCC_INSTALL_PREFIX}" \
34 -DCMAKE_BUILD_TYPE=release \
35 -DBUILD_WHITELIST=$(join_by ";" "${REQUIRED_UNITS[@]}") \
37 "${NNAS_PROJECT_PATH}/infra/nncc"
40 function preset_install()
42 install -t "${NNPKG_INSTALL_PREFIX}/bin" -D \
43 "${NNAS_PROJECT_PATH}/tools/nnpackage_tool/model2nnpkg/model2nnpkg.sh"
46 install -T -m 755 -D "${SCRIPT_PATH}/res/tf2nnpkg.${PRESET}" "${NNAS_INSTALL_PREFIX}/bin/tf2nnpkg"
48 # Create python virtual enviornment
49 python3 -m venv "${NNAS_INSTALL_PREFIX}/bin/venv"
52 source "${NNAS_INSTALL_PREFIX}/bin/venv/bin/activate"
53 python -m pip --default-timeout=1000 --trusted-host pypi.org --trusted-host files.pythonhost.org \
54 install -U pip setuptools
55 python -m pip --default-timeout=1000 --trusted-host pypi.org --trusted-host files.pythonhost.org \
56 install tensorflow-cpu==2.3.0rc0