[BUILD] add the build option for NPU data manipulation
authorDongju Chae <dongju.chae@samsung.com>
Mon, 30 Dec 2019 06:27:38 +0000 (15:27 +0900)
committer송욱/On-Device Lab(SR)/Staff Engineer/삼성전자 <wook16.song@samsung.com>
Fri, 3 Jan 2020 04:33:33 +0000 (13:33 +0900)
This commit adds the build option for NPU data manipulation.
As HW could provide this feature in the near future, it is enabled by
the build option.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
debian/rules
meson.build
meson_options.txt
packaging/npu-engine.spec

index 36aface..5d1f31e 100755 (executable)
@@ -25,7 +25,7 @@ override_dh_auto_clean:
        rm -rf debian/tmp
 
 override_dh_auto_configure:
-       PKG_CONFIG_PATH=${NPU_TRINITY_INSTALL_PREFIX}/lib/pkgconfig meson --buildtype=plain --prefix=$(NPU_TRINITY_INSTALL_PREFIX) --sysconfdir=$(NPU_TRINITY_INSTALL_PREFIX)/etc --libdir=lib --bindir=bin --includedir=include build -Denable_npu_emul=true
+       PKG_CONFIG_PATH=${NPU_TRINITY_INSTALL_PREFIX}/lib/pkgconfig meson --buildtype=plain --prefix=$(NPU_TRINITY_INSTALL_PREFIX) --sysconfdir=$(NPU_TRINITY_INSTALL_PREFIX)/etc --libdir=lib --bindir=bin --includedir=include build -Denable_npu_emul=true -Denable_data_manip=true
 
 override_dh_auto_build:
        ninja -C build
index ad21dfb..30bfd51 100644 (file)
@@ -55,6 +55,9 @@ if get_option('enable_npu_emul')
   add_project_arguments('-I/opt/trinity/include', language: ['c', 'cpp'])
   add_project_arguments('-DENABLE_EMUL', language: ['c', 'cpp'])
 endif
+if get_option('enable_data_manip')
+  add_project_arguments('-DENABLE_MANIP', language: ['c', 'cpp'])
+endif
 
 subdir('src')
 subdir('tools')
index 4acfb5b..65d4b2b 100644 (file)
@@ -3,3 +3,4 @@ option('resv_mem_size', type : 'string', value : '0')
 option('working_dir', type : 'string', value : '/tmp/')
 option('log_dir', type : 'string', value : '/tmp/')
 option('enable_npu_emul', type : 'boolean', value : false)
+option('enable_data_manip', type : 'boolean', value : false)
index cfd5794..76e28dc 100644 (file)
@@ -75,7 +75,7 @@ CXXFLAGS="${CXXFLAGS} -fprofile-arcs -ftest-coverage"
 CFLAGS="${CFLAGS} -fprofile-arcs -ftest-coverage"
 %endif
 
-meson build --prefix=%{_prefix} --sysconfdir=%{_sysconfdir} --libdir=%{_libdir} --includedir=%{_includedir} --bindir=%{neexampledir} -Denable_npu_emul=%{enable_npu_emul}
+meson build --prefix=%{_prefix} --sysconfdir=%{_sysconfdir} --libdir=%{_libdir} --includedir=%{_includedir} --bindir=%{neexampledir} -Denable_npu_emul=%{enable_npu_emul} -Denable_data_manip=true
 ninja -C build %{?_smp_mflags}
 
 %install