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")
13 REQUIRED_UNITS+=("oops" "pepper-assert" "pepper-csv2vec" "foder" "crew")
14 REQUIRED_UNITS+=("souschef")
15 REQUIRED_UNITS+=("safemain")
16 REQUIRED_UNITS+=("arser")
17 REQUIRED_UNITS+=("vconone")
18 # Hermes Logging Framework
19 REQUIRED_UNITS+=("hermes" "hermes-std")
20 # loco IR and related utilities
21 REQUIRED_UNITS+=("loco" "locop" "locomotiv" "logo-core" "logo")
23 REQUIRED_UNITS+=("mio-tflite2121" "mio-circle06")
25 REQUIRED_UNITS+=("dio-hdf5")
27 REQUIRED_UNITS+=("luci-compute")
28 # Circle compiler library (.circle -> .circle)
29 REQUIRED_UNITS+=("luci")
30 # Python interface for circle schema
31 REQUIRED_UNITS+=("pics")
33 REQUIRED_UNITS+=("tflite2circle" "circle2circle" "tflchef")
34 REQUIRED_UNITS+=("circle-tensordump" "circledump")
35 REQUIRED_UNITS+=("tf2tfliteV2" "luci-interpreter")
36 REQUIRED_UNITS+=("luci-eval-driver")
37 REQUIRED_UNITS+=("record-minmax" "circle-quantizer" "rawdata2hdf5" "circle-mpqsolver")
38 REQUIRED_UNITS+=("circle-eval-diff" "circle-interpreter")
39 REQUIRED_UNITS+=("circle-partitioner" "circle-operator")
40 REQUIRED_UNITS+=("one-cmds")
41 REQUIRED_UNITS+=("bcq-tools")
42 REQUIRED_UNITS+=("dalgona")
43 REQUIRED_UNITS+=("visq")
44 REQUIRED_UNITS+=("circle-opselector")
46 # Dependent modules needed for build
47 REQUIRED_UNITS+=("circlechef")
48 REQUIRED_UNITS+=("circle-verify")
50 NPROC=${NPROC:-$(cat /proc/cpuinfo | grep -c processor)}
52 # TODO Use "nncc configure" and "nncc build"
54 -DCMAKE_INSTALL_PREFIX="${NNCC_INSTALL_PREFIX}" \
55 -DCMAKE_BUILD_TYPE=release \
56 -DBUILD_WHITELIST=$(join_by ";" "${REQUIRED_UNITS[@]}") \
57 -DEXTERNALS_BUILD_THREADS=$((NPROC/2)) \
59 "${NNAS_PROJECT_PATH}/infra/nncc"
62 function preset_install()
65 install -T -m 755 -D "${SCRIPT_PATH}/res/tf2nnpkg.${PRESET}" "${NNAS_INSTALL_PREFIX}/bin/tf2nnpkg"