platform/upstream/nnstreamer.git
4 years ago[Test] add new tc for single-shot property
Jaeyun [Fri, 7 Feb 2020 09:15:58 +0000 (18:15 +0900)]
[Test] add new tc for single-shot property

add testcases to validate set/get property in single-shot api.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Api/Single] add new function about property
Jaeyun [Thu, 6 Feb 2020 04:57:58 +0000 (13:57 +0900)]
[Api/Single] add new function about property

ACR required.
Add new function to set/get the property of tensor-filter in single-shot.

With this function, we can support the tensor layout in single-shot instance.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Api] code clean
Jaeyun [Fri, 7 Feb 2020 09:10:11 +0000 (18:10 +0900)]
[Api] code clean

1. add internal functions for complexity.
2. return proper error code in single-shot function.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years agoFix/Coverity/1123913,1123863 : Handle thrown exception
gichan-jang [Tue, 11 Feb 2020 04:21:59 +0000 (13:21 +0900)]
Fix/Coverity/1123913,1123863 : Handle thrown exception
Fix to catch exception from GTest
Coverity CID : 1123913, 1123863 and potential error code

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years agoFix/Coverity/1123652/1123668 : Handle thrown exception
gichan-jang [Tue, 11 Feb 2020 02:31:27 +0000 (11:31 +0900)]
Fix/Coverity/1123652/1123668 : Handle thrown exception
Fix to catch exception from GTest
Coverity CID : 1123652, 1123668

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[C-Api] add function to get subplugin name accepted/tizen/unified/20200211.132112 submit/tizen/20200211.034316
Jaeyun [Mon, 10 Feb 2020 07:37:38 +0000 (16:37 +0900)]
[C-Api] add function to get subplugin name

Add new function to get sub-plugin name and conditions to validate the nnfw is available.

TODO : add condition to check the nnfw availability.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[single/coverity] Coverity fix
Parichay Kapoor [Mon, 10 Feb 2020 08:10:48 +0000 (17:10 +0900)]
[single/coverity] Coverity fix

Added coverity fix of checking return value
In ml_single_set_info_in_handle: Value returned from a function is not checked for errors before being used (CWE-252)

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[single/coverity] Fix coverity issue
Parichay Kapoor [Mon, 10 Feb 2020 06:01:32 +0000 (15:01 +0900)]
[single/coverity] Fix coverity issue

Fix coverity issue CWE-416
Issue: In ml_single_set_info_in_handle: A pointer to freed memory is dereferenced, used as a function argument, or otherwise used

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years agoSubplugin infra: dlclose & free handles at exit
MyungJoo Ham [Tue, 21 Jan 2020 01:17:58 +0000 (10:17 +0900)]
Subplugin infra: dlclose & free handles at exit

We need to hold ALL handles if the pipeline is not closed.
However, after the pipeline is closed, all the handles must be
dlclosed; otherwise, the application may hold unnecessary
resources during the execution.

Changes in v2:
- Use g_ptr_array instead of garray.
Changes in v3:
- Added workaround for dlclose-racing bug of GLIBC 2.23 (Ubuntu 16.04)

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years agoCoverity/1123747/1123767/1123869: Stack Size Limit
MyungJoo Ham [Mon, 10 Feb 2020 08:00:36 +0000 (17:00 +0900)]
Coverity/1123747/1123767/1123869: Stack Size Limit

Coverity says not to use stack variable larger than 10kB.
Move verify_data data to global so that it does not
consume the stack.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[build/tizen] Identify build failure correctly
Parichay Kapoor [Fri, 7 Feb 2020 09:03:29 +0000 (18:03 +0900)]
[build/tizen] Identify build failure correctly

Identify the build failures correctly
Also disable the problematic unit-test of nnfw
This resolves #2081

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[spec] spec file cleanup
Parichay Kapoor [Fri, 7 Feb 2020 09:06:24 +0000 (18:06 +0900)]
[spec] spec file cleanup

Avoid running tests multiple times
More cleanup also added

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[tests] Clean up files after tests
Parichay Kapoor [Thu, 6 Feb 2020 04:50:41 +0000 (13:50 +0900)]
[tests] Clean up files after tests

