platform/core/api/machine-learning.git
2 years agoC-API/Common: error reporting API implementation.
MyungJoo Ham [Mon, 25 Oct 2021 10:52:46 +0000 (19:52 +0900)]
C-API/Common: error reporting API implementation.

API implementation:
ml_error(), ml_strerror()

Internal interface for API implementation:
_ml_error_report()

TODO: apply _ prefix for all internal interfaces.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years agoC-API/Common: error reporting function skeleton.
MyungJoo Ham [Thu, 21 Oct 2021 08:21:03 +0000 (17:21 +0900)]
C-API/Common: error reporting function skeleton.

dlerror()-like function that can provide error descriptions and
strerror()-like function that provide general descriptions for error codes.

This is to review its format and behavior.
The contents and internal APIs for API implementation will
follow after this API is approved.

This addresses (starts addressing) https://github.com/nnstreamer/nnstreamer/issues/3528

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years ago[C/Inference] Refactoring C-API module relations.
MyungJoo Ham [Tue, 19 Oct 2021 09:54:21 +0000 (18:54 +0900)]
[C/Inference] Refactoring C-API module relations.

ML C-API interfaces and implementations are being refactored for better relations.

ml-common will be no longer depending on nnstreamer.

Then, in the future, nntrainer will be no longer depending on nnstreamer except for its nnstreamer-nntrainer subplugin.

1. Renamed headers and sources (except for Tizen Studio's files, which we need to tend later)
2. Refactored inter-file dependency and relations.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years ago[Headers] Fix missing include in ml-api-common
Jihoon Lee [Wed, 20 Oct 2021 04:59:31 +0000 (13:59 +0900)]
[Headers] Fix missing include in ml-api-common

As tensor data structure now being moved to ml-api-common.
`size_t` is now used in `int ml_tensors_info_get_tensor_size`.

Does including <stddef.h> here.

Please  refer to below error in http://nnstreamer.mooo.com/nntrainer/ci/repo-workers/pr-checker/1648-202110201315200.81315588951111-c03945380718edd44c6a19b56056dcf80a64636d/report/build_log_1648_android_error.txt

```
 error: unknown type name 'size_t'
int ml_tensors_info_get_tensor_size (ml_tensors_info_h info, int index, size_t *data_size);
```

Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
2 years ago[Common] refactor headers to clean up dependency
MyungJoo Ham [Mon, 18 Oct 2021 10:03:40 +0000 (19:03 +0900)]
[Common] refactor headers to clean up dependency

Data handling APIs are used by ML.training as well as ML.inference.
Move such APIs to common header.

TODO: Move implementation to another .c file so that
we can refactor subpackage dependencies, too.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years agoRelease of ML-API 1.8.0 accepted/tizen/6.5/unified/20211028.095631 accepted/tizen/unified/20211001.001315 submit/tizen/20210930.052115 submit/tizen_6.5/20211028.161801 tizen_6.5.m2_release
Gichan Jang [Fri, 24 Sep 2021 06:55:51 +0000 (15:55 +0900)]
Release of ML-API 1.8.0

 - Release of ML-API 1.8.0.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Single] Don't close single handle during invoke process
Gichan Jang [Fri, 24 Sep 2021 06:39:08 +0000 (15:39 +0900)]
[Single] Don't close single handle during invoke process

Don't close single handle during invoke process.
If single handle is released during invoke prcoess, an interpreter may
access invalid memory.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Coverage] Set coverage badge
Jihoon Lee [Thu, 16 Sep 2021 10:22:15 +0000 (19:22 +0900)]
[Coverage] Set coverage badge

This patch enables coverage badge. Behind the scene, daily coverage
check is enabled :)

**Self evaluation:**
1. Build test: [ ]Passed [ ]Failed [X]Skipped
2. Run test: [ ]Passed [ ]Failed [X]Skipped

Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
3 years ago[TEST] Add checking nnfw availability util accepted/tizen/unified/20210915.100116 submit/tizen/20210915.065224
gichan [Wed, 1 Sep 2021 10:05:50 +0000 (19:05 +0900)]
[TEST] Add checking nnfw availability util

Add checking nnfw availability util.

