Parichay Kapoor [Fri, 3 Jan 2020 04:49:33 +0000 (13:49 +0900)]
[nnfw] Support setInputDimension with nnfw
With updated nnfw API, support setInputDimension with nnfw
Although the API is defined, its not yet implemeted interally
So, the unittest is added, but disabled
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
MyungJoo Ham [Thu, 9 Jan 2020 06:26:13 +0000 (15:26 +0900)]
CODEOWNERS: add new members
Notify Gichan and Yongjoo for any changes in the repo.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Mon, 16 Dec 2019 11:19:54 +0000 (20:19 +0900)]
Test: filter/edgetpu unit testing
Edge-TPU subplugin unit test cases.
(1 positive and 2 negative cases)
This requires edgetpu package update in dashboard.tizen.org
(We are waiting for it)
V2: added test model condition for edgetpu testcase.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Dongju Chae [Wed, 8 Jan 2020 05:12:44 +0000 (14:12 +0900)]
[CONF] override NNSTREAMER_CONF_FILE with env-var conf in non-Tizen
This commit overrides NNSTREAMER_CONF_FILE with env-var conf in
non-Tizen system. So, env-var conf has a higher priority than others.
With this feature, some unittests using a conf file from env-var has
passed even if the default conf file (/etc/nnstremer.ini) exists.
Note that Tizen does not allow to set configurations from env-var.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
MyungJoo Ham [Wed, 18 Dec 2019 04:24:50 +0000 (13:24 +0900)]
Dist/Tizen: show unit test result summary
Aggregate all gtest and SSAT results at the end of testing.
After this, unittest-enabled gbs will show results like:
```
[ 117s] GTest (total 232 cases)
[ 117s] Passed: 232 / Failed: 0 / Ignored: 0
[ 117s] SSAT (total 513 cases)
[ 117s] Passed: 497 / Failed: 0 / Ignored: 16
[ 117s] Grand Total: 745 cases
[ 117s] Passed: 729 / Failed: 0 / Ignored: 16
```
Changes in V2:
- made sure to call close for opened f
- use os.path.splitext
Chnaged in V3:
- with makes exceptions with fail. Handle them.
Suggested TODO in later PRs:
- Count negative test cases.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Wook Song [Fri, 3 Jan 2020 05:39:31 +0000 (14:39 +0900)]
[Filter/OpenVino] Fill the mandatory callback, invoke
This patch adds a method to run inference for given input tensors using
InferenceEngine on the acceleration device. It also implements the
mandatory callback of GstTensorFilterFramework, invoke, with such method.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Parichay Kapoor [Mon, 23 Dec 2019 10:29:41 +0000 (19:29 +0900)]
[filter/ext] Added basic unittests for all filter extensions
Added basic unittests for all the the filter extensions
This creates failure cases of unittests for the interface defined with GstTensorFilterFramework
for most of the extensions, and performs basic unittests
Updated the unittest list in packaging files as well
Also added a script file to run all the test cases inside a folder
V2:
Split test cases into successful and negative ones
TODO: Support python extensions in this as well
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Thu, 19 Dec 2019 03:07:38 +0000 (12:07 +0900)]
[single/hw] Check hw support for framework
Add implementation to check hw support for framework while checking
for its availability.
Added unittests for this functionality with tensorflow-lite
V2:
check hardware support performed while parsing for available hardwares
Split availability test cases into positive and negative
V3:
checkHWSupport->checkAvailability
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Jaeyun [Thu, 2 Jan 2020 10:15:48 +0000 (19:15 +0900)]
[Android] add clone method
Add clone method in tensors info class.
This is to prevent meta-info change after allocating data from passed information.
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
Jaeyun [Mon, 23 Dec 2019 10:43:27 +0000 (19:43 +0900)]
[Android] define enumeration for data type and state
Define enumeration for tensor data type and pipeline state (sync with C# API)
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
Jaeyun [Fri, 22 Nov 2019 08:22:27 +0000 (17:22 +0900)]
[Android] tensors-data class with metadata
1. Add tensors info in TensorsData class.
2. Handle error case when failed to create pipe info in native functions.
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
Sangjung Woo [Wed, 8 Jan 2020 07:10:48 +0000 (16:10 +0900)]
[PythonFilter] Add pragma option to fix compile time error for gcc v9.6
This patch newly adds pragma option to fix compile time error for gcc
v9.6.
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
Sangjung Woo [Wed, 8 Jan 2020 05:41:12 +0000 (14:41 +0900)]
[Spec] Add python-filter option
This patch newly adds the python-filter option which could support to be
disabled.
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
Wook Song [Thu, 2 Jan 2020 09:28:35 +0000 (18:28 +0900)]
[Filter/OpenVino] Handle the case when the sub-plugin is re-opened
This patch adds a mechanism to handle the case when this sub-plugin is
re-opened.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Wook Song [Thu, 2 Jan 2020 08:51:18 +0000 (17:51 +0900)]
[Filter/OpenVino] Improve provided model(s) parsing
This patch improves the mechanism to parse the provided model(s).
The model could be given in the following forms:
- a path of the .bin or .xml file
- a path of the prefix of the .bin and .xml file
- a set of paths of the both .bin and .xml files.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Wook Song [Thu, 2 Jan 2020 07:39:48 +0000 (16:39 +0900)]
[Ext/Filter/Meson] Make meson support the CPU extensions of OpenVino
This patch updates the meson build script for tensor filter sub-plugins
to support the CPU extensions of the OpenVino toolkit.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Wook Song [Thu, 2 Jan 2020 07:28:35 +0000 (16:28 +0900)]
[Filter/OpenVino] Load a given network into the acceleration device
After negotiated, the given neural network should be loaded into the
acceleration device (note that, currently, CPU is the only supported
one).This patch is a draft of the implementation of that mechanism.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Dongju Chae [Tue, 7 Jan 2020 10:31:14 +0000 (19:31 +0900)]
[Cpp/Ext] Renames file extensions of test source codes written in C++
This commit renames file extensions of test source codes written in C++
(i.e, *.cpp -> *.cc), which hurt the consistency.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Parichay Kapoor [Tue, 31 Dec 2019 07:39:24 +0000 (16:39 +0900)]
[armnn] object classification unittest + bug solve
- Add object classification unittest using tflite quantized mobilenet
- Add orange.png raw format image orange.raw
- As armnn treats uint8 datatype of tflite as quant asymm8 (arc/armnnTfLiteParser/TfLiteParser.cpp:310),
quant asymm8 is interpreted as uint8 in nnstreamer
- Updated current default HW backend to CpuAcc (based on neon) as CpuRef takes over
5 min to complete the mobilenet unittest
Bug solve:
The dimension of data received by armnn are inversed to match the desired order
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Sangjung Woo [Mon, 6 Jan 2020 07:30:16 +0000 (16:30 +0900)]
[C-API] Set omitted enum value in pipeline buffer policy
This patch explicitly set the enum value in pipeline buffer policy as
below.
* ML_PIPELINE_BUF_POLICY_AUTO_FREE: 0
* ML_PIPELINE_BUF_POLICY_DO_NOT_FREE: 1
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
Parichay Kapoor [Tue, 31 Dec 2019 11:37:25 +0000 (20:37 +0900)]
[nnfw] Interpret quant8 asymm as uint8
Interpret quant8 asymm as uint8
Add unittest with object classification
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Wook Song [Thu, 2 Jan 2020 07:14:58 +0000 (16:14 +0900)]
[Ext/Filter/Meson] Update meson.build for the OpenVino sub-plugin
This patch updates the meson build script for the tensor filter
sub-plugins to support OpenVino.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Wook Song [Mon, 6 Jan 2020 08:08:21 +0000 (17:08 +0900)]
[Documentation] Modify the meson version required to build up-to-date
This patch modifies the meson version required to build up-to-date, 0.50.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Jaeyun [Tue, 17 Dec 2019 06:45:21 +0000 (15:45 +0900)]
[Api] add SNAP in nnfw enum type
Define SNAP in nnfw type, only for Android.
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
Jaeyun [Mon, 6 Jan 2020 04:31:30 +0000 (13:31 +0900)]
[Filter/Custom] unnecessary log
prevent unnecessary logs if custom-filter does not define set/get dim callbacks.
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
Jaeyun [Mon, 6 Jan 2020 03:44:14 +0000 (12:44 +0900)]
[CodeClean] fix coverity
fix some coverity issues and sam score
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
Wook Song [Sun, 29 Dec 2019 21:40:08 +0000 (06:40 +0900)]
[Filter/OpenVino] Add skeleton code of a sub-plugin for OpenVino support
This patch adds skeleton code of a tensor filter sub-plugin for OpenVino
Toolkit (dldt) support.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Parichay Kapoor [Tue, 17 Dec 2019 04:51:24 +0000 (13:51 +0900)]
[armnn] Added unittests for armnn
Added unittests for armnn tensor filter extension
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Thu, 14 Nov 2019 08:25:06 +0000 (17:25 +0900)]
[armnn] Added tensor filter extension of armnn
Added tensor filter extension of armnn
V2: Updated the static library install paths for armnn and nnfw subplugins
V3: Updated error handling
V4: Remove Wno-sign-compare
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Mon, 23 Dec 2019 08:24:55 +0000 (17:24 +0900)]
[filter/ext] Replace asserts with error handling
Replace asserts with appropriate error handling in tensor filter extensions
This will allows test cases for failure scenarios and handle erronous inputs
via single-shot API gracefully with error return than shutting down with assert failure
V2:
Applied for custom filters as well
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Wed, 18 Dec 2019 05:42:55 +0000 (14:42 +0900)]
[spec] Minor fixes and cleanup
Added minor fixes:
- nnstreamer-capi.manifest to be not used non-tizen packages
- remove nnfw enable variable as nnfw is always enabled
Cleanup
- remove extra tizen conditions
- Move similar blocks together for better understanding
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Tue, 17 Dec 2019 06:02:42 +0000 (15:02 +0900)]
[plugin/hw] Add more HW accelerator and update implementation
Add TPU as a backend accelerator property option in list of hardware
accelerators
Move default accelerator to avoid changing default accelerator enum value
everytime a new backend device is added
V2:
- Updated the regex to be formed at run-time using a list of supported
accelerators.
- Accelerators are also stored as GEnumValues to do conversion from
string to int value and vice versa easily
- More accelerators are added in heirarchical order. srcn and neon
moved to npu and cpu heirarchy correspondingly.
- Added more accelerators to be supported in future.
V3:
Update backend accelerator in tizen c-api
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Jaeyun [Thu, 2 Jan 2020 03:47:36 +0000 (12:47 +0900)]
[Build] remove unnecessary flag
remove remained flag 'no-sign-compare'
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
Dongju Chae [Mon, 16 Dec 2019 11:19:29 +0000 (20:19 +0900)]
[FIX/LOG] Fix a wrong error message for custom-easy tensor filter
This commit fixes the wrong log message for custom-easy tensor filter.
For this subplugin, we don't need to check whether the model path exists.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Dongju Chae [Wed, 18 Dec 2019 03:50:04 +0000 (12:50 +0900)]
[TEST/RELOAD] Test runtime model reloads during tflite inferences
This commit adds a testcase to test asynchronous model updates during
tflite inferences. It repeatedly switches tflite models between
mobilenet_v1 and mobilenet_v2. It expects the same index for input img.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Parichay Kapoor [Mon, 30 Dec 2019 11:56:11 +0000 (20:56 +0900)]
[build] Remove -wno-sign-compare
Remove -Wno-sign-compare
Apply corresponding fixes
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Jaeyun [Thu, 26 Dec 2019 02:20:19 +0000 (11:20 +0900)]
[Converter] reduce complexity
define function to get possible media caps from downstream element.
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
Parichay Kapoor [Thu, 19 Dec 2019 04:19:52 +0000 (13:19 +0900)]
[tflite] Backend unittest should always pass
Tensorflow-lite unittest which tests for appropriate backend parsing and testing
should always pass.
Removed accelerator input validity check at tensor_filter.c as it is checked in
each filter again.
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Jaeyun [Fri, 20 Dec 2019 06:38:20 +0000 (15:38 +0900)]
[Android/SNAP] build script for SNAP
Update script to build Android library including SNAP.
Before running with option --enable_snap=yes, developer should define SNAP_DIRECTORY (dir path to SNAP sub-plugin and prebuilt library)
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
Parichay Kapoor [Fri, 27 Dec 2019 13:50:12 +0000 (22:50 +0900)]
[nnfw] Reverse the order of dimension
Reverse the order of dimensions with nnstreamer as
nnfw stores dimension in accordance with tflite
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Jaeyun [Wed, 18 Dec 2019 08:29:48 +0000 (17:29 +0900)]
[Filter/TF] remove unnecessary code
remove unnecessary code (duplicated with tf_destroyNotify())
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
MyungJoo Ham [Wed, 18 Dec 2019 06:06:16 +0000 (15:06 +0900)]
Dist/Tizen: add missing manifest for source-tizen-sensor
Because it has an executable (shared library), we need
SMACK manifest information.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Parichay Kapoor [Mon, 16 Dec 2019 02:24:29 +0000 (11:24 +0900)]
[nnfw] Set accelerator for nnfw
Allow setting of accelerator for nnfw
Parsing accelerator moved to tensor_filter_common. Currently, used in
tflite and nnfw, and use directly for other filters like this.
V2:
Added note that PROP_ACCELERATOR is supported in a few filter extensions only.
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Dongju Chae [Mon, 16 Dec 2019 05:24:58 +0000 (14:24 +0900)]
[Refactor/TF] Refactor tf tensor-filter subplugin to remove .c/.cc wrapper
This commit refactors tf tensor-filter subplugin to remove .c/.cc wrapper.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Dongju Chae [Mon, 16 Dec 2019 07:42:07 +0000 (16:42 +0900)]
[Refactor/Python] Refactor python sub-plugin to remove c/cc wrapper
This commit refactors python tensor-filter sub-plugin to remove c/cc
wrapper.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
MyungJoo Ham [Wed, 11 Dec 2019 01:48:09 +0000 (10:48 +0900)]
Filter: support EdgeTPU with tensorflow-lite interface
Support EdgeTPU with non-NNAPI tensorflow-lite interface (delegation).
Tested with Ubuntu 18.04 + Coral Edge-TPU + Mobile-SSD TF Lite model.
TODO (later PRs): How to test with w/ GTest in CI?
Fixes #1661
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Dongju Chae [Mon, 16 Dec 2019 04:01:14 +0000 (13:01 +0900)]
[Refactor/TFLITE] Refactor tflite tensor-filter subplugin to remove .c/.cc wrapper
This commit refactors tflite tensor-filter subplugin to remove .c/.cc
wrapper.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Parichay Kapoor [Mon, 16 Dec 2019 02:19:49 +0000 (11:19 +0900)]
[spec] nnfw now packaged only for tizen
nnfw package is now created and corresponding tests performed
only for tizen in the spec file.
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Dongju Chae [Mon, 16 Dec 2019 06:34:42 +0000 (15:34 +0900)]
[Refactor/Caffe2] Refactor caffe2 tensor-filter subplugin to remove .c/.cc wrapper
This commit refactors caffe2 tensor-filter subplugin to remove .c/.cc
wrapper.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Dongju Chae [Mon, 16 Dec 2019 06:53:34 +0000 (15:53 +0900)]
[Refactor/PyTorch] Refactor pytorch subplugin to remove .c/.cc wrapper
This commit refactors pytorch tensor-filter subplugin to remove
.c/.cc wrapper.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Jaeyun [Mon, 16 Dec 2019 06:46:23 +0000 (15:46 +0900)]
[Android] header files for sub-plugin
provide headers for plugin writer in android native build.
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
Dongju Chae [Fri, 13 Dec 2019 06:52:06 +0000 (15:52 +0900)]
[TEST/RELOAD] Add negative unittests for tflite model reload
This commit adds some negative unittests for tflite model reload.
1. Update model file name (a.tflite --> b.tflite) but b.tflite not exists
2. Update model file name (a.tflite --> b.tflite) but b.tflite has different dimensions
3. Update without file name changes but the file is gone (deleted)
4. Update without file name changes but the file has now different dimensions
Note that testing reload in runtime will be done in another commit.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Dongju Chae [Fri, 13 Dec 2019 04:52:44 +0000 (13:52 +0900)]
[TEST/RELOAD] Add unittest to test set_property of model/is-updatable
This commit adds unittest to test set_property of model/is-updatable.
It tests reloadModel() of tflite subplugin but it's not asynchronous.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Dongju Chae [Fri, 13 Dec 2019 04:51:26 +0000 (13:51 +0900)]
[Test/Model] Add a tflite model for reload tests, mobilenet_v2
This commit adds a tflite model for reload tests, mobilenet_v2.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
MyungJoo Ham [Mon, 9 Dec 2019 10:01:33 +0000 (19:01 +0900)]
Refactor/Conf: avoid using hardcoded categories
To handle paths/files of each subplugin category,
use loops and enums instead of hardcoded variables.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Fri, 13 Dec 2019 06:59:00 +0000 (15:59 +0900)]
Test/Fix Compiler Warning (else ambiguity)
Probably because of GTest macros, having if statement around
EXPECT_* appears to be not a good approach if it is not bracketed.
Fix compiler warnings from such.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Wed, 11 Dec 2019 04:12:22 +0000 (13:12 +0900)]
Release of 1.3.0, the development version
When 1.3.x is completed, it will be released as 1.4.0 and
1.5.x development will be started.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Wed, 11 Dec 2019 04:08:55 +0000 (13:08 +0900)]
Release of nnstreamer 1.2.0
New features are coming with 1.2.0
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Wed, 4 Dec 2019 11:21:50 +0000 (20:21 +0900)]
Policy Update: Test Tizen Features in ARM, always.
Because TAOS-CI skips unittests for ARM/ARM64 because of the latency,
we need to enable unittests for ARM-only tests unconditionally
if the test-target features are ARM-only.
Especially, this will help preventing regressions from other packages
in Tizen by enabling unit-tests in Tizen build (build.tizen.org) for
those selected features.
Changes in v2:
- Updated indentation (suggested by dongju.chae@samsung.com)
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Dongju Chae [Tue, 10 Dec 2019 11:34:15 +0000 (20:34 +0900)]
[TFLITE/RELOAD] Revise tflite sub-plugin to support model reloading
This commit revises tflite sub-plugin to support model reloading.
It implements new interpreter class with its own mutex, which wraps
existing codes. Also, it's designed to support interpreter swapping
to hide the overhead of model reloading.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Dongju Chae [Fri, 13 Dec 2019 03:10:13 +0000 (12:10 +0900)]
[TensorSink/UnitTest] Add a test option for sync property in TensorSink
This commit adds a test option, need_sync, for sync property in TensorSink.
Basically, GstBaseSink has a 'sync' property enabled by default, and
TensorSink also does. In this case, if the frame is later than max-lateness,
the sink will drop the buffer without calling the render method.
It can be a problem if some unittests (e.g., 'signals') expects the exact
number of received data. In slow system, if a signal callback is too slow,
some buffer can be dropped.
To fix this problem, this patch adds a test option for sync property and
set 'sync' property as FALSE by default to disable the buffer dropping
feature for 'signals' unittest.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Jaeyun [Thu, 12 Dec 2019 08:51:47 +0000 (17:51 +0900)]
[Android] common headers for gstreamer
define common header path for gstreamer.
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
MyungJoo Ham [Fri, 6 Dec 2019 02:38:00 +0000 (11:38 +0900)]
Converters: support external subplugins
Allow to add external converters in run-time as subplugins.
Policies to be determined:
- Build & integration policies for external converters.
- Would we allow a few "basic" external converters available by default? (without dlopen)
- Tizen feature keys and privileges along with "NOT SUPPORTED" handling.
- Which profiles would use which of external converters?
TODO:
- Implement multiple external subplugins for unit tests
Changes in V2:
- Typo fixed (comments)
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Tue, 26 Nov 2019 09:42:06 +0000 (18:42 +0900)]
UnitTest: Tensor-src-tizensensor / Initial test cases
1. Unit tests are added.
2. dummy_sensor.c/h offers dummy Tizen sensor framework for unit tests,
where we cannot activate Tizen sensor framework daemon.
3. Bugs were found with the unit tests and they are fixed.
- g_hash_table misuses
- property configuration errors
- frequency (framerate) handling
- Clean up and configured-status handling
- Mutex deadlock
- Timestamp handling
Changes v1->v2:
- Use G_USEC_PER_SEC for readability, suggested by dongju.chae@samsung.com
Changes v2->v3:
- Added error-clear in testcase, suggested by dongju.chae@samsung.com
- Removed unnecessary code (residue of internal tests), suggested by jy1210.jung@samsung.com
Changes v3->v4:
- Added free ops for pipelines, removed duplicated codes, suggested by jy1210.jung@samsung.com
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Jaeyun [Thu, 12 Dec 2019 08:57:30 +0000 (17:57 +0900)]
[Filter] property description
Remove unnecessary space in the description.
(Using gst-inspect, the property model shows unnecessary space)
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
Parichay Kapoor [Thu, 12 Dec 2019 05:55:42 +0000 (14:55 +0900)]
[nnfw] nnfw fix for aarch64
This PR adds temporary fix for aarch64 enabling successful build and
testing of nnfw plugin for nnstreamer
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Dongju Chae [Thu, 12 Dec 2019 04:30:19 +0000 (13:30 +0900)]
[CONF] Remove unnecessary g_key_file_free()
This commit removes unnecessary g_key_file_free() because g_autoptr
already provides cleanup process. This bug was detected by valgrind.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
MyungJoo Ham [Thu, 12 Dec 2019 06:51:48 +0000 (15:51 +0900)]
Doc/Contributing: update code quality standards
Let's describe the standards we are already enforcing.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Jaeyun [Mon, 9 Dec 2019 12:47:41 +0000 (21:47 +0900)]
[Android] add asset dir for native library
Add asset dir for native library.
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
Parichay Kapoor [Fri, 8 Nov 2019 07:30:51 +0000 (16:30 +0900)]
[nnfw/single/test] Add tests for nnfw with single API
Add invoke test for nnfw with single API
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Fri, 8 Nov 2019 07:29:13 +0000 (16:29 +0900)]
[nnfw/single] Enable nnfw with single API
- Enable nnfw with single API
- nnfw and tensorflow-lite both support tflite extensions
Added meson option to set default behavior which prioritizes tensorflow-lite
V2:
- Add check for availibilty of nnfw after assigning nnfw in case of ML_NNFW_TYPE_ANY
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Fri, 8 Nov 2019 07:26:01 +0000 (16:26 +0900)]
[nnfw] update nnfw model dir path to model file path
Update the nnfw framework input model format to work with file path
nnfw framework takes in model directory path
Directory path is extracted from file path
Metadata is verified in the extracted directory path
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Jaeyun [Wed, 4 Dec 2019 04:16:03 +0000 (13:16 +0900)]
[C-Api/Single] check invalid tensor info
Check input/output tensor info when opening the nn model.
If given info is not matched with model, try to change input info for dynamic mode.
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
Jaeyun [Fri, 15 Nov 2019 06:28:32 +0000 (15:28 +0900)]
[C-Api] update util functions
1. add new function to compare tensors metadata (type, dimension)
2. refactor function to create tensors data handle
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
Dongju Chae [Wed, 11 Dec 2019 01:15:27 +0000 (10:15 +0900)]
[FIX] Add a missing g_clear_error() in unittest_sink.cpp
This commit adds a missing g_clear_error() in unittest_sink.cpp.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Dongju Chae [Mon, 9 Dec 2019 11:17:11 +0000 (20:17 +0900)]
[TensorFilter] Add Add a callback of tensor filter for model update in runtime
This commit adds a callback, reloadModel(), of tensor filter for model
update in runtime. When the model property is updated, this callback
will be called if is-updatable is TRUE.
Also, it adds an event handler to update a model in the same pipeline.
On receiving a model update event, it calls set_property() of PROP_MODEL.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Dongju Chae [Mon, 9 Dec 2019 09:18:56 +0000 (18:18 +0900)]
[PROP/MODEL] Revise the model property to support multiple model files
This commit revises the model property to support multiple model files.
Also, tensor_filter_common.c now does not handle FW-specific model file
semantic (e.g., pred/init files).
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
MyungJoo Ham [Thu, 21 Nov 2019 09:35:40 +0000 (18:35 +0900)]
Tensor-src-tizensensor: fixes (style & build)
- Style fixes applied
- Fixed meson.build bug
- Fixed all the build errors and warnings of tizensensor.
v2
- Removed names from tensorinfo tempaltes.
- Use gst_tensor_get_dimension_string()
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Dongju Chae [Mon, 9 Dec 2019 07:42:22 +0000 (16:42 +0900)]
[DIST/DEBIAN] Add a missing debian package for nnstreamer-caffe2
This commit adds a missing debian package for nnstreamer-caffe2.
Note that it has the dependency on pytorch.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Chunseok Lee [Mon, 9 Dec 2019 08:19:03 +0000 (17:19 +0900)]
Remove nnfw default backend configuration
Now, nnfw will use available backend. Thus, no need to configure default backend manually.
**Self evaluation:**
Test on gbs build:
1. Build test: [*]Passed [ ]Failed []Skipped
2. Run test: [*]Passed [ ]Failed []Skipped
Signed-off-by: Chunseok Lee <chunseok.lee@samsung.com>
Dongju Chae [Mon, 9 Dec 2019 04:07:55 +0000 (13:07 +0900)]
[FIX] Fix a typo of nnstreamer-cpp package in debian/control
This commit fixes a typo of nnstreamer-cpp package in debian/control.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
MyungJoo Ham [Thu, 5 Dec 2019 07:43:14 +0000 (16:43 +0900)]
Doc: update component implementation status
The component descriptions were obsolete. Update them.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Wed, 13 Nov 2019 12:19:11 +0000 (21:19 +0900)]
Tensor-src-tizensensor: complete initial implementation.
All the required callbacks are implemented.
Next step: write test cases.
This addresses #1143
Changes in v2:
- use g_get_monotonic_time instead of clock_get_time
Suggested-by: Jaeyun Jung <jy1210.jung@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Jaeyun [Fri, 29 Nov 2019 08:12:54 +0000 (17:12 +0900)]
[CodeClean] cleanup duplicated and update testcases
1. remove duplicated condition and fix invalid comment
2. add tc to check tensor info
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
MyungJoo Ham [Wed, 13 Nov 2019 12:19:11 +0000 (21:19 +0900)]
Tensor-src-tizensensor: fill gst callbacks, Tizen sensor-fw APIs
- Added Tizen sensor-framework mechanisms (sensor-listeners)
- Added get/set/fixate caps callbacks of Gst.
- Revised a few data structures.
This addresses #1143
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Wed, 4 Dec 2019 01:48:37 +0000 (10:48 +0900)]
[Dist/Tizen] Fix integration error with libarmcl
With recent changes in the dependencies between
libarmcl and nnfw, nnfw incurs have-choice-for
errors for its users.
Fixing this requires some overlap periods for the
integration system; thus, we need this workaround for a while
until the OBS eliminates obsolete packages (libarmcl-release)
This is to be group-SR'ed with armcl.git in Tizen;
thus, this won't be able to pass CI-Tizen build until
everything gets fixed up.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Dongju Chae [Mon, 2 Dec 2019 10:19:10 +0000 (19:19 +0900)]
[PROP] Add new tensor filter prop to indicate a model is updatable
This commit adds new tensor filter property to indicate a given model
to a tensor filter is updatable or not. The default value is False.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Jaeyun [Fri, 29 Nov 2019 09:46:58 +0000 (18:46 +0900)]
[Transform] init 0 for mode enum-value
init 0 to register the enum-value for transform mode option.
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
Jaeyun [Thu, 28 Nov 2019 10:57:55 +0000 (19:57 +0900)]
[Common] condition to compare tensor info
1. validate tensor info when comparing the structure.
2. fix invalid doxygen tag.
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
Sangjung Woo [Mon, 2 Dec 2019 02:19:38 +0000 (11:19 +0900)]
[Docs] Update the link for Tizen
This patch updates the URL for Tizen API and its related link.
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
MyungJoo Ham [Tue, 12 Nov 2019 11:14:26 +0000 (20:14 +0900)]
Tensor-src-tizensensor: fill minor gst callbacks
- finalize, start, stop, is_seekable filled.
- Internal static functions are partially filled for future direction.
This should follow #1864 and addresses #1143
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Jaeyun [Thu, 28 Nov 2019 06:02:07 +0000 (15:02 +0900)]
[Doc] dimension in converter
update docs about the dimension of each media stream.
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
Jaeyun [Tue, 26 Nov 2019 03:45:18 +0000 (12:45 +0900)]
[CodeClean/Test] free log-file str
free log-file name str in clean-dev function.
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
Parichay Kapoor [Thu, 21 Nov 2019 01:21:26 +0000 (10:21 +0900)]
[IIO/test/coverity] Resolve coverity issues
Added more checks coherent with in #1859 and #1863 to another location
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Thu, 21 Nov 2019 01:44:21 +0000 (10:44 +0900)]
[tests/coverity] Fix coverity issues related to gtest main
Add try/catch for exceptions thrown by function calls in main bosy when using gtest
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Wook Song [Thu, 7 Nov 2019 06:46:55 +0000 (15:46 +0900)]
[Dist/Tizen] Enable nnstreamer-ncsdk2
This patch enables the tensor filter extension for Intel Movidius Neural
Compute stick SDK2 (NCSDK2) in Tizen.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Wook Song [Thu, 7 Nov 2019 04:49:52 +0000 (13:49 +0900)]
[Ext/Filter/Meson/MVNC] Use functions added after 0.44 and 0.47
As the minimum version required is changed to 0.50.0, this patch
modifies the meson build scriptlet for the MVNC tensor_filter extension
to use functions such as warning() and check_header() added after 0.44
and 0.47, respectively, as well.
Signed-off-by: Wook Song <wook16.song@samsung.com>
MyungJoo Ham [Tue, 12 Nov 2019 10:30:27 +0000 (19:30 +0900)]
Tensor-src-tizensensor: add get/set properties
This adds get/set property methods for tizen sensor extension plugin.
This should follow #1857 and addresses #1143
Changes in v2:
- As suggested by @kparichay, state rollbacks are added
- Do not reconfigure if it's not configured.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Tue, 19 Nov 2019 06:19:24 +0000 (15:19 +0900)]
[CAPI] Add enum for incoming NPU hardware
We will be supporting new NPU hardware along with
its userspace libraries.
Prepare enum spaces for them for future development.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Jaeyun [Mon, 18 Nov 2019 11:26:59 +0000 (20:26 +0900)]
[Test] dimension in testcases
clearly denotes the dimension of in/out tensor in testcases.
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>