Clean up files created during tests with ssat

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[Tests/Filter/MvNCSDK2] Add failure test cases
Wook Song [Wed, 29 Jan 2020 05:54:34 +0000 (14:54 +0900)]
[Tests/Filter/MvNCSDK2] Add failure test cases

This patch adds failure test cases, which are based on the normal
pipeline launch test case.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Tests/Filter/MvNCSDK2] Update the helper class to test failure cases
Wook Song [Wed, 29 Jan 2020 05:38:42 +0000 (14:38 +0900)]
[Tests/Filter/MvNCSDK2] Update the helper class to test failure cases

This patch updates the helper class so that testing failure cases are
supported.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Dist/Tizen] Enable unit testing for mvncsdk2 tensor filter
Wook Song [Tue, 28 Jan 2020 00:06:36 +0000 (09:06 +0900)]
[Dist/Tizen] Enable unit testing for mvncsdk2 tensor filter

Unit testing for mvncsdk2 tensor filter is enabled by default.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Tests/Filter/OpenVino] Add test cases for utility methods
Wook Song [Wed, 5 Feb 2020 06:10:56 +0000 (15:10 +0900)]
[Tests/Filter/OpenVino] Add test cases for utility methods

This patch adds unit test cases for utility member methods of the
OpenVino Tensor Filter class.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Tests/Filter/OpenVino] Add negative cases for getIn/OutputDimension ()
Wook Song [Wed, 5 Feb 2020 05:14:55 +0000 (14:14 +0900)]
[Tests/Filter/OpenVino] Add negative cases for getIn/OutputDimension ()

Negative test cases for the getInputDimension and getOutputDimension
callbacks are added.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Tests/Filter/OpenVino] Add test cases for getInput/OutputDimension
Wook Song [Tue, 4 Feb 2020 03:41:22 +0000 (12:41 +0900)]
[Tests/Filter/OpenVino] Add test cases for getInput/OutputDimension

This patch adds test cases for the implementation of the callbacks,
getInputDimension and getOutputDimension.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Api/CodeClean] prepare next acr
Jaeyun [Wed, 5 Feb 2020 08:27:39 +0000 (17:27 +0900)]
[Api/CodeClean] prepare next acr

Codeclean to prepare next ACR, remove unnecessary function definition.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years agoFix/Coverity/265573: Handle thrown exceptions
MyungJoo Ham [Thu, 6 Feb 2020 02:09:35 +0000 (11:09 +0900)]
Fix/Coverity/265573: Handle thrown exceptions

GTest APIs may throw exceptions. Handle them.
Coverity CID 265573: Error handling Issues (UNCAUGHT_EXCEPT)
/tests/cpp_methods/unittest_cpp_methods.cc: 292 in main()

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Tests/Filter/OpenVino] Add basic test cases for open/close callbacks
Wook Song [Mon, 3 Feb 2020 05:41:08 +0000 (14:41 +0900)]
[Tests/Filter/OpenVino] Add basic test cases for open/close callbacks

This patch adds basic test cases for the open and close callbacks in the
openvino tensor_filter.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Tests/Models] Add mobinet_v2 model files generated by openvino toolkit
Wook Song [Mon, 3 Feb 2020 05:38:54 +0000 (14:38 +0900)]
[Tests/Models] Add mobinet_v2 model files generated by openvino toolkit

This patch adds MobileNet V2 model files generated by model_optimizer
provided by the openvino toolkit.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Ext/Filter/Meson] Add a dependency object for openvino test cases
Wook Song [Mon, 3 Feb 2020 05:29:12 +0000 (14:29 +0900)]
[Ext/Filter/Meson] Add a dependency object for openvino test cases

This patch updates the meson build script in the external tensor_filters
to provide an internal dependency on the openvino tensor filter to the
test cases for it.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Ext/Filter/OpenVino] Put the class definition in a new .hh file
Wook Song [Thu, 30 Jan 2020 05:20:51 +0000 (14:20 +0900)]
[Ext/Filter/OpenVino] Put the class definition in a new .hh file