Signed-off-by: gichan <gichan2.jang@samsung.com>
3 years agoUnittest: data type consistency with nnstreamer/gstreamer
MyungJoo Ham [Fri, 6 Aug 2021 07:19:08 +0000 (16:19 +0900)]
Unittest: data type consistency with nnstreamer/gstreamer

There are type re-definitions in C ML-API, which
should inherit values from nnstreamer and gstreamer.
Add unittests that ensures the consistency.

Fixes https://github.com/nnstreamer/nnstreamer/issues/2587

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years agonnfw_ver to 1.17.0
Chunseok Lee [Thu, 26 Aug 2021 08:06:25 +0000 (17:06 +0900)]
nnfw_ver to 1.17.0

nnfw(ONE) v1.17.0 is released. This will bump up nnfw version to 1.17.0

Signed-off-by: Chunseok Lee <chunseok.lee@samsung.com>
3 years ago[C-Api] function to check hw availability accepted/tizen/unified/20210826.123542 submit/tizen/20210826.061507
Jaeyun [Fri, 20 Aug 2021 06:35:39 +0000 (15:35 +0900)]
[C-Api] function to check hw availability

Add new function to check hw availability with custom option string.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Android/Build] remove release flag
Jaeyun [Wed, 18 Aug 2021 10:04:21 +0000 (19:04 +0900)]
[Android/Build] remove release flag

Remove release flag and related source.
Uploading library to jcenter is not available anymore.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[C-API] Change src-callback name
gichan [Tue, 17 Aug 2021 01:45:07 +0000 (10:45 +0900)]
[C-API] Change src-callback name

Change src-callback function name.
 - Names of callback function types should have the '_cb' suffix.
 - A modile providing callbacks called on events should support exactly one of two registration schemes.
   > single callback registration: {module}_set_{details}_cb

Signed-off-by: gichan <gichan2.jang@samsung.com>
3 years ago[Android/Build] dependency to glib
Jaeyun [Fri, 13 Aug 2021 10:12:05 +0000 (19:12 +0900)]
[Android/Build] dependency to glib

clearly denote dependency to glib in android build.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[C-API] Use ML_NNFW_TYPE_TRIX_ENGINE instead of ML_NNFW_TYPE_TRIx_ENGINE accepted/tizen/unified/20210810.135355 submit/tizen/20210809.021120
Sangjung Woo [Fri, 6 Aug 2021 06:51:40 +0000 (15:51 +0900)]
[C-API] Use ML_NNFW_TYPE_TRIX_ENGINE instead of ML_NNFW_TYPE_TRIx_ENGINE

According to the Tizen naming convention, the names of the entities must
be composed of upper case letters. This patch fixes this issue.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[Test/C-Api] src-callback test submit/tizen/20210806.045403
Jaeyun [Wed, 4 Aug 2021 10:05:07 +0000 (19:05 +0900)]
[Test/C-Api] src-callback test

Add new testcases for src callback.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[C-API] Rename srnpu to trix-engine
Sangjung Woo [Wed, 4 Aug 2021 05:52:41 +0000 (14:52 +0900)]
[C-API] Rename srnpu to trix-engine

The patch updates the name 'srnpu' to 'trix-engine'.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[Test] update flex-tensor caps
Jaeyun [Mon, 5 Jul 2021 10:11:24 +0000 (19:11 +0900)]
[Test] update flex-tensor caps

Update caps for flexible tensor, old mime type for flex-tensor is removed.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[C-Api] implement src callback
Jaeyun [Tue, 3 Aug 2021 03:26:46 +0000 (12:26 +0900)]
[C-Api] implement src callback

Implement new API - appsrc callbacks.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Android] Test SNAP with tensorflow lite model
Yongjoo Ahn [Mon, 2 Aug 2021 11:11:49 +0000 (20:11 +0900)]
[Android] Test SNAP with tensorflow lite model

- SNAP v3.0 supports tensorflow lite model.
- Add pipeline and singleshot test using it.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[C-Api] framework priority from conf submit/tizen/20210723.070532
Jaeyun [Mon, 19 Jul 2021 06:51:21 +0000 (15:51 +0900)]
[C-Api] framework priority from conf

Load framework priority from nnstreamer conf file.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[C-Api] remove warning while checking framework
Jaeyun [Mon, 19 Jul 2021 05:05:49 +0000 (14:05 +0900)]
[C-Api] remove warning while checking framework

