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+=("safemain")
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-tflite" "mio-circle")
21 # Circle compiler library (.circle -> .circle)
22 REQUIRED_UNITS+=("luci")
24 REQUIRED_UNITS+=("tflite2circle" "circle2circle" "tflchef" "circlechef")
25 REQUIRED_UNITS+=("tf2tfliteV2" "luci-interpreter" "circle-verify")
26 REQUIRED_UNITS+=("record-minmax")
28 # TODO Use "nncc configure" and "nncc build"
30 -DCMAKE_INSTALL_PREFIX="${NNCC_INSTALL_PREFIX}" \
31 -DCMAKE_BUILD_TYPE=release \
32 -DBUILD_WHITELIST=$(join_by ";" "${REQUIRED_UNITS[@]}") \
34 "${NNAS_PROJECT_PATH}/infra/nncc"
37 function preset_install()
39 install -t "${NNPKG_INSTALL_PREFIX}/bin" -D \
40 "${NNAS_PROJECT_PATH}/tools/nnpackage_tool/model2nnpkg/model2nnpkg.sh"
43 install -T -m 755 -D "${SCRIPT_PATH}/res/tf2nnpkg.${PRESET}" "${NNAS_INSTALL_PREFIX}/bin/tf2nnpkg"
45 # Create python virtual enviornment
46 python3 -m venv "${NNAS_INSTALL_PREFIX}/bin/venv"
49 source "${NNAS_INSTALL_PREFIX}/bin/venv/bin/activate"
50 python -m pip --default-timeout=1000 --trusted-host pypi.org --trusted-host files.pythonhost.org \
51 install -U pip setuptools
52 python -m pip --default-timeout=1000 --trusted-host pypi.org --trusted-host files.pythonhost.org \
53 install tensorflow==2.2.0