This patch puts the class definition of TensorFilterOpenVino in the
header file, newly created, instead of the existing .cc file so that
test cases for the OpenVino filter could exploit the
TensorFilterOpenVino class.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years agoStart version 1.3.1 accepted/tizen/unified/20200205.125242 submit/tizen/20200205.074315
MyungJoo Ham [Tue, 28 Jan 2020 11:13:19 +0000 (20:13 +0900)]
Start version 1.3.1

As we had dinner gathering last week,
I'm moving the version forward.

Added versioning script for future use.

Change at v2:
- Updated reversion.sh to update changelog of .spec file
Chnage at v3:
- Updated parameter checking & error messages.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[TestCoverage/Fix] Generate test coverage results in gcc-9 env. v1.3.0
Dongju Chae [Mon, 3 Feb 2020 11:36:04 +0000 (20:36 +0900)]
[TestCoverage/Fix] Generate test coverage results in gcc-9 env.

This commit generates test coverage results in gcc-9 env.
But, it requires the latest version of lcov, and some perl modules.
So, this should be done only in CI servers that can hold cached rpm
files.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[tensor_filter] Unused variable bug resolve
Parichay Kapoor [Fri, 31 Jan 2020 12:01:21 +0000 (21:01 +0900)]
[tensor_filter] Unused variable bug resolve

Resolve bug related to unused variable
If DBG is defined, this error is raised as the variable is only used
for check silent property when DBG is not defined

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[Dist/Tizen] Enable unit testing for mvncsdk2 tensor filter
Wook Song [Tue, 28 Jan 2020 00:06:36 +0000 (09:06 +0900)]
[Dist/Tizen] Enable unit testing for mvncsdk2 tensor filter

Unit testing for mvncsdk2 tensor filter is enabled by default.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Tests/Filter/MvNCSDK2] Enable unit testing for the mvncsdk filter
Wook Song [Mon, 27 Jan 2020 23:48:09 +0000 (08:48 +0900)]
[Tests/Filter/MvNCSDK2] Enable unit testing for the mvncsdk filter

This patch updates the meson build scripts to enable unit testing for
the mvncsdk tensor filter.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Tests/Models] Add Google LeNet model pre-compiled using NCSDK2
Wook Song [Tue, 28 Jan 2020 00:45:52 +0000 (09:45 +0900)]
[Tests/Models] Add Google LeNet model pre-compiled using NCSDK2

This patch adds Google LeNet model pre-compiled using NCSDK2 and its
label file to the test models directory.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Tests/Filter/MvNCSDK2] Add a basic test case
Wook Song [Mon, 27 Jan 2020 23:43:41 +0000 (08:43 +0900)]
[Tests/Filter/MvNCSDK2] Add a basic test case

This patch adds a basic test case for the most basic execution flow
testing.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Tests/Filter/MvNCSDK2] Update meson.build to generate mock library
Wook Song [Mon, 27 Jan 2020 23:34:31 +0000 (08:34 +0900)]
[Tests/Filter/MvNCSDK2] Update meson.build to generate mock library

This patch updates the meson build script to generate a dummy shared
library that mocks libmvnc.so.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Tests/Filter/MvNCSDK2] Add a helper class for unit testing
Wook Song [Mon, 27 Jan 2020 23:12:01 +0000 (08:12 +0900)]
[Tests/Filter/MvNCSDK2] Add a helper class for unit testing

This patch adds a helper class for unit testing of the mvncsdk2 tensor
filter.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[single/caffe] Enable armnn in single-shot API
Parichay Kapoor [Wed, 29 Jan 2020 10:32:05 +0000 (19:32 +0900)]
[single/caffe] Enable armnn in single-shot API

Enable support armnn for in single-shot API
Added test with caffe and tflite models

resolves #1817

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[tensor_filter] Add unittest for data layout
Parichay Kapoor [Wed, 29 Jan 2020 08:06:04 +0000 (17:06 +0900)]
[tensor_filter] Add unittest for data layout

Add unittests for added data layout property

V2:
Data layout can now be changed until the framework is opened
Once framwork is opened, updating the layouts will be supported later

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[tensor_filter] Support data layout for tensor
Parichay Kapoor [Wed, 8 Jan 2020 05:51:10 +0000 (14:51 +0900)]
[tensor_filter] Support data layout for tensor