When checking fw with model files is failed, it returns null and this will print warning message even if this works properly.
Update macro to not print this message. (requested from VD)

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[TEST] Add tensor clone test
Gichan Jang [Tue, 13 Jul 2021 05:49:10 +0000 (14:49 +0900)]
[TEST] Add tensor clone test

 - Add tensor clone test

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[debian] Add jni debian package accepted/tizen/unified/20210702.133345 accepted/tizen/unified/20210714.014156 submit/tizen/20210702.044746 submit/tizen/20210713.072613
Gichan Jang [Wed, 30 Jun 2021 05:46:29 +0000 (14:46 +0900)]
[debian] Add jni debian package

Add jni wrapper debian package.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[JNI] remove unnecessary feature in native
Jaeyun [Wed, 30 Jun 2021 07:58:19 +0000 (16:58 +0900)]
[JNI] remove unnecessary feature in native

We should call subplugin registration only on Android.
Remove unnecessary feature in native code.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[C-Api/Util] Add ML_NNFW_HW_NPU_SLSI case to converting function
Sangjung Woo [Tue, 29 Jun 2021 07:34:40 +0000 (16:34 +0900)]
[C-Api/Util] Add ML_NNFW_HW_NPU_SLSI case to converting function

To support VD product, this patch adds the ML_NNFW_HW_NPU_SLSI case
to ml_nnfw_to_accl_hw() function.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[Build/Java] add script to build jar
Jaeyun [Thu, 24 Jun 2021 05:44:49 +0000 (14:44 +0900)]
[Build/Java] add script to build jar

Add new script to build java library.
To prevent build error, mark prefix in java files and change it while building the library.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Java] prepare ubuntu build
Jaeyun [Tue, 22 Jun 2021 10:42:07 +0000 (19:42 +0900)]
[Java] prepare ubuntu build

Prepare Java API on ubuntu, add feature for android and remove android annotation.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[C-Api] handle flexible tensor
Jaeyun [Fri, 23 Apr 2021 11:17:35 +0000 (20:17 +0900)]
[C-Api] handle flexible tensor

In flexible tensor stream, sink and src handle cannot set exact tensor info from pad caps.
To handle flex-tensor, ignore tensor info while configuring the element handle.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Android/Build] check target abi
Jaeyun [Wed, 23 Jun 2021 07:00:17 +0000 (16:00 +0900)]
[Android/Build] check target abi

Check target abi when build android library, and set dir name to get gstreamer prebuilt libs.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Java] build JNI wrapper
Jaeyun [Wed, 23 Jun 2021 06:11:24 +0000 (15:11 +0900)]
[Java] build JNI wrapper

Build JNI wrapper using meson.
The source for JNI wrapper is same with Android native code.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Api/TensorsData] hold tensors info in data handle
Jaeyun [Wed, 9 Jun 2021 05:11:53 +0000 (14:11 +0900)]
[Api/TensorsData] hold tensors info in data handle

Clone tensors-info handle and hold it in tensors-data handle.
Also, pass info handle to parse data object in Android native build.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[C-Api/Util] remove duplicated source
Jaeyun [Fri, 28 May 2021 07:29:40 +0000 (16:29 +0900)]
[C-Api/Util] remove duplicated source

Add private util function and remove duplicated source.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Android] min sdk version to 24
Jaeyun [Wed, 23 Jun 2021 05:20:03 +0000 (14:20 +0900)]
[Android] min sdk version to 24

For android release, set minimum sdk version to 24.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Data] Unlock data and remove unreachable code
Gichan Jang [Wed, 23 Jun 2021 06:02:00 +0000 (15:02 +0900)]
[Data] Unlock data and remove unreachable code

 - Unlock data when policy neither ML_PIPELINE_BUF_POLICY_AUTO_FREE nor
ML_PIPELINE_BUF_POLICY_DO_NOT_FREE.
 - Remove unreachable code

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Android] nnfw feature
Jaeyun [Mon, 21 Jun 2021 10:47:29 +0000 (19:47 +0900)]
[Android] nnfw feature

