This patch adds skip_idu_check option when build.
npu device driver does not check idu minor version when SKIP_IDU_CHECK is defined.
Signed-off-by: Yelin Jeong <yelini.jeong@samsung.com>
add_project_arguments('-DENABLE_CUSE', language: ['c', 'cpp'])
endif
+if get_option('skip_idu_check')
+ add_project_arguments('-DSKIP_IDU_CHECK', language: ['c', 'cpp'])
+endif
+
if sysroot.startswith('/')
sysroot_inc_cflags_template = '-I@0@/usr/include@1@'
sysroot_inc = sysroot_inc_cflags_template.format(sysroot, '')
option('enable_plugin_npumgr', type : 'boolean', value : false)
option('enable_plugin_nns', type : 'boolean', value : false)
option('kernel_hdr_dir', type : 'string', value : '')
+option('skip_idu_check', type : 'boolean', value : false)
%define enable_plugin_nns -Denable_plugin_nns=false
%endif
+%if 0%{?dtv}
+%define skip_idu_check -Dskip_idu_check=true
+%else
+%define skip_idu_check -Dskip_idu_check=false
+%endif
+
%global debug_package %{nil}
%global __debug_install_post %{nil}
--libdir=%{_libdir} --includedir=%{_includedir} \
--datadir=%{_datadir} --sysconfdir=%{_sysconfdir} \
-Dtarget_platform=tizen -Denable_data_manip=true \
- %{enable_npu_emul} %{enable_npu_cuse} %{enable_plugin_npumgr} %{enable_plugin_nns} \
+ %{enable_npu_emul} %{enable_npu_cuse} %{enable_plugin_npumgr} %{enable_plugin_nns} %{skip_idu_check} \
build
ninja -C build %{?_smp_mflags}
model_config->metadata_dbuf_fd = meta->getDbufFD ();
#endif
- /* TODO: need to set npu_version to compare with IDU version */
+#ifdef SKIP_IDU_CHECK
model_config->npu_version = 0;
+#endif
ret = ioctl (this->getDeviceFD (), TRINITY_IOCTL_REGISTER_MODEL, model_config);
#ifdef ENABLE_CUSE