Data layout added for tensor_filter in GstTensorFilterProperties
Four data layouts are supported
- ANY - unknown does not matter
- NHWC - referred as channels last
- NCHW - referred as channels first
- none - doesnt fit with above options
These data layouts can be different for each other/tensor in other/tensors
Layout is taken input as a string, and then parsed for each tensor
This layout is stored in tensor_filter element itself to be used by its subplugins, and not passed to other elements in the pipeline

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[Filter/MvNCSDK] Revise error handling for unsupported API version
Wook Song [Wed, 29 Jan 2020 02:36:07 +0000 (11:36 +0900)]
[Filter/MvNCSDK] Revise error handling for unsupported API version

This patch revises the error handling mechanism for the API version of
MvNCSDK not supported by NNStreamer.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Fix] Skip duplicated paths from multiple conf sources
Dongju Chae [Thu, 23 Jan 2020 08:16:07 +0000 (17:16 +0900)]
[Fix] Skip duplicated paths from multiple conf sources

This commit skips duplicated paths from multiple conf sources.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years agoStyle/C++: .clang-format suggestion for C++ code.
MyungJoo Ham [Wed, 22 Jan 2020 04:09:55 +0000 (13:09 +0900)]
Style/C++: .clang-format suggestion for C++ code.

This is supposed to be applied to .cc and .hh files.

This prepares #2044

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years agoStyle/C++: use .hh extensions for C++ headers
MyungJoo Ham [Tue, 21 Jan 2020 06:13:43 +0000 (15:13 +0900)]
Style/C++: use .hh extensions for C++ headers

Let's C++ headers not comaptible with C use
.hh as their extensions.

This prepares #2044

Changes in v2
- Applied changes in the master branch.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Common/Android] add version info
Jaeyun [Mon, 20 Jan 2020 10:14:50 +0000 (19:14 +0900)]
[Common/Android] add version info

1. add new function to get the NNStreamer version string.
2. get nnstreamer version string in Android method.
3. print log about version info when initializing the nnstreamer.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
4 years ago[Spec] Minor bug fix in spec
Parichay Kapoor [Fri, 31 Jan 2020 11:38:36 +0000 (20:38 +0900)]
[Spec] Minor bug fix in spec

Add minor bug fix in spec

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[Test/Cpp] cleanup build script
Jaeyun [Thu, 30 Jan 2020 06:28:39 +0000 (15:28 +0900)]
[Test/Cpp] cleanup build script

prevent build warning with googletest static library.
1. separate cpp sub-plugin and gtest
2. remove unnecessary dependency in meson

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
4 years ago[Transform] copy tensor-info for negotiation
Jaeyun [Thu, 23 Jan 2020 08:17:21 +0000 (17:17 +0900)]
[Transform] copy tensor-info for negotiation

For caps negotiation, copy tensor info first and update necessary meta.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
4 years ago[Fix] add type checking for gst value in tensor_converter.c
Dongju Chae [Thu, 30 Jan 2020 04:55:55 +0000 (13:55 +0900)]
[Fix] add type checking for gst value in tensor_converter.c

This commit adds type checking for the gst value, supported_formats.
When an unsupported colorspace is used, gst_value_list_get_size() has
generated unnecessary warnings.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Test] input memory to invoke filter-plugins
Jaeyun [Mon, 20 Jan 2020 09:34:05 +0000 (18:34 +0900)]
[Test] input memory to invoke filter-plugins

Set max array for input and output tensor-memory to prevent out-of-index exception.

Invoke-callback requires the array of tensor memories.
Now this does not make an error, but later if we try to generate another testcase with multi-tensors, it needs to set the array of tensor data.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
4 years ago[Build/Android] remove unnecessary log to run android
Jaeyun [Thu, 23 Jan 2020 08:00:37 +0000 (17:00 +0900)]
[Build/Android] remove unnecessary log to run android

Currently android library does not use the configuration file.
Check null string before validating the conf file.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
4 years ago[Build] default build option of python
Jaeyun [Thu, 23 Jan 2020 07:54:05 +0000 (16:54 +0900)]
[Build] default build option of python