Change nnfw feature definition in android build, same to c-api define.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[android/build] Fix android build script for wget accepted/tizen/unified/20210621.123012 submit/tizen/20210621.072743
Yongjoo Ahn [Fri, 18 Jun 2021 07:59:10 +0000 (16:59 +0900)]
[android/build] Fix android build script for wget

- Fix wget urls to support git lfs files

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[capi] Update on thread safety for ml_tensors_info
Parichay Kapoor [Mon, 14 Jun 2021 07:01:21 +0000 (16:01 +0900)]
[capi] Update on thread safety for ml_tensors_info

This patch fixes the case of Time of Check Time of Use bug in
ml_pipeline_custom_easy_filter_register().
The provided arguments `in` and `out` are first checked for validity
under their locks and then used for clone again under their locks.
However, between the two operations, both the variable are left lock
free, and the two variables can become invalid.
This patch adds the corresponding fix by adding support for
checking validity of ml_tensors_info_s lockfree which is done
under the lock acquired inside ml_tensors_info_clone().

Further, as a minor fix, redundant locking and unlocking
has been removed from ml_pipeline_custom_easy_filter_register().

See also #42 https://github.com/nnstreamer/api/pull/42#issuecomment-840265534
Resolves https://github.com/nnstreamer/nnstreamer/issues/2600

**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
3 years ago[C-API] Fix the coverity issue accepted/tizen/unified/20210611.144944 submit/tizen/20210611.070742
Sangjung Woo [Thu, 10 Jun 2021 08:16:07 +0000 (17:16 +0900)]
[C-API] Fix the coverity issue

This patch fixes the coverity issue: "waiting while holding a lock".
Before entering the loop, mutex lock is release so that other thread can
use the CPU.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years agoThread safety for ml_tensors_data APIs
MyungJoo Ham [Tue, 11 May 2021 10:59:50 +0000 (19:59 +0900)]
Thread safety for ml_tensors_data APIs

Fixes #nnstreamer/2600
Note that locally created-and-freed ml-tensors-data
are not required to be protected.

Another fix: do not destroy user data even if it is AUTO_FREE
if push_buffer is NOT called.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[Flatbuf] Change version check of the flatc
Gichan Jang [Wed, 9 Jun 2021 07:32:40 +0000 (16:32 +0900)]
[Flatbuf] Change version check of the flatc

Change version check of the flatc from error to warning.
Even if the flatbuffers compiler has different versions, compatibility can be maintained.
Tested with
 - System flatc version: 2.0.0
 - Android flatc version: 1.12.0

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Android] tf-lite custom options
Jaeyun [Mon, 7 Jun 2021 06:05:41 +0000 (15:05 +0900)]
[Android] tf-lite custom options

update docs to set custom option for tensorflow-lite model.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[git] Add gitignore list
Gichan Jang [Mon, 7 Jun 2021 02:07:49 +0000 (11:07 +0900)]
[git] Add gitignore list

Add build directory to git ignore list.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[CAPI/ml-common] Add require to base-common accepted/tizen/unified/20210604.120715 submit/tizen/20210604.065820
Jihoon Lee [Fri, 4 Jun 2021 05:39:17 +0000 (14:39 +0900)]
[CAPI/ml-common] Add require to base-common

When a developer tries to add dependency to `capi-ml-common` they have
to care about adding dependency to `capi-base-common` as well because
`capi-ml-common` is actually depending upon `capi-base-common`

This patch resolves the issue by adding require to `capi-base-common`
in the pc file.

resolves #57

**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
3 years agoNNStreamer-devel-internal headers are external.
MyungJoo Ham [Fri, 28 May 2021 06:50:25 +0000 (15:50 +0900)]
NNStreamer-devel-internal headers are external.

Headers supplied by nnstreamer-devel-internal are external headers.
Use < > instead of " ".

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[API/Skeleton] App Src Callback support
MyungJoo Ham [Fri, 23 Apr 2021 05:49:33 +0000 (14:49 +0900)]
[API/Skeleton] App Src Callback support

Refer: https://github.com/nnstreamer/nnstreamer/issues/2581

This provides API signature and code skeleton for
callback support of app-src elements in ML-API pipelines.

