Skip to content

Commit

Permalink
[npud] Move npud code to the contrib folder
Browse files Browse the repository at this point in the history
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.
  - #9258

ONE-DCO-1.0-Signed-off-by: Jiyoung Yun <[email protected]>
  • Loading branch information
jyoungyun committed Jul 25, 2024
1 parent 8a76a55 commit d6eaa64
Show file tree
Hide file tree
Showing 45 changed files with 3 additions and 122 deletions.
1 change: 0 additions & 1 deletion .ahub/tcchecker-tca/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ test:
- /runtime/libs/misc
- /runtime/libs/ndarray
- /runtime/onert
- /runtime/service/npud/tests
- /tests/nnfw_api

testFile:
Expand Down
2 changes: 0 additions & 2 deletions infra/nnfw/cmake/CfgOptionFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions infra/nnfw/cmake/options/options_aarch64-tizen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
3 changes: 0 additions & 3 deletions infra/nnfw/cmake/options/options_armv7hl-tizen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
3 changes: 0 additions & 3 deletions infra/nnfw/cmake/options/options_armv7l-tizen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
4 changes: 0 additions & 4 deletions infra/nnfw/cmake/options/options_i686-tizen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
3 changes: 0 additions & 3 deletions infra/nnfw/cmake/options/options_riscv64-tizen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
3 changes: 0 additions & 3 deletions infra/nnfw/cmake/options/options_x86_64-tizen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
60 changes: 3 additions & 57 deletions infra/scripts/test_ubuntu_npud.sh
Original file line number Diff line number Diff line change
@@ -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
42 changes: 0 additions & 42 deletions packaging/nnfw.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion runtime/service/CMakeLists.txt

This file was deleted.

0 comments on commit d6eaa64

Please sign in to comment.