disable default build option of python.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
4 years ago[Test] Rename internal API: getTempFilename accepted/tizen/unified/20200130.214603 submit/tizen/20200128.105741
MyungJoo Ham [Mon, 20 Jan 2020 09:34:28 +0000 (18:34 +0900)]
[Test] Rename internal API: getTempFilename

Rename _get_temp_filename --> getTempFilename as it has
become an internal API.

Suggested-by: Dongju Chae <dongju.chae@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years agoTest/C++-custom-filter: Add unit test cases.
MyungJoo Ham [Fri, 17 Jan 2020 03:46:42 +0000 (12:46 +0900)]
Test/C++-custom-filter: Add unit test cases.

Unit test cases of C++ custom filters

Positive cases: 3
Negative cases: 6

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Test] Add internal APIs for unit tests
MyungJoo Ham [Fri, 17 Jan 2020 03:44:42 +0000 (12:44 +0900)]
[Test] Add internal APIs for unit tests

1. Pipeline status waiting loop
2. Get temp filename

Those functions are from unittest_sink, which will be used
by other unittest cases (c++ custom filter test cases)

Chnages v2: updated meson script for Ubuntu 16.04 errors.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Split] Fix a build warning incurred by a may-be-uninitialized variable
Wook Song [Thu, 23 Jan 2020 04:24:31 +0000 (13:24 +0900)]
[Split] Fix a build warning incurred by a may-be-uninitialized variable

This patch fixes a build warning incurred by a may-be-uninitialized
variable.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years agoFix: load the configuration even if there is no .ini file
MyungJoo Ham [Tue, 21 Jan 2020 02:22:58 +0000 (11:22 +0900)]
Fix: load the configuration even if there is no .ini file

Even if there is no .ini file, we need to load up the
subplugins from the default hardcoded paths or
the paths given with envvars.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Tests/Filter/EdgeTPU] Revise pipeline strings
Wook Song [Thu, 23 Jan 2020 05:24:44 +0000 (14:24 +0900)]
[Tests/Filter/EdgeTPU] Revise pipeline strings

'videoformat' in the pipeline strings seems to be an invalid or illegal
GST element so that it is replaced with 'videoscale'.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Android] custom-filter and amcsrc for native build
Jaeyun [Tue, 14 Jan 2020 11:31:28 +0000 (20:31 +0900)]
[Android] custom-filter and amcsrc for native build

register custom-filter and amcsrc for native build.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
4 years ago[Meson] Make 'enable-edgetpu' depend on 'enable-tensorflow-lite'
Wook Song [Thu, 16 Jan 2020 04:40:53 +0000 (13:40 +0900)]
[Meson] Make 'enable-edgetpu' depend on 'enable-tensorflow-lite'

In order to handle the case that 'enable-edgetpu' is set to 'true',
meson requires a variable, 'tflite dep', which is a declaration of a
dependency on TensorFlow-Lite. Therefore, the 'enable-edgetpu' option
alone cannot properly set the feature. This patch fixes this issue.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Filter/OpenVino] Keep consistency in the private member variable names
Wook Song [Mon, 13 Jan 2020 06:39:39 +0000 (15:39 +0900)]
[Filter/OpenVino] Keep consistency in the private member variable names

In order to improve the readability of code, this patch makes the names
of the private member variables use a prefix, '_', to keep consistency.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Filter/OpenVino] Support the MYRIAD plugin
Wook Song [Mon, 13 Jan 2020 06:22:46 +0000 (15:22 +0900)]
[Filter/OpenVino] Support the MYRIAD plugin

This patch enables the MYRIAD plugin of the OpenVino framework in order
to support Movidious Neural Compute Stick 1 and 2.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Filter/OpenVino] bugfix when checking that the fw is already opened
Wook Song [Mon, 13 Jan 2020 05:38:25 +0000 (14:38 +0900)]
[Filter/OpenVino] bugfix when checking that the fw is already opened