CC: @junmin-kim
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[Android] Fix android ml api build script with patches for gstreamer build script
Yongjoo Ahn [Mon, 17 May 2021 08:41:31 +0000 (17:41 +0900)]
[Android] Fix android ml api build script with patches for gstreamer build script

- Let android build script use patch files to modify gstreamer build script
  from https://gstreamer.freedesktop.org/data/pkg/android/1.16.2/
- Fix tracing feature to add GstShark
  https://github.com/RidgeRun/gst-shark/

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[clang] add clang format
Jaeyun [Mon, 24 May 2021 08:33:16 +0000 (17:33 +0900)]
[clang] add clang format

add clang format in api repository.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[SRNPU/NNFW] Add NNFW Type for SRNPU
Dongju Chae [Mon, 5 Apr 2021 11:24:25 +0000 (20:24 +0900)]
[SRNPU/NNFW] Add NNFW Type for SRNPU

This patch adds NNFW Type for SRNPU.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Spec] Add the Provides option in case of 64bit
Sangjung Woo [Tue, 11 May 2021 02:40:06 +0000 (11:40 +0900)]
[Spec] Add the Provides option in case of 64bit

If architecture is aarch64 or x86_64, the 64bit option should be added.
If not, the wrong so file is provided as below.

$ rpm -qp --provides capi-machine-learning-inference-1.7.2-0.aarch64.rpm
capi-machine-learning-inference = 1.7.2-0
capi-machine-learning-inference(aarch-64) = 1.7.2-0
libcapi-nnstreamer.so
libcapi-nnstreamer.so.1()(64bit)

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[C-Api] enum for AIFW
Jaeyun [Mon, 10 May 2021 11:17:32 +0000 (20:17 +0900)]
[C-Api] enum for AIFW

add new enum value (for AIFW and SLSI NPU)

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years agoThread safety for ml_tensors_info APIs
MyungJoo Ham [Thu, 29 Apr 2021 06:45:21 +0000 (15:45 +0900)]
Thread safety for ml_tensors_info APIs

Fixes #nnstreamer/2600

This supports thread safety for ml_tensors_info related APIs.
TODO: ml_tensors_data related APIs

https://github.com/nnstreamer/nnstreamer/issues/2600

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[Android/TFLite] Add XNNPACK delegate support
Yongjoo Ahn [Fri, 9 Apr 2021 02:26:01 +0000 (11:26 +0900)]
[Android/TFLite] Add XNNPACK delegate support

- Add XNNPACK delegate in tensorflow-lite
- tensorflow-lite utilize XNNPACK as their default engine since v2.3.0

REF:
- https://github.com/google/XNNPACK
- https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/delegates/xnnpack

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[Android/Build] use default std accepted/tizen/unified/20210510.155158 submit/tizen/20210507.082542
Jaeyun [Thu, 6 May 2021 11:19:40 +0000 (20:19 +0900)]
[Android/Build] use default std

Remove flag to set cpp std in android native build.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Android] update tf-lite and nnfw version
Jaeyun [Thu, 6 May 2021 10:54:00 +0000 (19:54 +0900)]
[Android] update tf-lite and nnfw version

update default version, tensorflow-lite v2.3.0 and nnfw v1.15.0.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Android/Test] remove unnecessary constructor
Jaeyun [Thu, 6 May 2021 11:22:02 +0000 (20:22 +0900)]
[Android/Test] remove unnecessary constructor

Code clean, remove unnecessary constructor in testcases.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Spec] Add the provides section
Sangjung Woo [Thu, 6 May 2021 08:27:00 +0000 (17:27 +0900)]
[Spec] Add the provides section

Since rpmbuild explicitly exclude the name from the library rpm,
libcapi-nnstreamer.so is not provided as below.

$ rpm -qp --provides capi-machine-learning-inference-1.7.2-0.armv7l.rpm
capi-machine-learning-inference = 1.7.2-0
capi-machine-learning-inference(armv7l-32) = 1.7.2-0
libcapi-nnstreamer.so.1

This patch adds the provides section to capi-machine-learning-inference
package so that capi-machine-learning-inference provides
libcapi-nnstreamer.so.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[Android] Build GStreamer with tracing
Yongjoo Ahn [Mon, 3 May 2021 08:42:09 +0000 (17:42 +0900)]
[Android] Build GStreamer with tracing

