diff options
Diffstat (limited to 'infra')
49 files changed, 1087 insertions, 68 deletions
diff --git a/infra/cmake/packages/AbseilSourceConfig.cmake b/infra/cmake/packages/AbseilSourceConfig.cmake index 0297c08bc..8d0c7798f 100644 --- a/infra/cmake/packages/AbseilSourceConfig.cmake +++ b/infra/cmake/packages/AbseilSourceConfig.cmake @@ -7,13 +7,13 @@ function(_AbseilSource_import) nnas_include(ExternalSourceTools) nnas_include(OptionTools) - # NOTE TensorFlow 2.9 downloads abseil 20211102.0 + # NOTE GCC 13 requires abseil 20230125.3 envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com") - envoption(ABSEIL_URL ${EXTERNAL_DOWNLOAD_SERVER}/abseil/abseil-cpp/archive/20211102.0.tar.gz) + envoption(ABSEIL_URL ${EXTERNAL_DOWNLOAD_SERVER}/abseil/abseil-cpp/archive/20230125.3.tar.gz) ExternalSource_Download(ABSEIL DIRNAME ABSEIL URL ${ABSEIL_URL} - CHECKSUM MD5=bdca561519192543378b7cade101ec43) + CHECKSUM MD5=9b6dae642c4bd92f007ab2c148bc0498) set(AbseilSource_DIR ${ABSEIL_SOURCE_DIR} PARENT_SCOPE) set(AbseilSource_FOUND TRUE PARENT_SCOPE) diff --git a/infra/cmake/packages/CMSIS-NN-4.1.0/CMSIS-NNConfig.cmake b/infra/cmake/packages/CMSIS-NN-4.1.0/CMSIS-NNConfig.cmake new file mode 100644 index 000000000..06106dc60 --- /dev/null +++ b/infra/cmake/packages/CMSIS-NN-4.1.0/CMSIS-NNConfig.cmake @@ -0,0 +1,14 @@ +function(_CMSIS_NN_import) + nnas_include(ExternalSourceTools) + nnas_include(OptionTools) + + envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com") + envoption(CMSIS_NN_4_1_0_URL ${EXTERNAL_DOWNLOAD_SERVER}/ARM-software/CMSIS-NN/archive/refs/tags/v4.1.0.tar.gz) + + ExternalSource_Download(CMSIS_NN DIRNAME CMSIS-NN-4.1.0 ${CMSIS_NN_4_1_0_URL}) + + set(CMSIS_NNSource_DIR ${CMSIS_NN_SOURCE_DIR} PARENT_SCOPE) + set(CMSIS_NNSource_FOUND TRUE PARENT_SCOPE) +endfunction(_CMSIS_NN_import) + +_CMSIS_NN_import() diff --git a/infra/cmake/packages/CMSIS-NN-4.1.0/CMSIS-NNConfigVersion.cmake b/infra/cmake/packages/CMSIS-NN-4.1.0/CMSIS-NNConfigVersion.cmake new file mode 100644 index 000000000..5296e197d --- /dev/null +++ b/infra/cmake/packages/CMSIS-NN-4.1.0/CMSIS-NNConfigVersion.cmake @@ -0,0 +1,10 @@ +set(PACKAGE_VERSION "4.1.0") +set(PACKAGE_VERSION_EXACT FALSE) +set(PACKAGE_VERSION_COMPATIBLE FALSE) +set(PACKAGE_VERSION_UNSUITABLE TRUE) + +if(PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION) + set(PACKAGE_VERSION_EXACT TRUE) + set(PACKAGE_VERSION_COMPATIBLE TRUE) + set(PACKAGE_VERSION_UNSUITABLE FALSE) +endif(PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION) diff --git a/infra/cmake/packages/TensorFlowSource-2.12.1/TensorFlowSourceConfig.cmake b/infra/cmake/packages/TensorFlowSource-2.12.1/TensorFlowSourceConfig.cmake new file mode 100644 index 000000000..81fc6aecb --- /dev/null +++ b/infra/cmake/packages/TensorFlowSource-2.12.1/TensorFlowSourceConfig.cmake @@ -0,0 +1,19 @@ +function(_TensorFlowSource_import) + if(NOT DOWNLOAD_TENSORFLOW) + set(TensorFlowSource_FOUND FALSE PARENT_SCOPE) + return() + endif(NOT DOWNLOAD_TENSORFLOW) + + nnas_include(ExternalSourceTools) + nnas_include(OptionTools) + + envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com") + envoption(TENSORFLOW_2_12_1_URL ${EXTERNAL_DOWNLOAD_SERVER}/tensorflow/tensorflow/archive/v2.12.1.tar.gz) + + ExternalSource_Download(TENSORFLOW DIRNAME TENSORFLOW-2.12.1 ${TENSORFLOW_2_12_1_URL}) + + set(TensorFlowSource_DIR ${TENSORFLOW_SOURCE_DIR} PARENT_SCOPE) + set(TensorFlowSource_FOUND TRUE PARENT_SCOPE) +endfunction(_TensorFlowSource_import) + +_TensorFlowSource_import() diff --git a/infra/cmake/packages/TensorFlowSource-2.12.1/TensorFlowSourceConfigVersion.cmake b/infra/cmake/packages/TensorFlowSource-2.12.1/TensorFlowSourceConfigVersion.cmake new file mode 100644 index 000000000..8566d0816 --- /dev/null +++ b/infra/cmake/packages/TensorFlowSource-2.12.1/TensorFlowSourceConfigVersion.cmake @@ -0,0 +1,10 @@ +set(PACKAGE_VERSION "2.12.1") +set(PACKAGE_VERSION_EXACT FALSE) +set(PACKAGE_VERSION_COMPATIBLE FALSE) +set(PACKAGE_VERSION_UNSUITABLE TRUE) + +if(PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION) + set(PACKAGE_VERSION_EXACT TRUE) + set(PACKAGE_VERSION_COMPATIBLE TRUE) + set(PACKAGE_VERSION_UNSUITABLE FALSE) +endif(PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION) diff --git a/infra/command/build-docker-image b/infra/command/build-docker-image index 9a044385c..f4e2069c0 100644 --- a/infra/command/build-docker-image +++ b/infra/command/build-docker-image @@ -45,6 +45,12 @@ done DOCKER_IMAGE_NAME=${DOCKER_IMAGE_NAME:-nnfw/one-devtools:$DOCKER_TAG} DOCKER_FILE_RPATH=$DOCKER_FILE_RPATH_BASE/$UBUNTU_CODENAME/Dockerfile + +HOST_ARCH=$(uname -m) +if [[ -n $HOST_ARCH && $HOST_ARCH != "x86_64" ]]; then + DOCKER_FILE_RPATH=$DOCKER_FILE_RPATH.$HOST_ARCH +fi + DOCKER_BUILD_ARGS+=("-t ${DOCKER_IMAGE_NAME}") docker build --build-arg http_proxy="${http_proxy}" \ diff --git a/infra/debian/compiler/changelog b/infra/debian/compiler/changelog index ba5eea9a5..c4d358481 100644 --- a/infra/debian/compiler/changelog +++ b/infra/debian/compiler/changelog @@ -1,3 +1,22 @@ +one (1.24.0) bionic; urgency=medium + + * Introduce _one-import-onnx_ extension interface + * _onecc_ supports profiling of multiple backends with a single cfg file + * Enable more Quantize operator: FloorMod, Squeeze + * _visq_ supports multi-out nodes + * _onecc_ introduces `dynamic_batch_to_single_batch option` option. + + -- seongwoo <seongwoo@sw> Thu, 18 Jul 2023 14:10:22 +0900 + +one (1.23.0) bionic; urgency=medium + + * Support more Op(s): GeLU + * Support more option(s): `--fuse-gelu` + * Support multiple backends compilation with a single configuration file + * Upgrade Circle schema to 0.5 + + -- seongwoo <seongwoo@sw> Thu, 18 May 2023 19:10:21 +0900 + one (1.22.0) bionic; urgency=medium * Introduce new optimization options: `unroll_unidirseqlstm`, `forward_transpose_op`, `fold_fully_connected`, `fuse_prelu` diff --git a/infra/debian/compiler/one-compiler.install b/infra/debian/compiler/one-compiler.install index 641bbe6ae..700cc2d0a 100644 --- a/infra/debian/compiler/one-compiler.install +++ b/infra/debian/compiler/one-compiler.install @@ -3,6 +3,7 @@ usr/bin/circle2circle usr/share/one/bin/ usr/bin/circle-eval-diff usr/share/one/bin/ usr/bin/circle-interpreter usr/share/one/bin/ +usr/bin/circle-mpqsolver usr/share/one/bin/ usr/bin/circle-operator usr/share/one/bin/ usr/bin/circle-partitioner usr/share/one/bin/ usr/bin/circle-quantizer usr/share/one/bin/ @@ -28,6 +29,7 @@ usr/bin/one-prepare-venv usr/share/one/bin/ usr/bin/one-profile usr/share/one/bin/ usr/bin/one-quantize usr/share/one/bin/ usr/bin/one-version usr/share/one/bin/ +usr/bin/onelib/backends.py usr/share/one/bin/onelib/ usr/bin/onelib/constant.py usr/share/one/bin/onelib/ usr/bin/onelib/make_cmd.py usr/share/one/bin/onelib/ usr/bin/onelib/CfgRunner.py usr/share/one/bin/onelib/ @@ -49,6 +51,8 @@ usr/bin/visqlib/DumpFP32FM.py usr/share/one/bin/visqlib/ usr/bin/visqlib/Palette.py usr/share/one/bin/visqlib/ usr/bin/visqlib/QErrorComputer.py usr/share/one/bin/visqlib/ usr/bin/visqlib/Util.py usr/share/one/bin/visqlib/ +usr/bin/visqlib/DotBuilder.py usr/share/one/bin/visqlib/ +usr/bin/circle/*.py usr/share/one/bin/circle/ # lib usr/lib/* usr/share/one/lib/ # doc diff --git a/infra/debian/compiler/rules b/infra/debian/compiler/rules index 447fb2192..e83680da8 100755 --- a/infra/debian/compiler/rules +++ b/infra/debian/compiler/rules @@ -1,7 +1,7 @@ #!/usr/bin/make -f export DH_VERBOSE = 1 export NNAS_BUILD_PREFIX = build -export PRESET = 20221125 +export PRESET = 20230413 export _DESTDIR = debian/tmp/usr %: diff --git a/infra/docker/bionic/Dockerfile.aarch64 b/infra/docker/bionic/Dockerfile.aarch64 new file mode 100644 index 000000000..08d712c96 --- /dev/null +++ b/infra/docker/bionic/Dockerfile.aarch64 @@ -0,0 +1,92 @@ +# Copyright 2016-2020 Jing Li +# Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM ubuntu:18.04 + +ARG UBUNTU_MIRROR + +# Install 'add-apt-repository' +RUN apt-get update && apt-get -qqy install software-properties-common + +# Git repo for latest version (github checkout@v2 action requires v2.18) +RUN add-apt-repository ppa:git-core/ppa -y + +# Build tool +RUN apt-get update && apt-get -qqy install build-essential cmake scons git g++-arm-linux-gnueabihf + +# ARM none eabi build tool +RUN apt-get update && apt-get -qqy install gcc-arm-none-eabi + +# Debian build tool +RUN apt-get update && apt-get -qqy install fakeroot devscripts debhelper python3-all + +# Install extra dependencies (Caffe, nnkit) +RUN apt-get update && apt-get -qqy install libboost-all-dev libgflags-dev libgoogle-glog-dev libatlas-base-dev libhdf5-dev + +# Install protocol buffer +RUN apt-get update && apt-get -qqy install libprotobuf-dev protobuf-compiler + +# Additonal tools +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive \ + apt-get -qqy install doxygen graphviz wget zip unzip clang-format-8 python3 python3-pip python3-venv python3-dev hdf5-tools pylint curl +RUN apt-get update && apt-get -qqy install python3.8 python3.8-venv python3.8-dev +RUN python3 -m pip install --upgrade pip +RUN python3 -m pip install yapf==0.22.0 numpy flatbuffers +RUN python3.8 -m pip install --upgrade pip +RUN python3.8 -m pip install numpy flatbuffers + +# Install google test (source) +RUN apt-get update && apt-get -qqy install libgtest-dev + +# Install build tool gcc version 8.x and set alternative link (c++17 support) +RUN apt-get update && apt-get -qqy install g++-8 g++-8-arm-linux-gnueabihf +RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 80 \ + --slave /usr/bin/g++ g++ /usr/bin/g++-8 \ + --slave /usr/bin/gcov gcov /usr/bin/gcov-8 +RUN update-alternatives --install /usr/bin/arm-linux-gnueabihf-gcc arm-linux-gnueabihf-gcc /usr/bin/arm-linux-gnueabihf-gcc-8 80 \ + --slave /usr/bin/arm-linux-gnueabihf-g++ arm-linux-gnueabihf-g++ /usr/bin/arm-linux-gnueabihf-g++-8 \ + --slave /usr/bin/arm-linux-gnueabihf-gcov arm-linux-gnueabihf-gcov /usr/bin/arm-linux-gnueabihf-gcov-8 + +# Install lcov 1.14-2 for gcc-8 support +# Default version lcov 1.13-3 can't support gcc-8 +# lcov 1.13-4 with gcc-8 have bug: reports no coverage for class declaration +WORKDIR /root/lcov +RUN wget http://archive.ubuntu.com/ubuntu/pool/universe/l/lcov/lcov_1.14-2_all.deb +RUN apt-get update && apt-get -qqy install libperlio-gzip-perl libjson-perl +RUN dpkg -i lcov_1.14-2_all.deb +WORKDIR /root +RUN rm -rf /root/lcov + +# Build and install google test static libraries +WORKDIR /root/gtest +RUN cmake /usr/src/gtest +RUN make +RUN mv *.a /usr/lib +WORKDIR /root +RUN rm -rf gtest + +# Setup user to match host user, and give superuser permissions +ARG USER_ID=1000 +ARG GROUP_ID=${USER_ID} +RUN addgroup --gid ${GROUP_ID} ubuntu && adduser --disabled-password --gecos '' --uid ${USER_ID} --gid ${GROUP_ID} ubuntu && usermod -aG sudo ubuntu +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers +RUN echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +# Clean archives (to reduce image size) +RUN apt-get clean -y + +# Set user to the one we just created +USER ${USER_ID} diff --git a/infra/docker/focal/Dockerfile b/infra/docker/focal/Dockerfile index 284857964..0c6c582e9 100644 --- a/infra/docker/focal/Dockerfile +++ b/infra/docker/focal/Dockerfile @@ -48,6 +48,52 @@ RUN wget http://download.tizen.org/sdk/tizenstudio/official/binary/sdb_4.2.19_ub RUN unzip -d tmp sdb.zip && rm sdb.zip RUN cp tmp/data/tools/sdb /usr/bin/. && rm -rf tmp/* +# ARM none eabi build tool +RUN apt-get update && apt-get -qqy install gcc-arm-none-eabi + +# Install java +RUN apt-get install -y --no-install-recommends openjdk-8-jdk + +# download and install Gradle +# https://services.gradle.org/distributions/ +ARG GRADLE_VERSION=6.4.1 +ARG GRADLE_DIST=bin +RUN cd /opt && \ + wget -q https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-${GRADLE_DIST}.zip && \ + unzip gradle*.zip && \ + ls -d */ | sed 's/\/*$//g' | xargs -I{} mv {} gradle && \ + rm gradle*.zip + +# download and install Android SDK +# https://developer.android.com/studio#command-tools +ARG ANDROID_SDK_VERSION=6514223 +ENV ANDROID_SDK_ROOT /opt/android-sdk +RUN mkdir -p ${ANDROID_SDK_ROOT}/cmdline-tools && \ + wget -q https://dl.google.com/android/repository/commandlinetools-linux-${ANDROID_SDK_VERSION}_latest.zip && \ + unzip *tools*linux*.zip -d ${ANDROID_SDK_ROOT}/cmdline-tools && \ + rm *tools*linux*.zip + +# accept the license agreements of the SDK components +RUN mkdir -p ${ANDROID_SDK_ROOT}/licenses +RUN echo 24333f8a63b6825ea9c5514f83c2829b004d1fee > ${ANDROID_SDK_ROOT}/licenses/android-sdk-license +RUN echo d56f5187479451eabf01fb78af6dfcb131a6481e >> ${ANDROID_SDK_ROOT}/licenses/android-sdk-license + +# Env variable for gradle build +ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64 +ENV GRADLE_HOME /opt/gradle +ENV PATH ${PATH}:${GRADLE_HOME}/bin:${ANDROID_SDK_ROOT}/cmdline-tools/tools/bin:${ANDROID_SDK_ROOT}/platform-tools +ENV ANDROID_HOME ${ANDROID_SDK_ROOT} + +# Install NDK +RUN sdkmanager --install "ndk;20.0.5594570" +RUN sdkmanager "platform-tools" + +# Env for ko encoding build +ENV LC_ALL "C.UTF-8" + +# setup adb server +EXPOSE 5037 + # Setup user to match host user, and give superuser permissions ARG USER_ID=1000 ARG GROUP_ID=${USER_ID} diff --git a/infra/docker/focal/Dockerfile.aarch64 b/infra/docker/focal/Dockerfile.aarch64 new file mode 100644 index 000000000..b63bbb10f --- /dev/null +++ b/infra/docker/focal/Dockerfile.aarch64 @@ -0,0 +1,62 @@ +# Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM ubuntu:20.04 + +ARG UBUNTU_MIRROR + +# Install 'add-apt-repository' +RUN apt-get update && apt-get -qqy install software-properties-common + +# Build tool +RUN apt-get update && apt-get -qqy install build-essential cmake scons git lcov g++-arm-linux-gnueabihf + +# Debian build tool +RUN apt-get update && apt-get -qqy install fakeroot devscripts debhelper python3-all dh-python + +# Install extra dependencies (Caffe, nnkit) +RUN apt-get update && apt-get -qqy install libboost-all-dev libgflags-dev libgoogle-glog-dev libatlas-base-dev libhdf5-dev + +# Install protocol buffer +RUN apt-get update && apt-get -qqy install libprotobuf-dev protobuf-compiler + +# Additonal tools +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive \ + apt-get -qqy install doxygen graphviz wget zip unzip clang-format-8 python3 python3-pip python3-venv python3-dev hdf5-tools pylint curl +RUN python3 -m pip install --upgrade pip +RUN python3 -m pip install yapf==0.22.0 numpy flatbuffers + +# Install google test (source) +RUN apt-get update && apt-get -qqy install libgtest-dev + +# Install gbs & sdb +RUN echo 'deb [trusted=yes] http://download.tizen.org/tools/latest-release/Ubuntu_20.04/ /' | cat >> /etc/apt/sources.list +RUN apt-get update && apt-get -qqy install gbs +RUN wget http://download.tizen.org/sdk/tizenstudio/official/binary/sdb_4.2.19_ubuntu-64.zip -O sdb.zip +RUN unzip -d tmp sdb.zip && rm sdb.zip +RUN cp tmp/data/tools/sdb /usr/bin/. && rm -rf tmp/* + +# Setup user to match host user, and give superuser permissions +ARG USER_ID=1000 +ARG GROUP_ID=${USER_ID} +RUN addgroup --gid ${GROUP_ID} ubuntu && adduser --disabled-password --gecos '' --uid ${USER_ID} --gid ${GROUP_ID} ubuntu && usermod -aG sudo ubuntu +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers +RUN echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +# Clean archives (to reduce image size) +RUN apt-get clean -y + +# Set user to the one we just created +USER ${USER_ID} diff --git a/infra/docker/jammy/Dockerfile.aarch64 b/infra/docker/jammy/Dockerfile.aarch64 new file mode 100644 index 000000000..a6a449dd6 --- /dev/null +++ b/infra/docker/jammy/Dockerfile.aarch64 @@ -0,0 +1,60 @@ +# Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM ubuntu:jammy + +ARG UBUNTU_MIRROR + +# Install 'add-apt-repository' +RUN apt-get update && apt-get -qqy install software-properties-common + +# Build tool +RUN apt-get update && apt-get -qqy install build-essential cmake scons git lcov g++-arm-linux-gnueabihf + +# Debian build tool +RUN apt-get update && apt-get -qqy install fakeroot devscripts debhelper python3-all dh-python + +# Install extra dependencies (Caffe, nnkit) +RUN apt-get update && apt-get -qqy install libboost-all-dev libgflags-dev libgoogle-glog-dev libatlas-base-dev libhdf5-dev + +# Install protocol buffer +RUN apt-get update && apt-get -qqy install libprotobuf-dev protobuf-compiler + +# Additonal tools +# TODO install clang-format (No official clang-format-8 package for ubuntu jammy) +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive \ + apt-get -qqy install doxygen graphviz wget zip unzip python3 python3-pip python3-venv python3-dev hdf5-tools pylint curl +RUN python3 -m pip install --upgrade pip +RUN python3 -m pip install yapf==0.22.0 numpy flatbuffers + +# Install google test (source) +RUN apt-get update && apt-get -qqy install libgtest-dev + +# TODO: Install gbs & sdb +# gbs & sdb are not support ubuntu jammy yet + +# Setup user to match host user, and give superuser permissions +ARG USER_ID=1000 +ARG GROUP_ID=${USER_ID} +RUN apt-get update && apt-get -qqy install sudo +RUN addgroup --gid ${GROUP_ID} ubuntu && adduser --disabled-password --gecos '' --uid ${USER_ID} --gid ${GROUP_ID} ubuntu && usermod -aG sudo ubuntu +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers +RUN echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +# Clean archives (to reduce image size) +RUN apt-get clean -y + +# Set user to the one we just created +USER ${USER_ID} diff --git a/infra/nncc/Makefile.arm32 b/infra/nncc/Makefile.arm32 index 97631fc9d..9ba57ddb2 100644 --- a/infra/nncc/Makefile.arm32 +++ b/infra/nncc/Makefile.arm32 @@ -26,7 +26,7 @@ ARM32_BUILD_ITEMS+=;pepper-csv2vec;crew ARM32_BUILD_ITEMS+=;oops;pepper-assert ARM32_BUILD_ITEMS+=;hermes;hermes-std ARM32_BUILD_ITEMS+=;loco;locop;logo-core;logo -ARM32_BUILD_ITEMS+=;safemain;mio-circle04;mio-tflite280 +ARM32_BUILD_ITEMS+=;safemain;mio-circle05;mio-tflite280;mio-circle06;mio-tflite2121 ARM32_BUILD_ITEMS+=;dio-hdf5 ARM32_BUILD_ITEMS+=;luci-compute ARM32_BUILD_ITEMS+=;foder;circle-verify;souschef;arser;vconone @@ -44,7 +44,7 @@ ARM32_HOST_ITEMS+=;pepper-csv2vec ARM32_HOST_ITEMS+=;oops ARM32_HOST_ITEMS+=;hermes;hermes-std ARM32_HOST_ITEMS+=;loco;locop;logo-core;logo -ARM32_HOST_ITEMS+=;safemain;mio-circle04;mio-tflite280 +ARM32_HOST_ITEMS+=;safemain;mio-circle05;mio-tflite280;mio-circle06;mio-tflite2121 ARM32_HOST_ITEMS+=;luci-compute ARM32_HOST_ITEMS+=;foder;circle-verify;souschef;arser;vconone ARM32_HOST_ITEMS+=;luci diff --git a/infra/nncc/cmake/buildtool/config/config_aarch64-linux.cmake b/infra/nncc/cmake/buildtool/config/config_aarch64-linux.cmake new file mode 100644 index 000000000..fcae94f28 --- /dev/null +++ b/infra/nncc/cmake/buildtool/config/config_aarch64-linux.cmake @@ -0,0 +1,13 @@ +# +# aarch64 linux compile options +# + +message(STATUS "Building for aarch64 Linux") + +# include linux common +include("${CMAKE_CURRENT_LIST_DIR}/config_linux.cmake") + +# addition for arm-linux +set(FLAGS_COMMON ${FLAGS_COMMON} + "-march=armv8-a" + ) diff --git a/infra/nncc/cmake/buildtool/config/config_aarch64-tizen.cmake b/infra/nncc/cmake/buildtool/config/config_aarch64-tizen.cmake new file mode 100644 index 000000000..0f304ecf3 --- /dev/null +++ b/infra/nncc/cmake/buildtool/config/config_aarch64-tizen.cmake @@ -0,0 +1,17 @@ +# +# aarch64 tizen compile options +# + +message(STATUS "Building for AARCH64 Tizen") + +# Build flag for tizen +set(CMAKE_C_FLAGS_DEBUG "-O -g -DDEBUG") +set(CMAKE_CXX_FLAGS_DEBUG "-O -g -DDEBUG") + +# TODO : add and use option_tizen if something uncommon comes up +# include linux common +include("cmake/buildtool/config/config_linux.cmake") + +# addition for aarch64-tizen +set(FLAGS_COMMON ${FLAGS_COMMON} + ) diff --git a/infra/nncc/cmake/buildtool/config/config_armv7hl-tizen.cmake b/infra/nncc/cmake/buildtool/config/config_armv7hl-tizen.cmake new file mode 100644 index 000000000..fc6876a23 --- /dev/null +++ b/infra/nncc/cmake/buildtool/config/config_armv7hl-tizen.cmake @@ -0,0 +1,29 @@ +# +# armv7l tizen compile options +# + +message(STATUS "Building for ARMv7hl(hardfp) Tizen") + +# Build flag for tizen +set(CMAKE_C_FLAGS_DEBUG "-O -g -DDEBUG") +set(CMAKE_CXX_FLAGS_DEBUG "-O -g -DDEBUG") + +# TODO : add and use option_tizen if something uncommon comes up +# include linux common +include("cmake/buildtool/config/config_linux.cmake") + +# addition for arm-linux +set(FLAGS_COMMON ${FLAGS_COMMON} + "-mtune=cortex-a8" + "-mfloat-abi=hard" + "-funsafe-math-optimizations" + ) + +if(BUILD_ARM32_NEON) + set(FLAGS_COMMON ${FLAGS_COMMON} + "-mfpu=neon-vfpv4" + "-ftree-vectorize" + ) +else(BUILD_ARM32_NEON) + message(STATUS "ARMv7l: NEON is disabled") +endif(BUILD_ARM32_NEON) diff --git a/infra/nncc/cmake/buildtool/config/config_armv7l-tizen.cmake b/infra/nncc/cmake/buildtool/config/config_armv7l-tizen.cmake new file mode 100644 index 000000000..b1ffe65c1 --- /dev/null +++ b/infra/nncc/cmake/buildtool/config/config_armv7l-tizen.cmake @@ -0,0 +1,29 @@ +# +# armv7l tizen compile options +# + +message(STATUS "Building for ARMv7l(softfp) Tizen") + +# Build flag for tizen +set(CMAKE_C_FLAGS_DEBUG "-O -g -DDEBUG") +set(CMAKE_CXX_FLAGS_DEBUG "-O -g -DDEBUG") + +# TODO : add and use option_tizen if something uncommon comes up +# include linux common +include("cmake/buildtool/config/config_linux.cmake") + +# addition for arm-linux +set(FLAGS_COMMON ${FLAGS_COMMON} + "-mtune=cortex-a8" + "-mfloat-abi=softfp" + "-funsafe-math-optimizations" + ) + +if(BUILD_ARM32_NEON) + set(FLAGS_COMMON ${FLAGS_COMMON} + "-mfpu=neon-vfpv4" + "-ftree-vectorize" + ) +else(BUILD_ARM32_NEON) + message(STATUS "ARMv7l: NEON is disabled") +endif(BUILD_ARM32_NEON) diff --git a/infra/nncc/cmake/buildtool/config/config_i686-tizen.cmake b/infra/nncc/cmake/buildtool/config/config_i686-tizen.cmake new file mode 100644 index 000000000..3929e07fd --- /dev/null +++ b/infra/nncc/cmake/buildtool/config/config_i686-tizen.cmake @@ -0,0 +1,17 @@ +# +# i686 tizen compile options +# + +message(STATUS "Building for i686 Tizen") + +# Build flag for tizen +set(CMAKE_C_FLAGS_DEBUG "-O -g -DDEBUG") +set(CMAKE_CXX_FLAGS_DEBUG "-O -g -DDEBUG") + +# TODO : add and use option_tizen if something uncommon comes up +# include linux common +include("cmake/buildtool/config/config_linux.cmake") + +# addition for i686-tizen +set(FLAGS_COMMON ${FLAGS_COMMON} + ) diff --git a/infra/nncc/cmake/buildtool/config/config_x86_64-tizen.cmake b/infra/nncc/cmake/buildtool/config/config_x86_64-tizen.cmake new file mode 100644 index 000000000..0f304ecf3 --- /dev/null +++ b/infra/nncc/cmake/buildtool/config/config_x86_64-tizen.cmake @@ -0,0 +1,17 @@ +# +# aarch64 tizen compile options +# + +message(STATUS "Building for AARCH64 Tizen") + +# Build flag for tizen +set(CMAKE_C_FLAGS_DEBUG "-O -g -DDEBUG") +set(CMAKE_CXX_FLAGS_DEBUG "-O -g -DDEBUG") + +# TODO : add and use option_tizen if something uncommon comes up +# include linux common +include("cmake/buildtool/config/config_linux.cmake") + +# addition for aarch64-tizen +set(FLAGS_COMMON ${FLAGS_COMMON} + ) diff --git a/infra/nncc/cmake/options/options_aarch64-darwin.cmake b/infra/nncc/cmake/options/options_aarch64-darwin.cmake new file mode 100644 index 000000000..89398bdf4 --- /dev/null +++ b/infra/nncc/cmake/options/options_aarch64-darwin.cmake @@ -0,0 +1,4 @@ +# +# aarch64 darwin cmake options +# + diff --git a/infra/nncc/cmake/options/options_aarch64-linux.cmake b/infra/nncc/cmake/options/options_aarch64-linux.cmake new file mode 100644 index 000000000..becd574b1 --- /dev/null +++ b/infra/nncc/cmake/options/options_aarch64-linux.cmake @@ -0,0 +1,4 @@ +# +# aarch64 linux cmake options +# + diff --git a/infra/nncc/cmake/options/options_aarch64-tizen.cmake b/infra/nncc/cmake/options/options_aarch64-tizen.cmake new file mode 100644 index 000000000..be97cb314 --- /dev/null +++ b/infra/nncc/cmake/options/options_aarch64-tizen.cmake @@ -0,0 +1,4 @@ +# +# aarch64 tizen cmake options +# + diff --git a/infra/nncc/cmake/options/options_armv7hl-tizen.cmake b/infra/nncc/cmake/options/options_armv7hl-tizen.cmake new file mode 100644 index 000000000..e787ecef8 --- /dev/null +++ b/infra/nncc/cmake/options/options_armv7hl-tizen.cmake @@ -0,0 +1,5 @@ +# +# armv7hl tizen cmake options +# + +option(BUILD_ARM32_NEON "Use NEON for ARM32 build" ON) diff --git a/infra/nncc/cmake/options/options_armv7l-tizen.cmake b/infra/nncc/cmake/options/options_armv7l-tizen.cmake new file mode 100644 index 000000000..9a96f403a --- /dev/null +++ b/infra/nncc/cmake/options/options_armv7l-tizen.cmake @@ -0,0 +1,5 @@ +# +# armv7l tizen cmake options +# + +option(BUILD_ARM32_NEON "Use NEON for ARM32 build" ON) diff --git a/infra/nncc/cmake/options/options_i686-tizen.cmake b/infra/nncc/cmake/options/options_i686-tizen.cmake new file mode 100644 index 000000000..028efca97 --- /dev/null +++ b/infra/nncc/cmake/options/options_i686-tizen.cmake @@ -0,0 +1,3 @@ +# +# i686 tizen cmake options +# diff --git a/infra/nncc/cmake/options/options_x86_64-darwin.cmake b/infra/nncc/cmake/options/options_x86_64-darwin.cmake new file mode 100644 index 000000000..1a29135b4 --- /dev/null +++ b/infra/nncc/cmake/options/options_x86_64-darwin.cmake @@ -0,0 +1,4 @@ +# +# x86_64 darwin cmake options +# + diff --git a/infra/nncc/cmake/options/options_x86_64-tizen.cmake b/infra/nncc/cmake/options/options_x86_64-tizen.cmake new file mode 100644 index 000000000..a29a0afc2 --- /dev/null +++ b/infra/nncc/cmake/options/options_x86_64-tizen.cmake @@ -0,0 +1,3 @@ +# +# x86_64 tizen cmake options +# diff --git a/infra/nnfw/CMakeLists.txt b/infra/nnfw/CMakeLists.txt index bb55a8f1c..857c15bf5 100644 --- a/infra/nnfw/CMakeLists.txt +++ b/infra/nnfw/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.16.3) project(nnfw) @@ -6,7 +6,7 @@ enable_testing() set(CMAKE_SKIP_BUILD_RPATH FALSE) set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) -set(CMAKE_INSTALL_RPATH "$ORIGIN/../lib:$ORIGIN/") +set(CMAKE_INSTALL_RPATH "$ORIGIN/../lib:$ORIGIN/../lib/nnfw/odc:$ORIGIN/") set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) ### CMAKE_BUILD_TYPE_LC: Build type lower case diff --git a/infra/nnfw/cmake/CfgOptionFlags.cmake b/infra/nnfw/cmake/CfgOptionFlags.cmake index b2f4da58c..8d37cf27c 100644 --- a/infra/nnfw/cmake/CfgOptionFlags.cmake +++ b/infra/nnfw/cmake/CfgOptionFlags.cmake @@ -20,6 +20,7 @@ option(BUILD_RUNTIME_NNFW_API_TEST "Build Runtime NNFW API Tests" ON) option(BUILD_TFLITE_RUN "Build tflite-run" ON) option(BUILD_TFLITE_VANILLA_RUN "Build tflite-vanilla-run" OFF) option(BUILD_ONERT_RUN "Build onert_run" ON) +option(BUILD_ONERT_TRAIN "Build onert_train" ON) option(BUILD_TFLITE_LOADER "Build TensorFlow Lite loader" ON) option(BUILD_CIRCLE_LOADER "Build circle loader" ON) option(BUILD_TRIX_LOADER "Build trix loader" ON) @@ -31,6 +32,8 @@ option(INSTALL_TEST_SCRIPTS "Install test scripts" ON) option(BUILD_GPU_CL "Build gpu_cl backend" OFF) option(BUILD_NPUD "Build NPU daemon" OFF) option(ENVVAR_NPUD_CONFIG "Use environment variable for npud configuration" OFF) +option(BUILD_MINMAX_H5DUMPER "Build minmax h5dumper" ON) +option(ENABLE_ONERT_TRAIN "Enable onert training feature" ON) # # Default build configuration for contrib # diff --git a/infra/nnfw/cmake/buildtool/config/config_linux.cmake b/infra/nnfw/cmake/buildtool/config/config_linux.cmake index 01b47ef4a..681d165d2 100644 --- a/infra/nnfw/cmake/buildtool/config/config_linux.cmake +++ b/infra/nnfw/cmake/buildtool/config/config_linux.cmake @@ -10,3 +10,8 @@ set(FLAGS_CXXONLY ${FLAGS_CXXONLY} "-Wno-ignored-attributes") if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0) list(APPEND FLAGS_CXXONLY "-Wno-psabi") endif() + +# Build fail on memcpy (ex. compute/cker/include/cker/Shape.h:211:16) +if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 12.0) + list(APPEND FLAGS_CXXONLY "-Wno-error=stringop-overflow -Wno-error=array-bounds") +endif() diff --git a/infra/nnfw/cmake/buildtool/cross/toolchain_armv7l-tizen.cmake b/infra/nnfw/cmake/buildtool/cross/toolchain_armv7l-tizen.cmake deleted file mode 100644 index 181415df2..000000000 --- a/infra/nnfw/cmake/buildtool/cross/toolchain_armv7l-tizen.cmake +++ /dev/null @@ -1,56 +0,0 @@ -# -# config for arm-linux -# -include(CMakeForceCompiler) - -set(CMAKE_SYSTEM_NAME Linux) -set(CMAKE_SYSTEM_PROCESSOR armv7l) - -set(CMAKE_C_COMPILER arm-linux-gnueabi-gcc) -set(CMAKE_CXX_COMPILER arm-linux-gnueabi-g++) - -set(TIZEN_TOOLCHAIN "armv7l-tizen-linux-gnueabi/6.2.1") - -# where is the target environment -set(NNAS_PROJECT_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../../..") -set(ROOTFS_ARM "${NNAS_PROJECT_SOURCE_DIR}/tools/cross/rootfs/armel") -include("${NNAS_PROJECT_SOURCE_DIR}/infra/cmake/modules/OptionTools.cmake") - -envoption(ROOTFS_DIR ${ROOTFS_ARM}) -if(NOT EXISTS "${ROOTFS_DIR}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") - message(FATAL_ERROR "Please prepare RootFS for tizen ARM softfp") -endif() - -set(CMAKE_SYSROOT ${ROOTFS_DIR}) -set(CMAKE_FIND_ROOT_PATH ${ROOTFS_DIR}) - -# search for programs in the build host directories -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) - -# for libraries and headers in the target directories -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) - -# Set cache variable to ignore try-run error by find_package(Threads REQUIRED) on cross build -set(THREADS_PTHREAD_ARG "2" CACHE STRING "Result from TRY_RUN" FORCE) - - -add_compile_options(-mthumb) -add_compile_options(-mfpu=neon-vfpv4) -add_compile_options(-mfloat-abi=softfp) -add_compile_options(--sysroot=${ROOTFS_DIR}) - -include_directories(SYSTEM ${ROOTFS_DIR}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/) -include_directories(SYSTEM ${ROOTFS_DIR}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/armv7l-tizen-linux-gnueabi) -add_compile_options(-Wno-deprecated-declarations) # compile-time option -add_compile_options(-D__extern_always_inline=inline) # compile-time option - -set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -B${ROOTFS_DIR}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") -set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -L${ROOTFS_DIR}/lib") -set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -L${ROOTFS_DIR}/usr/lib") -set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -L${ROOTFS_DIR}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") - -set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -B${ROOTFS_DIR}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") -set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L${ROOTFS_DIR}/lib") -set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L${ROOTFS_DIR}/usr/lib") -set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L${ROOTFS_DIR}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") diff --git a/infra/nnfw/cmake/options/options_aarch64-android.cmake b/infra/nnfw/cmake/options/options_aarch64-android.cmake index 242dcd3c6..5de2be333 100644 --- a/infra/nnfw/cmake/options/options_aarch64-android.cmake +++ b/infra/nnfw/cmake/options/options_aarch64-android.cmake @@ -14,3 +14,5 @@ option(DOWNLOAD_OPENCL_HEADERS "Download Opencl_headers source" ON) option(DOWNLOAD_PYBIND11 "Download Pybind11 source" ON) option(BUILD_GPU_CL "Build gpu_cl backend" ON) option(BUILD_TENSORFLOW_LITE_GPU "Build TensorFlow Lite GPU delegate from the downloaded source" ON) + +option(BUILD_MINMAX_H5DUMPER "Build minmax h5dumper" OFF) diff --git a/infra/nnfw/cmake/options/options_aarch64-tizen.cmake b/infra/nnfw/cmake/options/options_aarch64-tizen.cmake index daaa4c449..cccd77f98 100644 --- a/infra/nnfw/cmake/options/options_aarch64-tizen.cmake +++ b/infra/nnfw/cmake/options/options_aarch64-tizen.cmake @@ -14,3 +14,6 @@ option(ENVVAR_ONERT_CONFIG "Use environment variable for onert configuration" OF option(BUILD_NPUD "Build NPU daemon" ON) # Do not allow to use CONFIG option on Tizen option(ENVVAR_NPUD_CONFIG "Use environment variable for npud configuration" OFF) + +option(BUILD_MINMAX_H5DUMPER "Build minmax h5dumper" OFF) +option(ENABLE_ONERT_TRAIN "Enable onert training feature" OFF) diff --git a/infra/nnfw/cmake/options/options_armv7hl-tizen.cmake b/infra/nnfw/cmake/options/options_armv7hl-tizen.cmake index e28801f87..07dc0404e 100644 --- a/infra/nnfw/cmake/options/options_armv7hl-tizen.cmake +++ b/infra/nnfw/cmake/options/options_armv7hl-tizen.cmake @@ -22,3 +22,6 @@ option(BUILD_TENSORFLOW_LITE_GPU "Build TensorFlow Lite GPU delegate from the do option(BUILD_NPUD "Build NPU daemon" ON) # Do not allow to use CONFIG option on Tizen option(ENVVAR_NPUD_CONFIG "Use environment variable for npud configuration" OFF) + +option(BUILD_MINMAX_H5DUMPER "Build minmax h5dumper" OFF) +option(ENABLE_ONERT_TRAIN "Enable onert training feature" OFF) diff --git a/infra/nnfw/cmake/options/options_armv7l-tizen.cmake b/infra/nnfw/cmake/options/options_armv7l-tizen.cmake index c5f4a2cc6..4fdcbc33f 100644 --- a/infra/nnfw/cmake/options/options_armv7l-tizen.cmake +++ b/infra/nnfw/cmake/options/options_armv7l-tizen.cmake @@ -22,3 +22,6 @@ option(BUILD_TENSORFLOW_LITE_GPU "Build TensorFlow Lite GPU delegate from the do option(BUILD_NPUD "Build NPU daemon" ON) # Do not allow to use CONFIG option on Tizen option(ENVVAR_NPUD_CONFIG "Use environment variable for npud configuration" OFF) + +option(BUILD_MINMAX_H5DUMPER "Build minmax h5dumper" OFF) +option(ENABLE_ONERT_TRAIN "Enable onert training feature" OFF) diff --git a/infra/nnfw/cmake/options/options_i686-tizen.cmake b/infra/nnfw/cmake/options/options_i686-tizen.cmake index 14a3d555b..e51f5ed7b 100644 --- a/infra/nnfw/cmake/options/options_i686-tizen.cmake +++ b/infra/nnfw/cmake/options/options_i686-tizen.cmake @@ -11,3 +11,6 @@ option(GENERATE_RUNTIME_NNAPI_TESTS "Generate NNAPI operation gtest" OFF) option(ENVVAR_ONERT_CONFIG "Use environment variable for onert configuration" OFF) option(BUILD_XNNPACK "Build XNNPACK" OFF) + +option(BUILD_MINMAX_H5DUMPER "Build minmax h5dumper" OFF) +option(ENABLE_ONERT_TRAIN "Enable onert training feature" OFF) diff --git a/infra/nnfw/cmake/options/options_x86_64-tizen.cmake b/infra/nnfw/cmake/options/options_x86_64-tizen.cmake index 24b4d95f8..70da68c82 100644 --- a/infra/nnfw/cmake/options/options_x86_64-tizen.cmake +++ b/infra/nnfw/cmake/options/options_x86_64-tizen.cmake @@ -16,3 +16,6 @@ option(DOWNLOAD_OPENCL_HEADERS "Download opencl headers" OFF) option(BUILD_NPUD "Build NPU daemon" ON) # Do not allow to use CONFIG option on Tizen option(ENVVAR_NPUD_CONFIG "Use environment variable for npud configuration" OFF) + +option(BUILD_MINMAX_H5DUMPER "Build minmax h5dumper" OFF) +option(ENABLE_ONERT_TRAIN "Enable onert training feature" OFF) diff --git a/infra/nnfw/cmake/packages/LuciConfig.cmake b/infra/nnfw/cmake/packages/LuciConfig.cmake new file mode 100644 index 000000000..426556b3a --- /dev/null +++ b/infra/nnfw/cmake/packages/LuciConfig.cmake @@ -0,0 +1,43 @@ +# Assume that luci and related libraries and headers are installed on overlay directory + +set(Luci_FOUND FALSE) + +find_path(LUCI_HEADERS + NAMES loco.h luci/IR/CircleNode.h + PATHS ${EXT_OVERLAY_DIR}/include) + +macro(_load_library LUCI_NAME) + add_library(luci::${LUCI_NAME} SHARED IMPORTED) + find_library(LUCI_LIB_PATH_${LUCI_NAME} NAMES luci_${LUCI_NAME} PATHS ${EXT_OVERLAY_DIR}/lib) + if (NOT LUCI_LIB_PATH_${LUCI_NAME}) + return() + endif() + set_target_properties(luci::${LUCI_NAME} PROPERTIES + IMPORTED_LOCATION ${LUCI_LIB_PATH_${LUCI_NAME}} + INTERFACE_INCLUDE_DIRECTORIES ${LUCI_HEADERS}) +endmacro() + +_load_library(env) +_load_library(export) +_load_library(import) +_load_library(lang) +_load_library(logex) +_load_library(log) +_load_library(partition) +_load_library(pass) +_load_library(plan) +_load_library(profile) +_load_library(service) + +# Need luci::loco to avoid "DSO missing from command line" link error +# TODO Find better way to do this +add_library(luci::loco SHARED IMPORTED) +find_library(LOCO_LIB_PATH NAMES loco PATHS ${EXT_OVERLAY_DIR}/lib) +if (NOT LOCO_LIB_PATH) + return() +endif() +set_target_properties(luci::loco PROPERTIES + IMPORTED_LOCATION ${LOCO_LIB_PATH} + INTERFACE_INCLUDE_DIRECTORIES ${LUCI_HEADERS}) + +set(Luci_FOUND TRUE) diff --git a/infra/packaging/build b/infra/packaging/build index 0c1370faa..16bce7e0e 100644 --- a/infra/packaging/build +++ b/infra/packaging/build @@ -8,7 +8,7 @@ if [[ -z "${NNAS_PROJECT_PATH}" ]]; then fi # The default preset -PRESET="20221125" +PRESET="20230413" # Test is enabled by default DISABLE_TEST=false diff --git a/infra/packaging/preset/20230413 b/infra/packaging/preset/20230413 new file mode 100644 index 000000000..85ce6cbc6 --- /dev/null +++ b/infra/packaging/preset/20230413 @@ -0,0 +1,66 @@ +#!/bin/bash + +# NOTE purpose of this file is static analysis only +# new official preset will be added when new programs are ready + +PRESET="20230413" + +function preset_configure() +{ + REQUIRED_UNITS=() + # Common Libraries + REQUIRED_UNITS+=("angkor" "cwrap" "pepper-str" "pepper-strcast" "pp") + REQUIRED_UNITS+=("oops" "pepper-assert" "pepper-csv2vec" "foder" "crew") + REQUIRED_UNITS+=("souschef") + REQUIRED_UNITS+=("safemain") + REQUIRED_UNITS+=("arser") + REQUIRED_UNITS+=("vconone") + # Hermes Logging Framework + REQUIRED_UNITS+=("hermes" "hermes-std") + # loco IR and related utilities + REQUIRED_UNITS+=("loco" "locop" "locomotiv" "logo-core" "logo") + # Flatbuffer I/O + REQUIRED_UNITS+=("mio-tflite280" "mio-circle05" "mio-tflite2121" "mio-circle06") + # Data I/O + REQUIRED_UNITS+=("dio-hdf5") + # Compute + REQUIRED_UNITS+=("luci-compute") + # Circle compiler library (.circle -> .circle) + REQUIRED_UNITS+=("luci") + # Python interface for circle schema + REQUIRED_UNITS+=("pics") + # Tools + REQUIRED_UNITS+=("tflite2circle" "circle2circle" "tflchef") + REQUIRED_UNITS+=("circle-tensordump" "circledump") + REQUIRED_UNITS+=("tf2tfliteV2" "luci-interpreter") + REQUIRED_UNITS+=("luci-eval-driver") + REQUIRED_UNITS+=("record-minmax" "circle-quantizer" "rawdata2hdf5" "circle-mpqsolver") + REQUIRED_UNITS+=("circle-eval-diff" "circle-interpreter") + REQUIRED_UNITS+=("circle-partitioner" "circle-operator") + REQUIRED_UNITS+=("one-cmds") + REQUIRED_UNITS+=("bcq-tools") + REQUIRED_UNITS+=("dalgona") + REQUIRED_UNITS+=("visq") + REQUIRED_UNITS+=("circle-opselector") + + # Dependent modules needed for build + REQUIRED_UNITS+=("circlechef") + REQUIRED_UNITS+=("circle-verify") + + NPROC=${NPROC:-$(cat /proc/cpuinfo | grep -c processor)} + + # TODO Use "nncc configure" and "nncc build" + cmake \ + -DCMAKE_INSTALL_PREFIX="${NNCC_INSTALL_PREFIX}" \ + -DCMAKE_BUILD_TYPE=release \ + -DBUILD_WHITELIST=$(join_by ";" "${REQUIRED_UNITS[@]}") \ + -DEXTERNALS_BUILD_THREADS=$((NPROC/2)) \ + ${EXTRA_OPTIONS[@]} \ + "${NNAS_PROJECT_PATH}/infra/nncc" +} + +function preset_install() +{ + # Install tf2nnpkg + install -T -m 755 -D "${SCRIPT_PATH}/res/tf2nnpkg.${PRESET}" "${NNAS_INSTALL_PREFIX}/bin/tf2nnpkg" +} diff --git a/infra/packaging/preset/20230413_windows b/infra/packaging/preset/20230413_windows new file mode 100644 index 000000000..8015de86d --- /dev/null +++ b/infra/packaging/preset/20230413_windows @@ -0,0 +1,80 @@ +#!/bin/bash + +PRESET="20230413" + +function preset_configure() +{ + REQUIRED_UNITS=() + # Common Libraries + REQUIRED_UNITS+=("angkor" "cwrap" "pepper-str" "pepper-strcast" "pp") + REQUIRED_UNITS+=("oops" "pepper-assert" "pepper-csv2vec" "foder" "crew") + REQUIRED_UNITS+=("souschef") + REQUIRED_UNITS+=("safemain") + REQUIRED_UNITS+=("arser") + REQUIRED_UNITS+=("vconone") + # Hermes Logging Framework + REQUIRED_UNITS+=("hermes" "hermes-std") + # loco IR and related utilities + REQUIRED_UNITS+=("loco" "locop" "locomotiv" "logo-core" "logo") + # Flatbuffer I/O + REQUIRED_UNITS+=("mio-tflite280" "mio-circle05" "mio-tflite2121" "mio-circle06") + # Data I/O + REQUIRED_UNITS+=("dio-hdf5") + # Compute + REQUIRED_UNITS+=("luci-compute") + # Circle compiler library (.circle -> .circle) + REQUIRED_UNITS+=("luci") + # Python interface for circle schema + REQUIRED_UNITS+=("pics") + # Tools + REQUIRED_UNITS+=("tflite2circle" "circle2circle" "tflchef") + REQUIRED_UNITS+=("circle-tensordump" "circledump") + REQUIRED_UNITS+=("tf2tfliteV2" "luci-interpreter") + REQUIRED_UNITS+=("luci-eval-driver") + REQUIRED_UNITS+=("record-minmax" "circle-quantizer" "rawdata2hdf5" "circle-mpqsolver") + REQUIRED_UNITS+=("circle-eval-diff" "circle-interpreter") + REQUIRED_UNITS+=("circle-partitioner" "circle-operator") + REQUIRED_UNITS+=("one-cmds") + REQUIRED_UNITS+=("bcq-tools") + REQUIRED_UNITS+=("dalgona") + REQUIRED_UNITS+=("visq") + + # Dependent modules needed for build + REQUIRED_UNITS+=("circlechef") + REQUIRED_UNITS+=("circle-verify") + + NPROC=$(cat /proc/cpuinfo | grep -c processor) + + # TODO Use "nncc configure" and "nncc build" + cmake \ + -G "MSYS Makefiles" \ + -DUSE_PROTOBUF_LEGACY_IMPORT=ON \ + -DCMAKE_EXE_LINKER_FLAGS="-Wl,--allow-multiple-definition" \ + -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--allow-multiple-definition" \ + -DENABLE_TEST=OFF \ + -DDOWNLOAD_GTEST=OFF \ + -DBUILD_GTEST=OFF \ + -DCMAKE_C_COMPILER=gcc \ + -DCMAKE_CXX_COMPILER=g++ \ + -DCMAKE_INSTALL_PREFIX="${NNCC_INSTALL_PREFIX}" \ + -DCMAKE_BUILD_TYPE=release \ + -DBUILD_WHITELIST=$(join_by ";" "${REQUIRED_UNITS[@]}") \ + -DEXTERNALS_BUILD_THREADS=$((NPROC/2)) \ + ${EXTRA_OPTIONS[@]} \ + "${NNAS_PROJECT_PATH}/infra/nncc" +} + +function preset_install() +{ + # Install libraries to bin/ for Windows release + mv ${NNCC_INSTALL_PREFIX}/lib/*.dll ${NNCC_INSTALL_PREFIX}/bin + rm -rf ${NNCC_INSTALL_PREFIX}/lib + + # Install tf2nnpkg + install -T -m 755 -D "${SCRIPT_PATH}/res/tf2nnpkg.${PRESET}" "${NNAS_INSTALL_PREFIX}/bin/tf2nnpkg" + + # Though you have to install tensorflow to run 'tf2tfliteV2', + # tensorflow can't be installed in mingw. First, You can install tensorflow + # from Window native CMD(run as administrator) with python virtual environment. + # And, you must copy it to "${NNAS_INSTALL_PREFIX}/bin/venv" +} diff --git a/infra/packaging/preset/20230907 b/infra/packaging/preset/20230907 new file mode 100644 index 000000000..44bc4e00f --- /dev/null +++ b/infra/packaging/preset/20230907 @@ -0,0 +1,66 @@ +#!/bin/bash + +# NOTE purpose of this file is static analysis only +# new official preset will be added when new programs are ready + +PRESET="20230907" + +function preset_configure() +{ + REQUIRED_UNITS=() + # Common Libraries + REQUIRED_UNITS+=("angkor" "cwrap" "pepper-str" "pepper-strcast" "pp") + REQUIRED_UNITS+=("oops" "pepper-assert" "pepper-csv2vec" "foder" "crew") + REQUIRED_UNITS+=("souschef") + REQUIRED_UNITS+=("safemain") + REQUIRED_UNITS+=("arser") + REQUIRED_UNITS+=("vconone") + # Hermes Logging Framework + REQUIRED_UNITS+=("hermes" "hermes-std") + # loco IR and related utilities + REQUIRED_UNITS+=("loco" "locop" "locomotiv" "logo-core" "logo") + # Flatbuffer I/O + REQUIRED_UNITS+=("mio-tflite2121" "mio-circle06") + # Data I/O + REQUIRED_UNITS+=("dio-hdf5") + # Compute + REQUIRED_UNITS+=("luci-compute") + # Circle compiler library (.circle -> .circle) + REQUIRED_UNITS+=("luci") + # Python interface for circle schema + REQUIRED_UNITS+=("pics") + # Tools + REQUIRED_UNITS+=("tflite2circle" "circle2circle" "tflchef") + REQUIRED_UNITS+=("circle-tensordump" "circledump") + REQUIRED_UNITS+=("tf2tfliteV2" "luci-interpreter") + REQUIRED_UNITS+=("luci-eval-driver") + REQUIRED_UNITS+=("record-minmax" "circle-quantizer" "rawdata2hdf5" "circle-mpqsolver") + REQUIRED_UNITS+=("circle-eval-diff" "circle-interpreter") + REQUIRED_UNITS+=("circle-partitioner" "circle-operator") + REQUIRED_UNITS+=("one-cmds") + REQUIRED_UNITS+=("bcq-tools") + REQUIRED_UNITS+=("dalgona") + REQUIRED_UNITS+=("visq") + REQUIRED_UNITS+=("circle-opselector") + + # Dependent modules needed for build + REQUIRED_UNITS+=("circlechef") + REQUIRED_UNITS+=("circle-verify") + + NPROC=${NPROC:-$(cat /proc/cpuinfo | grep -c processor)} + + # TODO Use "nncc configure" and "nncc build" + cmake \ + -DCMAKE_INSTALL_PREFIX="${NNCC_INSTALL_PREFIX}" \ + -DCMAKE_BUILD_TYPE=release \ + -DBUILD_WHITELIST=$(join_by ";" "${REQUIRED_UNITS[@]}") \ + -DEXTERNALS_BUILD_THREADS=$((NPROC/2)) \ + ${EXTRA_OPTIONS[@]} \ + "${NNAS_PROJECT_PATH}/infra/nncc" +} + +function preset_install() +{ + # Install tf2nnpkg + install -T -m 755 -D "${SCRIPT_PATH}/res/tf2nnpkg.${PRESET}" "${NNAS_INSTALL_PREFIX}/bin/tf2nnpkg" +} diff --git a/infra/packaging/preset/20230907_windows b/infra/packaging/preset/20230907_windows new file mode 100644 index 000000000..5dcb36ab0 --- /dev/null +++ b/infra/packaging/preset/20230907_windows @@ -0,0 +1,80 @@ +#!/bin/bash + +PRESET="20230907" + +function preset_configure() +{ + REQUIRED_UNITS=() + # Common Libraries + REQUIRED_UNITS+=("angkor" "cwrap" "pepper-str" "pepper-strcast" "pp") + REQUIRED_UNITS+=("oops" "pepper-assert" "pepper-csv2vec" "foder" "crew") + REQUIRED_UNITS+=("souschef") + REQUIRED_UNITS+=("safemain") + REQUIRED_UNITS+=("arser") + REQUIRED_UNITS+=("vconone") + # Hermes Logging Framework + REQUIRED_UNITS+=("hermes" "hermes-std") + # loco IR and related utilities + REQUIRED_UNITS+=("loco" "locop" "locomotiv" "logo-core" "logo") + # Flatbuffer I/O + REQUIRED_UNITS+=("mio-tflite2121" "mio-circle06") + # Data I/O + REQUIRED_UNITS+=("dio-hdf5") + # Compute + REQUIRED_UNITS+=("luci-compute") + # Circle compiler library (.circle -> .circle) + REQUIRED_UNITS+=("luci") + # Python interface for circle schema + REQUIRED_UNITS+=("pics") + # Tools + REQUIRED_UNITS+=("tflite2circle" "circle2circle" "tflchef") + REQUIRED_UNITS+=("circle-tensordump" "circledump") + REQUIRED_UNITS+=("tf2tfliteV2" "luci-interpreter") + REQUIRED_UNITS+=("luci-eval-driver") + REQUIRED_UNITS+=("record-minmax" "circle-quantizer" "rawdata2hdf5" "circle-mpqsolver") + REQUIRED_UNITS+=("circle-eval-diff" "circle-interpreter") + REQUIRED_UNITS+=("circle-partitioner" "circle-operator") + REQUIRED_UNITS+=("one-cmds") + REQUIRED_UNITS+=("bcq-tools") + REQUIRED_UNITS+=("dalgona") + REQUIRED_UNITS+=("visq") + + # Dependent modules needed for build + REQUIRED_UNITS+=("circlechef") + REQUIRED_UNITS+=("circle-verify") + + NPROC=$(cat /proc/cpuinfo | grep -c processor) + + # TODO Use "nncc configure" and "nncc build" + cmake \ + -G "MSYS Makefiles" \ + -DUSE_PROTOBUF_LEGACY_IMPORT=ON \ + -DCMAKE_EXE_LINKER_FLAGS="-Wl,--allow-multiple-definition" \ + -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--allow-multiple-definition" \ + -DENABLE_TEST=OFF \ + -DDOWNLOAD_GTEST=OFF \ + -DBUILD_GTEST=OFF \ + -DCMAKE_C_COMPILER=gcc \ + -DCMAKE_CXX_COMPILER=g++ \ + -DCMAKE_INSTALL_PREFIX="${NNCC_INSTALL_PREFIX}" \ + -DCMAKE_BUILD_TYPE=release \ + -DBUILD_WHITELIST=$(join_by ";" "${REQUIRED_UNITS[@]}") \ + -DEXTERNALS_BUILD_THREADS=$((NPROC/2)) \ + ${EXTRA_OPTIONS[@]} \ + "${NNAS_PROJECT_PATH}/infra/nncc" +} + +function preset_install() +{ + # Install libraries to bin/ for Windows release + mv ${NNCC_INSTALL_PREFIX}/lib/*.dll ${NNCC_INSTALL_PREFIX}/bin + rm -rf ${NNCC_INSTALL_PREFIX}/lib + + # Install tf2nnpkg + install -T -m 755 -D "${SCRIPT_PATH}/res/tf2nnpkg.${PRESET}" "${NNAS_INSTALL_PREFIX}/bin/tf2nnpkg" + + # Though you have to install tensorflow to run 'tf2tfliteV2', + # tensorflow can't be installed in mingw. First, You can install tensorflow + # from Window native CMD(run as administrator) with python virtual environment. + # And, you must copy it to "${NNAS_INSTALL_PREFIX}/bin/venv" +} diff --git a/infra/packaging/res/tf2nnpkg.20230413 b/infra/packaging/res/tf2nnpkg.20230413 new file mode 100644 index 000000000..a7446e6fe --- /dev/null +++ b/infra/packaging/res/tf2nnpkg.20230413 @@ -0,0 +1,109 @@ +#!/bin/bash + +set -e + +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" + +command_exists() { + if [ "$#" -le 0 ]; then + return 1 + fi + command -v "$@" > /dev/null 2>&1 +} + +usage() +{ + echo "Convert TensorFlow model to nnpackage." + echo "Usage: tf2nnpkg" + echo " --info <path/to/info>" + echo " --graphdef <path/to/pb>" + echo " -o <path/to/nnpkg/directory>" + echo " --v2 (optional) Use TF 2.x interface" + exit 255 +} + +TF_INTERFACE="--v1" + +# Parse command-line arguments +# +while [ "$#" -ne 0 ]; do + CUR="$1" + + case $CUR in + '--help') + usage + ;; + '--info') + export INFO_FILE="$2" + shift 2 + ;; + '--graphdef') + export GRAPHDEF_FILE="$2" + shift 2 + ;; + '-o') + export OUTPUT_DIR="$2" + shift 2 + ;; + '--v2') + TF_INTERFACE="--v2" + shift + ;; + *) + echo "${CUR}" + shift + ;; + esac +done + +if [ -z ${GRAPHDEF_FILE} ] || [ ! -e ${GRAPHDEF_FILE} ]; then + echo "pb is not found. Please check --graphdef is correct." + exit 2 +fi + +if [ -z ${INFO_FILE} ] || [ ! -e ${INFO_FILE} ]; then + echo "info is not found. Please check --info is correct." + exit 2 +fi + +if [ -z ${OUTPUT_DIR} ]; then + echo "output directory is not specifed. Please check -o is correct.." + exit 2 +fi + +FILE_BASE=$(basename ${GRAPHDEF_FILE}) +MODEL_NAME="${FILE_BASE%.*}" +TMPDIR=$(mktemp -d) +trap "{ rm -rf $TMPDIR; }" EXIT + +# activate python virtual environment +VIRTUALENV_LINUX="${ROOT}/bin/venv/bin/activate" +VIRTUALENV_WINDOWS="${ROOT}/bin/venv/Scripts/activate" + +if [ -e ${VIRTUALENV_LINUX} ]; then + source ${VIRTUALENV_LINUX} +elif [ -e ${VIRTUALENV_WINDOWS} ]; then + source ${VIRTUALENV_WINDOWS} +fi + +# parse inputs, outputs from info file +INPUT=$(awk -F, '/^input/ { print $2 }' ${INFO_FILE} | cut -d: -f1 | tr -d ' ' | paste -d, -s) +OUTPUT=$(awk -F, '/^output/ { print $2 }' ${INFO_FILE} | cut -d: -f1 | tr -d ' ' | paste -d, -s) + +INPUT_SHAPES=$(grep ^input ${INFO_FILE} | cut -d "[" -f2 | cut -d "]" -f1 | tr -d ' ' | xargs | tr ' ' ':') + +ONE_IMPORT_BCQ_SCRIPT="${ROOT}/bin/one-import-bcq ${TF_INTERFACE} " +ONE_IMPORT_BCQ_SCRIPT+="-i ${GRAPHDEF_FILE} " +ONE_IMPORT_BCQ_SCRIPT+="-o ${TMPDIR}/${MODEL_NAME}.tmp.circle " +ONE_IMPORT_BCQ_SCRIPT+="-I ${INPUT} " +ONE_IMPORT_BCQ_SCRIPT+="-O ${OUTPUT} " +if [ ! -z ${INPUT_SHAPES} ]; then + ONE_IMPORT_BCQ_SCRIPT+="-s ${INPUT_SHAPES} " +fi + +${ONE_IMPORT_BCQ_SCRIPT} + +# optimize +"${ROOT}/bin/circle2circle" --resolve_customop_add "${TMPDIR}/${MODEL_NAME}.tmp.circle" "${TMPDIR}/${MODEL_NAME}.circle" + +"${ROOT}/bin/model2nnpkg" -o "${OUTPUT_DIR}" -m "${TMPDIR}/${MODEL_NAME}.circle" diff --git a/infra/packaging/res/tf2nnpkg.20230907 b/infra/packaging/res/tf2nnpkg.20230907 new file mode 100644 index 000000000..a7446e6fe --- /dev/null +++ b/infra/packaging/res/tf2nnpkg.20230907 @@ -0,0 +1,109 @@ +#!/bin/bash + +set -e + +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" + +command_exists() { + if [ "$#" -le 0 ]; then + return 1 + fi + command -v "$@" > /dev/null 2>&1 +} + +usage() +{ + echo "Convert TensorFlow model to nnpackage." + echo "Usage: tf2nnpkg" + echo " --info <path/to/info>" + echo " --graphdef <path/to/pb>" + echo " -o <path/to/nnpkg/directory>" + echo " --v2 (optional) Use TF 2.x interface" + exit 255 +} + +TF_INTERFACE="--v1" + +# Parse command-line arguments +# +while [ "$#" -ne 0 ]; do + CUR="$1" + + case $CUR in + '--help') + usage + ;; + '--info') + export INFO_FILE="$2" + shift 2 + ;; + '--graphdef') + export GRAPHDEF_FILE="$2" + shift 2 + ;; + '-o') + export OUTPUT_DIR="$2" + shift 2 + ;; + '--v2') + TF_INTERFACE="--v2" + shift + ;; + *) + echo "${CUR}" + shift + ;; + esac +done + +if [ -z ${GRAPHDEF_FILE} ] || [ ! -e ${GRAPHDEF_FILE} ]; then + echo "pb is not found. Please check --graphdef is correct." + exit 2 +fi + +if [ -z ${INFO_FILE} ] || [ ! -e ${INFO_FILE} ]; then + echo "info is not found. Please check --info is correct." + exit 2 +fi + +if [ -z ${OUTPUT_DIR} ]; then + echo "output directory is not specifed. Please check -o is correct.." + exit 2 +fi + +FILE_BASE=$(basename ${GRAPHDEF_FILE}) +MODEL_NAME="${FILE_BASE%.*}" +TMPDIR=$(mktemp -d) +trap "{ rm -rf $TMPDIR; }" EXIT + +# activate python virtual environment +VIRTUALENV_LINUX="${ROOT}/bin/venv/bin/activate" +VIRTUALENV_WINDOWS="${ROOT}/bin/venv/Scripts/activate" + +if [ -e ${VIRTUALENV_LINUX} ]; then + source ${VIRTUALENV_LINUX} +elif [ -e ${VIRTUALENV_WINDOWS} ]; then + source ${VIRTUALENV_WINDOWS} +fi + +# parse inputs, outputs from info file +INPUT=$(awk -F, '/^input/ { print $2 }' ${INFO_FILE} | cut -d: -f1 | tr -d ' ' | paste -d, -s) +OUTPUT=$(awk -F, '/^output/ { print $2 }' ${INFO_FILE} | cut -d: -f1 | tr -d ' ' | paste -d, -s) + +INPUT_SHAPES=$(grep ^input ${INFO_FILE} | cut -d "[" -f2 | cut -d "]" -f1 | tr -d ' ' | xargs | tr ' ' ':') + +ONE_IMPORT_BCQ_SCRIPT="${ROOT}/bin/one-import-bcq ${TF_INTERFACE} " +ONE_IMPORT_BCQ_SCRIPT+="-i ${GRAPHDEF_FILE} " +ONE_IMPORT_BCQ_SCRIPT+="-o ${TMPDIR}/${MODEL_NAME}.tmp.circle " +ONE_IMPORT_BCQ_SCRIPT+="-I ${INPUT} " +ONE_IMPORT_BCQ_SCRIPT+="-O ${OUTPUT} " +if [ ! -z ${INPUT_SHAPES} ]; then + ONE_IMPORT_BCQ_SCRIPT+="-s ${INPUT_SHAPES} " +fi + +${ONE_IMPORT_BCQ_SCRIPT} + +# optimize +"${ROOT}/bin/circle2circle" --resolve_customop_add "${TMPDIR}/${MODEL_NAME}.tmp.circle" "${TMPDIR}/${MODEL_NAME}.circle" + +"${ROOT}/bin/model2nnpkg" -o "${OUTPUT_DIR}" -m "${TMPDIR}/${MODEL_NAME}.circle" diff --git a/infra/scripts/compiler_modules.sh b/infra/scripts/compiler_modules.sh index 55e48f489..8b361a7ea 100644 --- a/infra/scripts/compiler_modules.sh +++ b/infra/scripts/compiler_modules.sh @@ -11,7 +11,7 @@ DEBUG_BUILD_ITEMS+=";oops;pepper-assert;pepper-csv2vec" DEBUG_BUILD_ITEMS+=";hermes;hermes-std" DEBUG_BUILD_ITEMS+=";loco;locop;locomotiv;logo-core;logo" DEBUG_BUILD_ITEMS+=";foder;crew;souschef;arser;vconone" -DEBUG_BUILD_ITEMS+=";safemain;mio-circle04;mio-tflite280;dio-hdf5" +DEBUG_BUILD_ITEMS+=";safemain;mio-circle05;mio-tflite280;mio-circle06;mio-tflite2121;dio-hdf5" DEBUG_BUILD_ITEMS+=";luci-compute" DEBUG_BUILD_ITEMS+=";tflite2circle" DEBUG_BUILD_ITEMS+=";luci" @@ -35,3 +35,4 @@ DEBUG_BUILD_ITEMS+=";circle-operator-test" DEBUG_BUILD_ITEMS+=";circle-interpreter;circle-interpreter-test" DEBUG_BUILD_ITEMS+=";dalgona;dalgona-test" DEBUG_BUILD_ITEMS+=";visq" +DEBUG_BUILD_ITEMS+=";circle-mpqsolver" diff --git a/infra/scripts/docker_build_nncc.sh b/infra/scripts/docker_build_nncc.sh index 2e603b550..dd9d0bd9b 100755 --- a/infra/scripts/docker_build_nncc.sh +++ b/infra/scripts/docker_build_nncc.sh @@ -67,7 +67,7 @@ tar -zcf ${ARCHIVE_PATH}/nncc-test-package.tar.gz -C ${NNCC_INSTALL_PREFIX} ./te if [ -z ${RELEASE_VERSION} ] || [ ${RELEASE_VERSION} == "nightly" ]; then ./nncc docker-run /bin/bash -c \ - 'dch -v $($(pwd)/tools/release_tool/onert_version.sh)~$(date "+%y%m%d%H") "nightly release" -D $(lsb_release --short --codename)' + 'dch -v $(${PWD}/${NNCC_INSTALL_PREFIX}/bin/one-version)~$(date "+%y%m%d%H") "nightly release" -D $(lsb_release --short --codename)' ./nncc docker-run dch -r '' fi diff --git a/infra/scripts/docker_collect_nnpkg_resources.sh b/infra/scripts/docker_collect_nnpkg_resources.sh index 9fb7def56..8a73dd380 100755 --- a/infra/scripts/docker_collect_nnpkg_resources.sh +++ b/infra/scripts/docker_collect_nnpkg_resources.sh @@ -73,7 +73,7 @@ REQUIRED_UNITS+=("luci-compute") # Circle compiler library (.circle -> .circle) REQUIRED_UNITS+=("luci") # Flatbuffer I/O -REQUIRED_UNITS+=("mio-tflite280" "mio-circle04") +REQUIRED_UNITS+=("mio-tflite280" "mio-circle05" "mio-tflite2121" "mio-circle06") # Tools REQUIRED_UNITS+=("tflite2circle" "circle2circle" "luci-interpreter") REQUIRED_UNITS+=("souschef" "tflchef" "circlechef" "circle-verify") |