This patch fixes a bug at the checking that the sub-plugin framework is
already opend by adding a missing mandatory condition.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Filter/OpenVino] Revise mechanism for setting up 'accelerator'
Wook Song [Mon, 13 Jan 2020 02:19:35 +0000 (11:19 +0900)]
[Filter/OpenVino] Revise mechanism for setting up 'accelerator'

This patch revices the existing mechanism for setting up the
acceleration device.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Filter/OpenVino] Correct typo in an error message
Wook Song [Sun, 12 Jan 2020 23:57:48 +0000 (08:57 +0900)]
[Filter/OpenVino] Correct typo in an error message

This patch corrects a typo in an error message.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[pytorch] Enable setting accelerators
Parichay Kapoor [Thu, 9 Jan 2020 22:57:46 +0000 (07:57 +0900)]
[pytorch] Enable setting accelerators

Enabled setting of accelerators
Enabled getting supported accelerators

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[Filter/C++] Add the basic test case
MyungJoo Ham [Wed, 15 Jan 2020 05:40:47 +0000 (14:40 +0900)]
[Filter/C++] Add the basic test case

The most basic execution flow is tested.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Filter/C++] Complete implementation of C++ filter.
MyungJoo Ham [Tue, 14 Jan 2020 11:14:20 +0000 (20:14 +0900)]
[Filter/C++] Complete implementation of C++ filter.

With C++ filter, application authors may supply C++ classes as tensor-filters.
They may provide C++ classes as an independent .so files for other application
authors as well.

v2: fixed build errors.
v3: added "prop" property.

@TODO: test & test
@TODO: usage manual

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years agoMeson: setup configure values before executing subdir
MyungJoo Ham [Wed, 15 Jan 2020 05:36:52 +0000 (14:36 +0900)]
Meson: setup configure values before executing subdir

We now have a subdir that requires to read the configuration values.
Thus, configure values before calling subdirs.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Api] typo correction
Jaeyun [Mon, 13 Jan 2020 04:24:14 +0000 (13:24 +0900)]
[Api] typo correction

typo correction in C-Api headers.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
4 years ago[Meson] Disable external filters for pytorch, caffe2, tf-lite by default
Wook Song [Thu, 16 Jan 2020 03:25:44 +0000 (12:25 +0900)]
[Meson] Disable external filters for pytorch, caffe2, tf-lite by default

This patch disables by default the tensor filters to support external
neural network frameworks such as pytorch, caffe2, and tensorflow-lite in
the meson_options.txt file.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Dist] Use explicit options to enable external filters
Wook Song [Thu, 16 Jan 2020 02:22:38 +0000 (11:22 +0900)]
[Dist] Use explicit options to enable external filters

This patch uses explicit options to enable or disable external tensor
filters for tensorflow-lite, caffe2, and pytorch, which are enabled by
default in the meson_options.txt file.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[armnn] Add caffe support with armnn
Parichay Kapoor [Tue, 31 Dec 2019 10:58:46 +0000 (19:58 +0900)]
[armnn] Add caffe support with armnn

Add caffe support with armnn
Add corresponding unit-test
Tested with CPU and GPU backend on the device

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[test/ext] Add condition for function to exist
Parichay Kapoor [Tue, 24 Dec 2019 08:31:26 +0000 (17:31 +0900)]
[test/ext] Add condition for function to exist

Verify that the function is available before running tests for that function
Added the above verification for getInputDimension and getOutputDimension
Further enhanced invoke test to run successfully if the getDimension exists

V2:
Added gst_tensors_info_free to catch memleak of tensor_info->name

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[nnfw] Verify input model filename
Parichay Kapoor [Wed, 8 Jan 2020 08:18:10 +0000 (17:18 +0900)]
[nnfw] Verify input model filename

Added verification of input model filename
This is performed by parsing the metadata/MANIFEST file to be provided with the model
The first model in the list of models should be the model to be run by nnfw
json-glib is added as dependency to allow json parsing
Corresponding unittest is also added

Resolve: #1981

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[Test] stream testcase with multiple custom-filters
Jaeyun [Tue, 14 Jan 2020 08:30:56 +0000 (17:30 +0900)]
[Test] stream testcase with multiple custom-filters

