Skip to content

Commit

Permalink
[infra/onert] Remove boost usage on infra resources
Browse files Browse the repository at this point in the history
This commit removes boost library usage on cmake, makefile, bash script and documentation.

ONE-DCO-1.0-Signed-off-by: Hyeongseok Oh <[email protected]>
  • Loading branch information
hseok-oh committed Aug 2, 2024
1 parent 57a7879 commit 854658f
Show file tree
Hide file tree
Showing 15 changed files with 8 additions and 139 deletions.
4 changes: 0 additions & 4 deletions Makefile.template
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,6 @@ ifneq ($(TFLITE_MODEL_PATH),)
OPTIONS+= -DTFLITE_MODEL_PATH=$(TFLITE_MODEL_PATH)
endif

ifneq ($(ANDROID_BOOST_ROOT),)
OPTIONS+= -DANDROID_BOOST_ROOT=$(ANDROID_BOOST_ROOT)
endif

ifeq ($(HOST_OS),linux)
NPROCS?=$(shell grep -c ^processor /proc/cpuinfo)
else
Expand Down
4 changes: 1 addition & 3 deletions docs/howto/how-to-build-runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ If you are going to build this project, the following modules must be installed

- C & C++ compiler
- CMake
- Boost C++ libraries

In the Ubuntu, you can easily install it with the following command.

```
$ sudo apt-get install cmake libboost-all-dev
$ sudo apt-get install cmake
```

If your linux system does not have the basic development configuration, you will need to install more packages. A list of all packages needed to configure the development environment can be found in https://github.com/Samsung/ONE/blob/master/infra/docker/focal/Dockerfile.
Expand All @@ -30,7 +29,6 @@ git \
graphviz \
hdf5-tools \
lcov \
libboost-all-dev \
libhdf5-dev \
python3 \
python3-pip \
Expand Down
4 changes: 2 additions & 2 deletions docs/howto/how-to-cross-build-runtime-for-arm.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ Makefile.template will pass crossbuild toolchain setting to cmake automatically

To run and test the cross-compiled runtime, you need to install library packages and copy the compiled output to the target device of the architecture in which it is executable.

1. Install hdf5 and boost library package
1. Install hdf5 library package

```
$ sudo apt install libhdf5-dev libboost-system-dev libboost-program-options-dev
$ sudo apt install libhdf5-dev
```