- Add Android GStreamer build option for tracing in build script
- Add patch for file `gstreamer_android-1.0.c.in` to enable this feature

REF: https://gstreamer.freedesktop.org/documentation/additional/design/tracing.html?gi-language=c
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[Test/Flatbuf] Add Pipeline API test for Flatbuf
Yongjoo Ahn [Thu, 6 May 2021 04:20:29 +0000 (13:20 +0900)]
[Test/Flatbuf] Add Pipeline API test for Flatbuf

- Add a test for Flatbuf which check eqaulity of input buffer with output of flatbuf decoder and converter
- input -> decoder -> other/flatbuf-tensor -> converter -> output)

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[C-API] Fix Pipekline Flush API
Yongjoo Ahn [Mon, 3 May 2021 08:32:16 +0000 (17:32 +0900)]
[C-API] Fix Pipekline Flush API

- Some gstreamer elements fail to send `gst_event_new_flush_start`
- Spilt `_flush_start` and `_flush_stop` to call `_flush_stop`

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[Test] testcase for pipeline flush
Jaeyun [Tue, 6 Apr 2021 05:00:52 +0000 (14:00 +0900)]
[Test] testcase for pipeline flush

Add testcase for new API - pipeline flush.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Android] method to flush the pipeline
Jaeyun [Fri, 2 Apr 2021 11:39:25 +0000 (20:39 +0900)]
[Android] method to flush the pipeline

NNStreamer Android lib, add new method to flush the pipeline.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[C-Api] new API to flush the pipeline
Jaeyun [Fri, 2 Apr 2021 10:31:09 +0000 (19:31 +0900)]
[C-Api] new API to flush the pipeline

Add new API to flush the pipeline.
If new input should be run without old data in pipeline, this is necessary to clear all.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[TCM] Rename TCM config file
Sangjung Woo [Thu, 29 Apr 2021 05:28:32 +0000 (14:28 +0900)]
[TCM] Rename TCM config file

To run the TCM on AHub infra, the default name of config file should be
'config.yaml'.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[Android/Pipeline] clone data from src element
Jaeyun [Mon, 26 Apr 2021 10:29:09 +0000 (19:29 +0900)]
[Android/Pipeline] clone data from src element

We cannot guarantee the data object from java is available while running the pipeline.
Set clone when pushing data to src element.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Spec] Move libcapi-nnstreamer.so to capi-machine-learning-inference package accepted/tizen/unified/20210427.085757 submit/tizen/20210426.054755
Sangjung Woo [Fri, 23 Apr 2021 05:40:17 +0000 (14:40 +0900)]
[Spec] Move libcapi-nnstreamer.so to capi-machine-learning-inference package

To support the backward compatibility of Tizen 6.0,
libcapi-nnstreamer.so is moved to capi-machine-learning-inference
package.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[Indent] Fix indent style
Gichan Jang [Tue, 20 Apr 2021 01:26:54 +0000 (10:26 +0900)]
[Indent] Fix indent style

Fix indent style.
The "pointer" qualifier, '*', should be with the variable.

This is commit body message

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Tizen/Build] unnecessary build require
Jaeyun [Thu, 8 Apr 2021 05:20:06 +0000 (14:20 +0900)]
[Tizen/Build] unnecessary build require

remove unnecessary feature definition and build requires.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Android/Test] junit ver
Jaeyun [Thu, 8 Apr 2021 09:33:54 +0000 (18:33 +0900)]
[Android/Test] junit ver

Fix avas scan report, set junit ver 4.13.1.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Build/Test] coverage report
Jaeyun [Wed, 7 Apr 2021 10:02:28 +0000 (19:02 +0900)]
[Build/Test] coverage report

update script to generate coverage report.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[TCM] Add TCM config files
Gichan Jang [Tue, 6 Apr 2021 08:00:05 +0000 (17:00 +0900)]
[TCM] Add TCM config files

Add TCM config filres for tizen and android.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Test] change property name submit/tizen/20210406.094012
Jaeyun [Tue, 6 Apr 2021 06:02:23 +0000 (15:02 +0900)]
[Test] change property name