add testcase with multiple custom filters.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
4 years ago[Android/AMC] fix build warning
Jaeyun [Tue, 14 Jan 2020 11:23:01 +0000 (20:23 +0900)]
[Android/AMC] fix build warning

fix build warning in android amc src.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
4 years ago[Spec] Update version 1.2.0 to 1.3.0 of rpm spec
Yongjoo Ahn [Thu, 16 Jan 2020 00:17:23 +0000 (09:17 +0900)]
[Spec] Update version 1.2.0 to 1.3.0 of rpm spec

Resolve version mismatch of .spec with current dev version 1.3.0

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
4 years ago[Tests/FilterExtCommon] Fix test case failure
Wook Song [Tue, 14 Jan 2020 02:35:11 +0000 (11:35 +0900)]
[Tests/FilterExtCommon] Fix test case failure

This patch fixes failure in the test cases generated from
unittest_tizen_template.cc.in. This is a bug of [1]

[1] cbb65b01278b39789e69c6de888b3e0e78b3e5db

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Spec] cleanup build option
Jaeyun [Fri, 10 Jan 2020 09:34:31 +0000 (18:34 +0900)]
[Spec] cleanup build option

move to proper build option and cleanup unnecessary option.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
4 years ago[CodeClean] remove unnecessary code
Jaeyun [Fri, 10 Jan 2020 09:26:17 +0000 (18:26 +0900)]
[CodeClean] remove unnecessary code

Now single API does not use the pipeline. Remove unnecessary function to get caps from tensor-info.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
4 years ago[common] Added proper GstCaps framerate comparison
Parichay Kapoor [Thu, 9 Jan 2020 12:19:03 +0000 (21:19 +0900)]
[common] Added proper GstCaps framerate comparison

Added proper comparison of GstCaps framerate (1/2 == 2/4)
Added corresponding unittest cases

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[Tests/FilterExtCommon] Generate test cases using meson
Wook Song [Fri, 10 Jan 2020 11:08:01 +0000 (20:08 +0900)]
[Tests/FilterExtCommon] Generate test cases using meson

In order to generate test cases from the template file to which the most
recent modification has been applied, this patch changes the approach
for the test case generation from the existing bash script to the meson
build script.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[CodeClean] fix coverity issue
Jaeyun [Mon, 13 Jan 2020 04:47:51 +0000 (13:47 +0900)]
[CodeClean] fix coverity issue

check exception case in testcases.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
4 years ago[Caffe2] Change how headers are included
HyoungJoo Ahn [Mon, 13 Jan 2020 05:17:15 +0000 (14:17 +0900)]
[Caffe2] Change how headers are included

The headers are not in this project. Though it does not occur errors, to prevent misunderstanding, it needs to be fixed.

Signed-off-by: HyoungJoo Ahn <hello.ahn@samsung.com>
4 years agoDocumentation Update of 2020.01
MyungJoo Ham [Fri, 10 Jan 2020 04:45:15 +0000 (13:45 +0900)]
Documentation Update of 2020.01

We have been progressed a lot. Update the documentation accordingly.

V2: fixed typos

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Ext/Filter/TFLite] Enable a TensorFilter's property, verify_model_path
Wook Song [Fri, 10 Jan 2020 07:03:39 +0000 (16:03 +0900)]
[Ext/Filter/TFLite] Enable a TensorFilter's property, verify_model_path

This patch enables a GstTensorFilter's property, verify_model_path,
which is newly added.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Filter/Common/Reload] Define the behavior for verify_model_path
Wook Song [Fri, 10 Jan 2020 04:57:42 +0000 (13:57 +0900)]
[Filter/Common/Reload] Define the behavior for verify_model_path

This patch defines the behaviour of reloading model files when the
verify_model_path is set to TRUE.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Tests/Script] Make the run_unittests_binaries script find executables
Wook Song [Fri, 10 Jan 2020 10:57:26 +0000 (19:57 +0900)]
[Tests/Script] Make the run_unittests_binaries script find executables

This patch makes the run_unittests_binaries script in ./packaging find
only executable files.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years agoREADME: update reviewers and project status
MyungJoo Ham [Thu, 9 Jan 2020 08:09:34 +0000 (17:09 +0900)]
README: update reviewers and project status