2. Copy all artifacts under the `./Product/armv7l-linux.<BUILD_TYPE>` folder to the target device, Odroid-XU4 for example, as a whole.
Expand Down
8 changes: 4 additions & 4 deletions infra/nnfw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ endmacro(nnas_include)
# Runtime 'find_package()' wrapper to find in cmake/packages folder
#
# Example:
# nnfw_find_package(Boost): Load settings from 'BoostConfig.cmake' file
# - this may drop warnings like "-- Could NOT find Boost (missing: Boost_DIR)
# nnfw_find_package(Boost QUIET): Load settings silently, without warnings
# nnfw_find_package(Boost REQUIRED): Load settings but stop with error when failed
# nnfw_find_package(Eigen): Load settings from 'EigenConfig.cmake' file
# - this may drop warnings like "-- Could NOT find Eigen (missing: Eigen_DIR)
# nnfw_find_package(Eigen QUIET): Load settings silently, without warnings
# nnfw_find_package(Eigen REQUIRED): Load settings but stop with error when failed
macro(nnfw_find_package PREFIX)
find_package(${PREFIX} CONFIG NO_DEFAULT_PATH
PATHS ${CMAKE_SOURCE_DIR}/cmake/packages
Expand Down
3 changes: 0 additions & 3 deletions infra/nnfw/cmake/CfgOptionFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,11 @@ option(DOWNLOAD_NEON2SSE "Download NEON2SSE library source" ON)
option(DOWNLOAD_FLATBUFFERS "Download FlatBuffers source" ON)
option(DOWNLOAD_ARMCOMPUTE "Download ARM Compute source" ON)
option(DOWNLOAD_NONIUS "Download nonius source" ON)
option(DOWNLOAD_BOOST "Download boost source" OFF)
option(DOWNLOAD_RUY "Download ruy source" ON)
option(DOWNLOAD_CPUINFO "Download cpuinfo source" ON)
option(DOWNLOAD_OOURAFFT "Download Ooura FFT source" ON)
option(DOWNLOAD_MLDTYPES "Download ml_dtypes source" ON)
option(DOWNLOAD_GTEST "Download Google Test source and build Google Test" ON)
option(BUILD_BOOST "Build boost source" OFF)
option(BUILD_TENSORFLOW_LITE "Build TensorFlow Lite from the downloaded source" ON)
option(BUILD_ARMCOMPUTE "Build ARM Compute from the downloaded source" ON)
option(DEBUG_ARMCOMPUTE "Build ARM Compute as debug type" OFF)
Expand All @@ -91,7 +89,6 @@ option(BUILD_FXDIV "Build fxdiv library from the source" ON)
option(DOWNLOAD_PYBIND11 "Download Pybind11 source" OFF)
option(BUILD_PYTHON_BINDING "Build python binding" OFF)
option(HDF5_USE_STATIC_LIBRARIES "Determine whether or not static linking for HDF5" ON)
option(Boost_USE_STATIC_LIBS "Determine whether or not static linking for Boost" ON)

#
## Default sample build configuration
Expand Down
3 changes: 0 additions & 3 deletions infra/nnfw/cmake/options/options_aarch64-android.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@
#
option(BUILD_ANDROID_BENCHMARK_APP "Enable Android Benchmark App" ON)
option(DOWNLOAD_NEON2SSE "Download NEON2SSE library source" OFF)
# Need boost library
option(DOWNLOAD_BOOST "Download boost source" ON)
option(BUILD_BOOST "Build boost source" ON)
option(BUILD_LOGGING "Build logging runtime" OFF)
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 @@ -10,6 +10,3 @@ option(DOWNLOAD_GTEST "Download Google Test source and build Google Test" OFF)
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)

# 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 @@ -10,6 +10,3 @@ option(DOWNLOAD_GTEST "Download Google Test source and build Google Test" OFF)
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)

# 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 @@ -10,6 +10,3 @@ option(DOWNLOAD_GTEST "Download Google Test source and build Google Test" OFF)
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)

# 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 @@ -11,6 +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)

# Tizen boost package does not have static library
option(Boost_USE_STATIC_LIBS "Determine whether or not static linking for Boost" OFF)
100 changes: 0 additions & 100 deletions infra/nnfw/cmake/packages/BoostConfig.cmake

This file was deleted.

1 change: 0 additions & 1 deletion packaging/nnfw.spec
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig

%if %{test_build} == 1
BuildRequires: pkgconfig(boost)
BuildRequires: pkgconfig(tensorflow2-lite)
BuildRequires: hdf5-devel-static
BuildRequires: libaec-devel
Expand Down
3 changes: 1 addition & 2 deletions tests/tools/onert_train/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ The input models that can be supported by this tool are as follows.

Required software tools:
- libhdf5-dev
- libboost-program-options-dev

```
sudo apt install -y libhdf5-dev libboost-program-options-dev
sudo apt install -y libhdf5-dev
```

## Usage
Expand Down
1 change: 0 additions & 1 deletion tools/cross/install_rootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ __UbuntuPackages+=" python3-dev"
# other development supports
__UbuntuPackages+=" ocl-icd-opencl-dev"
__UbuntuPackages+=" libhdf5-dev"
__UbuntuPackages+=" libboost-all-dev"
__UbuntuPackages+=" libglib2.0-dev"

# symlinks fixer
Expand Down
4 changes: 0 additions & 4 deletions tools/kbenchmark/Args.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@

#include <string>
#include <vector>
#include <boost/program_options.hpp>

namespace po = boost::program_options;

namespace kbenchmark
{

Expand Down

0 comments on commit 854658f

Please sign in to comment.