[npud] Move npud code to the contrib folder (#13489) accepted/tizen/unified/20240905.164059 accepted/tizen/unified/dev/20240910.111457 accepted/tizen/unified/x/20240906.021704
authorJiyoung Giuliana Yun <jy910.yun@samsung.com>
Mon, 29 Jul 2024 02:06:34 +0000 (11:06 +0900)
committerHyeongseok Oh <hseok82.oh@samsung.com>
Tue, 3 Sep 2024 07:32:16 +0000 (16:32 +0900)
This commit moves npud code into contrib folder and removes the npud
related configurations.
If someone is interested in NPUD details, Please refer to #9258 issue.
  - https://github.com/Samsung/ONE/issues/9258

ONE-DCO-1.0-Signed-off-by: Jiyoung Yun <jy910.yun@samsung.com>

45 files changed:
.ahub/tcchecker-tca/config.yaml
infra/nnfw/cmake/CfgOptionFlags.cmake
infra/nnfw/cmake/options/options_aarch64-tizen.cmake
infra/nnfw/cmake/options/options_armv7hl-tizen.cmake
infra/nnfw/cmake/options/options_armv7l-tizen.cmake
infra/nnfw/cmake/options/options_i686-tizen.cmake
infra/nnfw/cmake/options/options_riscv64-tizen.cmake
infra/nnfw/cmake/options/options_x86_64-tizen.cmake
infra/scripts/test_ubuntu_npud.sh
packaging/nnfw.spec
runtime/contrib/npud/CMakeLists.txt [moved from runtime/service/npud/CMakeLists.txt with 100% similarity]
runtime/contrib/npud/backend/CMakeLists.txt [moved from runtime/service/npud/backend/CMakeLists.txt with 100% similarity]
runtime/contrib/npud/backend/trix/CMakeLists.txt [moved from runtime/service/npud/backend/trix/CMakeLists.txt with 100% similarity]
runtime/contrib/npud/backend/trix/TrixBackend.cc [moved from runtime/service/npud/backend/trix/TrixBackend.cc with 100% similarity]
runtime/contrib/npud/backend/trix/TrixBackend.h [moved from runtime/service/npud/backend/trix/TrixBackend.h with 100% similarity]
runtime/contrib/npud/core/Backend.h [moved from runtime/service/npud/core/Backend.h with 100% similarity]
runtime/contrib/npud/core/CMakeLists.txt [moved from runtime/service/npud/core/CMakeLists.txt with 100% similarity]
runtime/contrib/npud/core/ContextManager.cc [moved from runtime/service/npud/core/ContextManager.cc with 100% similarity]
runtime/contrib/npud/core/ContextManager.h [moved from runtime/service/npud/core/ContextManager.h with 100% similarity]
runtime/contrib/npud/core/Core.cc [moved from runtime/service/npud/core/Core.cc with 100% similarity]
runtime/contrib/npud/core/Core.h [moved from runtime/service/npud/core/Core.h with 100% similarity]
runtime/contrib/npud/core/DBus.cc [moved from runtime/service/npud/core/DBus.cc with 100% similarity]
runtime/contrib/npud/core/DBus.h [moved from runtime/service/npud/core/DBus.h with 100% similarity]
runtime/contrib/npud/core/DevManager.cc [moved from runtime/service/npud/core/DevManager.cc with 100% similarity]
runtime/contrib/npud/core/DevManager.h [moved from runtime/service/npud/core/DevManager.h with 100% similarity]
runtime/contrib/npud/core/DynamicLoader.cc [moved from runtime/service/npud/core/DynamicLoader.cc with 100% similarity]
runtime/contrib/npud/core/DynamicLoader.h [moved from runtime/service/npud/core/DynamicLoader.h with 100% similarity]
runtime/contrib/npud/core/Server.cc [moved from runtime/service/npud/core/Server.cc with 100% similarity]
runtime/contrib/npud/core/Server.h [moved from runtime/service/npud/core/Server.h with 100% similarity]
runtime/contrib/npud/core/Signal.cc [moved from runtime/service/npud/core/Signal.cc with 100% similarity]
runtime/contrib/npud/core/Signal.h [moved from runtime/service/npud/core/Signal.h with 100% similarity]
runtime/contrib/npud/core/ir/DataType.h [moved from runtime/service/npud/core/ir/DataType.h with 100% similarity]
runtime/contrib/npud/core/ir/Layout.h [moved from runtime/service/npud/core/ir/Layout.h with 100% similarity]
runtime/contrib/npud/core/main.cc [moved from runtime/service/npud/core/main.cc with 100% similarity]
runtime/contrib/npud/core/util/Config.lst [moved from runtime/service/npud/core/util/Config.lst with 100% similarity]
runtime/contrib/npud/core/util/ConfigSource.cc [moved from runtime/service/npud/core/util/ConfigSource.cc with 100% similarity]
runtime/contrib/npud/core/util/ConfigSource.h [moved from runtime/service/npud/core/util/ConfigSource.h with 100% similarity]
runtime/contrib/npud/core/util/Logging.h [moved from runtime/service/npud/core/util/Logging.h with 100% similarity]
runtime/contrib/npud/org.tizen.npud.conf [moved from runtime/service/npud/org.tizen.npud.conf with 100% similarity]
runtime/contrib/npud/org.tizen.npud.xml [moved from runtime/service/npud/org.tizen.npud.xml with 100% similarity]
runtime/contrib/npud/tests/CMakeLists.txt [moved from runtime/service/npud/tests/CMakeLists.txt with 100% similarity]
runtime/contrib/npud/tests/core/DBus.test.cc [moved from runtime/service/npud/tests/core/DBus.test.cc with 100% similarity]
runtime/contrib/npud/tests/core/Server.test.cc [moved from runtime/service/npud/tests/core/Server.test.cc with 100% similarity]
runtime/contrib/npud/tests/core/Signal.test.cc [moved from runtime/service/npud/tests/core/Signal.test.cc with 100% similarity]
runtime/service/CMakeLists.txt [deleted file]

index ecae5f5..2ab8a98 100644 (file)
@@ -8,7 +8,6 @@ test:
       - /runtime/libs/misc
       - /runtime/libs/ndarray
       - /runtime/onert
-      - /runtime/service/npud/tests
       - /tests/nnfw_api
 
     testFile:
index 041817d..ae0e8d4 100644 (file)
@@ -29,8 +29,6 @@ option(BUILD_WITH_HDF5 "Build test tool with HDF5 library" ON)
 option(GENERATE_RUNTIME_NNAPI_TESTS "Generate NNAPI operation gtest" ON)
 option(ENVVAR_ONERT_CONFIG "Use environment variable for onert configuration" ON)
 option(INSTALL_TEST_SCRIPTS "Install test scripts" ON)
-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" OFF)
 #
 # Default build configuration for contrib
@@ -47,6 +45,8 @@ option(BUILD_UBEN "Build micro-benchmark (uben) suite" OFF)
 option(BUILD_MLAPSE "Build mlapse benchmark toolkit" OFF)
 option(BUILD_GPU_CL "Build gpu_cl backend" OFF)
 option(BUILD_TENSORFLOW_LITE_GPU "Build TensorFlow Lite GPU delegate from the downloaded source" OFF)
+option(BUILD_NPUD "Build NPU daemon" OFF)
+option(ENVVAR_NPUD_CONFIG "Use environment variable for npud configuration" OFF)
 #
 # Default build configuration for tools
 #
index 685f9ed..07f77e3 100644 (file)
@@ -11,8 +11,5 @@ option(BUILD_LOGGING "Build logging runtime" OFF)
 option(GENERATE_RUNTIME_NNAPI_TESTS "Generate NNAPI operation gtest" OFF)
 option(ENVVAR_ONERT_CONFIG "Use environment variable for onert configuration" OFF)
 
-option(BUILD_NPUD "Build NPU daemon" OFF)
-# Do not allow to use CONFIG option on Tizen
-option(ENVVAR_NPUD_CONFIG "Use environment variable for npud configuration" OFF)
 # Tizen boost package does not have static library
 option(Boost_USE_STATIC_LIBS "Determine whether or not static linking for Boost" OFF)
index f77a34d..d7a8c67 100644 (file)
@@ -11,8 +11,5 @@ option(BUILD_LOGGING "Build logging runtime" OFF)
 option(GENERATE_RUNTIME_NNAPI_TESTS "Generate NNAPI operation gtest" OFF)
 option(ENVVAR_ONERT_CONFIG "Use environment variable for onert configuration" OFF)
 
-option(BUILD_NPUD "Build NPU daemon" OFF)
-# Do not allow to use CONFIG option on Tizen
-option(ENVVAR_NPUD_CONFIG "Use environment variable for npud configuration" OFF)
 # Tizen boost package does not have static library
 option(Boost_USE_STATIC_LIBS "Determine whether or not static linking for Boost" OFF)
index fa8aff8..cfbeac1 100644 (file)
@@ -11,8 +11,5 @@ option(BUILD_LOGGING "Build logging runtime" OFF)
 option(GENERATE_RUNTIME_NNAPI_TESTS "Generate NNAPI operation gtest" OFF)
 option(ENVVAR_ONERT_CONFIG "Use environment variable for onert configuration" OFF)
 
-option(BUILD_NPUD "Build NPU daemon" OFF)
-# Do not allow to use CONFIG option on Tizen
-option(ENVVAR_NPUD_CONFIG "Use environment variable for npud configuration" OFF)
 # Tizen boost package does not have static library
 option(Boost_USE_STATIC_LIBS "Determine whether or not static linking for Boost" OFF)
index a86985f..14a3d55 100644 (file)
@@ -11,7 +11,3 @@ 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_NPUD "Build NPU daemon" OFF)
-# Do not allow to use CONFIG option on Tizen
-option(ENVVAR_NPUD_CONFIG "Use environment variable for npud configuration" OFF)
index 6b34c2b..add399c 100644 (file)
@@ -12,8 +12,5 @@ option(ENVVAR_ONERT_CONFIG "Use environment variable for onert configuration" OF
 
 option(BUILD_XNNPACK "Build XNNPACK" OFF)
 
-option(BUILD_NPUD "Build NPU daemon" OFF)
-# Do not allow to use CONFIG option on Tizen
-option(ENVVAR_NPUD_CONFIG "Use environment variable for npud configuration" OFF)
 # Tizen boost package does not have static library
 option(Boost_USE_STATIC_LIBS "Determine whether or not static linking for Boost" OFF)
index 18c34f2..12c8c53 100644 (file)
@@ -12,8 +12,5 @@ option(ENVVAR_ONERT_CONFIG "Use environment variable for onert configuration" OF
 
 option(BUILD_XNNPACK "Build XNNPACK" OFF)
 
-option(BUILD_NPUD "Build NPU daemon" OFF)
-# Do not allow to use CONFIG option on Tizen
-option(ENVVAR_NPUD_CONFIG "Use environment variable for npud configuration" OFF)
 # Tizen boost package does not have static library
 option(Boost_USE_STATIC_LIBS "Determine whether or not static linking for Boost" OFF)
index 3b33042..0201dc9 100755 (executable)
@@ -1,59 +1,5 @@
 #!/bin/bash
 
-set -eo pipefail
-
-CURRENT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-ROOT_PATH="$(cd ${CURRENT_PATH}/../../ && pwd)"
-
-# Install path on CI
-INSTALL_PATH="$ROOT_PATH/Product/out"
-MODEL_PATH="${INSTALL_PATH}/npud-gtest/models"
-
-# Install dbus configuration file
-DBUS_CONF="${INSTALL_PATH}/share/org.tizen.npud.conf"
-mkdir -p /usr/share/dbus-1/system.d/
-cp ${DBUS_CONF} /usr/share/dbus-1/system.d/
-
-service dbus restart
-
-function TestPrepared()
-{
-  if [[ -z "${MODELFILE}" ]]; then
-    echo "Model file is not set. Try to use default setting."
-    exit 1
-  fi
-
-  mkdir -p ${MODEL_PATH}
-  if [[ "${MODELFILE: -7}" == ".tar.gz" ]]; then
-    curl -o model.tar.gz -kLsSO ${MODELFILE}
-    tar -zxf model.tar.gz -C ${MODEL_PATH}
-  else
-    echo "The file format is not supported."
-    echo "Supported format: tar.gz"
-    exit 1
-  fi
-}
-
-function TestCleanUp()
-{
-  rm -rf ${MODEL_PATH}
-}
-
-function NpudTest()
-{
-  pushd ${ROOT_PATH} > /dev/null
-
-  $INSTALL_PATH/npud-gtest/npud_gtest
-  EXITCODE=$?
-  if [ ${EXITCODE} -ne 0 ]; then
-    exit ${EXITCODE}
-  fi
-
-  popd > /dev/null
-}
-
-TestPrepared
-
-DEVICE_MODULE_PATH=${INSTALL_PATH}/lib GTEST_MODEL_PATH=${MODEL_PATH} NpudTest
-
-TestCleanUp
+# DO NOTHING
+# THIS FILE WILL BE REMOVED AFTER JENKINS SCRIPT IS UPDATED.
+exit 0
index c25bdbe..3dc113b 100644 (file)
@@ -28,7 +28,6 @@ Source3015: TENSORFLOW-2.16.1.tar.gz
 Source3016: XNNPACK.tar.gz
 
 %{!?build_type:     %define build_type      Release}
-%{!?npud_build:     %define npud_build      0}
 %{!?trix_support:   %define trix_support    1}
 %{!?odc_build:      %define odc_build       1}
 %{!?coverage_build: %define coverage_build  0}
@@ -45,12 +44,6 @@ Source3016: XNNPACK.tar.gz
 %define test_build 1
 %endif
 
-%ifarch riscv64
-# Disable npud on risc-v
-# TODO Enable on risc-v
-%define npud_build 0
-%endif
-
 BuildRequires:  cmake
 
 Requires(post): /sbin/ldconfig
@@ -66,10 +59,6 @@ BuildRequires:  pkgconfig(libjpeg)
 BuildRequires:  gtest-devel
 %endif
 
-%if %{npud_build} == 1
-BuildRequires:  pkgconfig(glib-2.0)
-%endif
-
 %if %{trix_support} == 1
 BuildRequires:  pkgconfig(npu-engine)
 %endif
@@ -116,14 +105,6 @@ If you want to get coverage info, you should install runtime package which is bu
 # TODO Use release runtime pacakge for test
 %endif
 
-%if %{npud_build} == 1
-%package npud
-Summary: NPU daemon
-
-%description npud
-NPU daemon for optimal management of NPU hardware
-%endif
-
 %ifarch armv7l
 %define target_arch armv7l
 %endif
@@ -170,10 +151,6 @@ NPU daemon for optimal management of NPU hardware
 # Set option for configuration
 %define option_config %{nil}
 %if %{config_support} == 1
-%if %{npud_build} == 1
-# ENVVAR_NPUD_CONFIG: Use environment variable for npud configuration and debug
-%define option_config -DENVVAR_NPUD_CONFIG=ON
-%endif # npud_build
 %endif # config_support
 
 %if %{coverage_build} == 1
@@ -305,16 +282,6 @@ install -m 644 %{overlay_path}/lib/libloco*.so %{buildroot}%{_libdir}/nnfw/odc
 install -m 644 build/out/lib/nnfw/odc/*.so %{buildroot}%{_libdir}/nnfw/odc
 %endif # odc_build
 
-%if %{npud_build} == 1
-install -m 755 build/out/bin/npud %{buildroot}%{_bindir}
-
-%if %{test_build} == 1
-mkdir -p %{test_install_path}/npud-gtest
-install -m 755 build/out/npud-gtest/* %{test_install_path}/npud-gtest
-%endif # test_build
-
-%endif # npud_build
-
 %endif
 
 %post -p /sbin/ldconfig
@@ -365,15 +332,6 @@ install -m 755 build/out/npud-gtest/* %{test_install_path}/npud-gtest
 %endif # arm armv7l armv7hl aarch64
 %endif # test_build
 
-%if %{npud_build} == 1
-%files npud
-%manifest %{name}.manifest
-%defattr(-,root,root,-)
-%ifarch arm armv7l armv7hl aarch64 x86_64 %ix86 riscv64
-%{_bindir}/npud
-%endif # arm armv7l armv7hl aarch64 x86_64 %ix86
-%endif # npud_build
-
 %if %{odc_build} == 1
 %files odc
 %manifest %{name}.manifest
diff --git a/runtime/service/CMakeLists.txt b/runtime/service/CMakeLists.txt
deleted file mode 100644 (file)
index 5ea6cda..0000000
+++ /dev/null
@@ -1 +0,0 @@
-add_subdirectories()