- Added the two new reviewers
- Added more info on the project status

V2: typo-fix and added an omitted item.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Tests/FilterExtCommon] hotfix: Fix build errors, dangling-else
Wook Song [Fri, 10 Jan 2020 10:11:55 +0000 (19:11 +0900)]
[Tests/FilterExtCommon] hotfix: Fix build errors, dangling-else

This patch fixes build errors related to 'dangling-else' (error:
suggest explicit braces to avoid ambiguous 'else') in
unittest_tizen_template.cc.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[tflite/bug] Set accelerator bug solve
Parichay Kapoor [Thu, 9 Jan 2020 23:32:09 +0000 (08:32 +0900)]
[tflite/bug] Set accelerator bug solve

Bug: Not setting accelerator ignored the use_nnapi configuration
This is resolved

Enable setting accelerator unittest non-tizen platforms as well

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[CodeClean] change file extension
Jaeyun [Thu, 9 Jan 2020 07:22:25 +0000 (16:22 +0900)]
[CodeClean] change file extension

1. change file extension to .cc in testcases
2. change path to generate ext-test files

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
4 years ago[Android] assertion to load conf file
Jaeyun [Thu, 9 Jan 2020 07:12:59 +0000 (16:12 +0900)]
[Android] assertion to load conf file

Now Android functions do not use the conf file, remove assertion to run Android library.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
4 years ago[Android/Test] testcases for updated API
Jaeyun [Tue, 31 Dec 2019 07:02:16 +0000 (16:02 +0900)]
[Android/Test] testcases for updated API

Add testcase for SNAP and updated Java API.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
4 years ago[Api/Android] support SNAP in Android API
Jaeyun [Tue, 31 Dec 2019 04:34:12 +0000 (13:34 +0900)]
[Api/Android] support SNAP in Android API

In Java APIs, handle multiple model files and custom option to support SNAP.
Define enum for supported NNFW and implement native functions.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
4 years ago[Api/CodeClean] function to create single handle
Jaeyun [Fri, 27 Dec 2019 04:21:47 +0000 (13:21 +0900)]
[Api/CodeClean] function to create single handle

To reduce complexity, add function to create and initialize the single-shot handle.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
4 years ago[C-Api] handle multi files and custom option
Jaeyun [Tue, 24 Dec 2019 11:36:10 +0000 (20:36 +0900)]
[C-Api] handle multi files and custom option

define struct to handle multiple model files and custom option string.
Prepare SNAP single-shot API.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
4 years ago[Api/CodeClean] macro to check nnfw
Jaeyun [Tue, 24 Dec 2019 11:28:56 +0000 (20:28 +0900)]
[Api/CodeClean] macro to check nnfw

1. define macro to check nnfw is available
2. update comment and code clean

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
4 years ago[python/ext] Added basic unittests for python
Parichay Kapoor [Tue, 24 Dec 2019 05:00:18 +0000 (14:00 +0900)]
[python/ext] Added basic unittests for python

- Python initialize and finalize is done once for the module rather than doing it per object
Doing initialization per object causes errors when importing modules
- Replaced Assert with appropriate error handing for python extension of tensor filter
- Added basic unittests for python which covers the failure cases

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[Filter] Add an option to centralize checking the path of model files
Wook Song [Mon, 6 Jan 2020 07:43:22 +0000 (16:43 +0900)]
[Filter] Add an option to centralize checking the path of model files

Currently, each sub-plugin of the tensor filter should check the
validity of the path of the model files. In general, it leads to
unnecessary code duplication. Moreover, sometimes those are not checked
at all. This patch adds an option to centralize checking the path of model
files so that each sub-plugin is in charge of the validity of model files
only when this option is set to FALSE.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago [TEST] Unit test case for NNFW ML-API
gichan-jang [Tue, 7 Jan 2020 08:16:28 +0000 (17:16 +0900)]
 [TEST] Unit test case for NNFW ML-API
Unit tests are added to verify NNFW with ML-API.
Detail of added test case is :
Test multidimensional input/output us supported in NNFW

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[nnfw] Support setInputDimension with nnfw
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>