change property name sync mode, nnstreamer will change sync mode and option.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Tizen/Privilege] Use newly exported MMFW headers
MyungJoo Ham [Thu, 25 Feb 2021 01:11:22 +0000 (10:11 +0900)]
[Tizen/Privilege] Use newly exported MMFW headers

This requires
https://review.tizen.org/gerrit/#/c/platform/core/multimedia/libmm-camcorder/+/254182/ (OLD)
https://review.tizen.org/gerrit/#/c/platform/core/multimedia/libmm-camcorder/+/255956/ (NEW)
to be merged and deployed. Or maintainers may do group-SR.

Fixes https://github.com/nnstreamer/nnstreamer/issues/1734

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[Flatbuffers] Change subplugins name accepted/tizen/unified/20210331.054238 submit/tizen/20210330.110555
Gichan Jang [Tue, 30 Mar 2021 04:32:55 +0000 (13:32 +0900)]
[Flatbuffers] Change subplugins name

Change flatbuffers and flexbuffers subplugins name.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Spec] Use tar archiving instead of tar.gz
Sangjung Woo [Fri, 26 Mar 2021 04:19:41 +0000 (13:19 +0900)]
[Spec] Use tar archiving instead of tar.gz

This patch uses tar archiving instead of tar.gz instead of VD QBuild
system.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[Android] sub-plugins for flatbuf/flexbuf
Jaeyun [Thu, 25 Mar 2021 10:36:31 +0000 (19:36 +0900)]
[Android] sub-plugins for flatbuf/flexbuf

Update script to build Android lib with flatbuf and flexbuf subplugins.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years agoFix unit test script
MyungJoo Ham [Mon, 29 Mar 2021 10:53:38 +0000 (19:53 +0900)]
Fix unit test script

In main routine, return cannot be used.
Return values by calling exit instead.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[Etc] add reviewers
Jaeyun [Mon, 29 Mar 2021 04:35:32 +0000 (13:35 +0900)]
[Etc] add reviewers

add reviewers for API repository.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Log] divide a log message accepted/tizen/unified/20210329.145101 submit/tizen/20210326.073159
Hyoung Joo Ahn [Wed, 24 Mar 2021 11:29:02 +0000 (20:29 +0900)]
[Log] divide a log message

Since the length of the pipeline string is too long, the error message cannot be checked.
For easier debugging, this log message should be divided.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
3 years ago[Build] version info accepted/tizen/unified/20210324.124308 submit/tizen/20210324.062722
Jaeyun [Mon, 22 Mar 2021 03:47:09 +0000 (12:47 +0900)]
[Build] version info

Add version information for Android ML API.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Android] Add android build script for nnstreamer
Yongjoo Ahn [Mon, 8 Mar 2021 05:20:15 +0000 (14:20 +0900)]
[Android] Add android build script for nnstreamer

- Add `java/android/build-nnstreamer-android-lib.sh`
- Trim Android.mk and Android-nnstreamer.mk
- Set ML_API_VERSION

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[Singleshot] Support nntrainer inference accepted/tizen/unified/20210318.063530 submit/tizen/20210317.111732 submit/tizen/20210318.034025
Jihoon Lee [Wed, 10 Mar 2021 12:20:22 +0000 (21:20 +0900)]
[Singleshot] Support nntrainer inference

This patch enables singleshot inference from `ML_NNFW_TYPE_NNTR_INF`

I read code throughly to look where to change but it was only one line,

Please review if there are more things to be done.

Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
3 years ago[Android] upload nnstreamer code
Jaeyun [Thu, 4 Mar 2021 04:13:52 +0000 (13:13 +0900)]
[Android] upload nnstreamer code

Upload nnstreamer android files.

TODO: setup android build in ci and add build script.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[C-Api] add ref-count to custom filter/if handle
Jaeyun [Fri, 5 Mar 2021 06:33:18 +0000 (15:33 +0900)]
[C-Api] add ref-count to custom filter/if handle

When developer constructs a pipeline with custom filter or if-condition, add ref count to custom handle.
Prevent custom handle unregistration if pipeline is running.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Test] tensor name in tf-lite tc
Jaeyun [Mon, 8 Mar 2021 06:55:21 +0000 (15:55 +0900)]
[Test] tensor name in tf-lite tc

Ignore tensor name comparison in tf-lite testcase.
NNStreamer tf-lite plugin will set tensor name.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[test] Set timeout for meson test accepted/tizen/unified/20210308.132512 submit/tizen/20210305.081230 submit/tizen/20210308.024729
Yongjoo Ahn [Fri, 5 Mar 2021 00:40:05 +0000 (09:40 +0900)]
[test] Set timeout for meson test

- Set timeout value of 100 secs for unittest_capi_inference_latency

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[C-Api] fix res leak in timeout mode
Jaeyun [Thu, 18 Feb 2021 10:51:11 +0000 (19:51 +0900)]
[C-Api] fix res leak in timeout mode

In single-shot timeout case, the flag to release output handle may reset when setting short timeout value.
To prevent this case, add output handle to del-list and change params to set input/output handle in invoke thread.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[spec] Add Requires section for Tizen platform image accepted/tizen/unified/20210226.131816 submit/tizen/20210226.062558
Sangjung Woo [Fri, 26 Feb 2021 05:27:40 +0000 (14:27 +0900)]
[spec] Add Requires section for Tizen platform image

Some necessary packages such as nnstreamer-tizen-sensor are omitted from
Tizen platform image. This patch adds the 'Requires' section to
capi-machine-learning-inference package to operate properly.

* Related Issue: https://code.sec.samsung.net/jira/browse/TSDF-247

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[Test/C-Api] add testcases
Jaeyun [Wed, 17 Feb 2021 11:45:26 +0000 (20:45 +0900)]
[Test/C-Api] add testcases

migrate c-api testcases from nnstreamer repo.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Spec] Remove 'Provides' field in spec file accepted/tizen/unified/20210218.080543 submit/tizen/20210217.032056
Sangjung Woo [Tue, 16 Feb 2021 10:45:41 +0000 (19:45 +0900)]
[Spec] Remove 'Provides' field in spec file

'Provides' field in spec file causes unresolvable problems since our
customers use pkg-config files like 'BuildRequires: pkgconfig(capi-nnstreamer)'.
This patch removes 'Provides' field so that this package successfully
builds on the OBS server.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[C-Api] initial commit to add c-api submit/tizen/20210216.064758
Jaeyun [Fri, 5 Feb 2021 07:48:40 +0000 (16:48 +0900)]
[C-Api] initial commit to add c-api

Add nnstreamer native api and build script.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years agoC/inference & common: imported Tizen 6.0 C-APIs
MyungJoo Ham [Tue, 13 Oct 2020 10:52:00 +0000 (19:52 +0900)]
C/inference & common: imported Tizen 6.0 C-APIs

Imported Tizen 6.0 C-APIs from nnstreamer.git.
They will be kept duplicated until Tizen 6.5 devel starts
and it becomes ready for API package refactoring.

Re-licensed as Apache 2.0

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years agoC/README: added platform info
MyungJoo Ham [Tue, 13 Oct 2020 10:51:32 +0000 (19:51 +0900)]
C/README: added platform info

Added which platforms are supported and how they are maintained.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years agoMerge pull request #4 from myungjoo/setup/infra
MyungJoo Ham [Mon, 26 Oct 2020 10:47:24 +0000 (19:47 +0900)]
Merge pull request #4 from myungjoo/setup/infra

CODEOWNERS: add initial list

3 years agoCODEOWNERS: add initial list
MyungJoo Ham [Tue, 13 Oct 2020 10:57:46 +0000 (19:57 +0900)]
CODEOWNERS: add initial list

@todo: invite SNAP members

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years agoInitial structuring
MyungJoo Ham [Tue, 6 Oct 2020 08:01:03 +0000 (17:01 +0900)]
Initial structuring

c/: Starts with Tizen C API (and Linux C API)
cpp/: Starts with SNAP API (Samsung-Android mobile C++ API)
dotnet/: Starts with Tizen .NET API (mirror/clone policy TBD)
java/: Starts with ML API (Samsung-Research Android/Java API)

packaging/: Tizen / Fedora/SUSE packaging
debian/: Ubuntu / Debian packaging

API classes:
- inference.single
- inference.pipeline
- training

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years agoInitial commit
MyungJoo Ham [Tue, 6 Oct 2020 07:38:15 +0000 (16:38 +0900)]
Initial commit