platform/core/multimedia/inference-engine-mlapi.git
16 months agoFix uninitialized scalar variable 61/286261/2 accepted/tizen_6.5_unified tizen_6.5 accepted/tizen/6.5/unified/20230103.121418 submit/tizen_6.5/20230103.045954
Tae-Young Chung [Tue, 3 Jan 2023 02:41:09 +0000 (11:41 +0900)]
Fix uninitialized scalar variable

[Version] 0.0.8-0
[Issue type] bug fix

tensor_info.shape_type should be intialized with a value regardless of
any build option as _DA_RVC_65

Change-Id: Ifcf1cfac7503deaad160d96cd92b84e7f5e4649c
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoChange OutputLayer to OutputTensor 47/274047/2 accepted/tizen/6.5/unified/20220425.133226 submit/tizen_6.5/20220422.005247
Tae-Young Chung [Wed, 20 Apr 2022 09:14:04 +0000 (18:14 +0900)]
Change OutputLayer to OutputTensor

[Version] 0.0.7-0
[Issue type] bug fix

MediaVision uses the final output buffer(or tensor) name to access the memory.
In SPNE, even though a single OutputLayer has a name but there are final multiple OutputTensors
which have different names. So, change the OutputLayer to OutputTensor.

Change-Id: I1f2f1712699bb6d51dce831a11137b60303267c7
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoFix invalid parentheses 05/273305/1 accepted/tizen/6.5/unified/20220404.141021 submit/tizen_6.5/20220404.031803
Tae-Young Chung [Mon, 4 Apr 2022 02:33:54 +0000 (11:33 +0900)]
Fix invalid parentheses

[Version] 0.0.6-0
[Issue type] bug fix

Change-Id: Iff7cc2ea8cdeee1ab6d3aacaa5fe645a6b27dcff
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoAdd UserBuffer to customOp with true 28/273028/1 submit/tizen_6.5/20220404.012322
Tae-Young Chung [Wed, 30 Mar 2022 01:18:26 +0000 (10:18 +0900)]
Add UserBuffer to customOp with true

[Version] 0.0.5-0
[Issue type] bug fix

In mlapi, snpe filter causes segfault while handling multiple outputs
and the UserBuffer customOp is a solution for the issue.
This commit is for inference-engine-mlapi to apply UserBuffer customOp to mlapi.
Note that the UserBuffer customOp is valid only for snpe.
If an invalid customOp is given, for example the UserBuffer customOp for
tflite, mlapi ignore it.

Change-Id: Id8bb0e3a83b8b72b73258dd1c8e1325bf3532650
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoUpdate tensor information according to its order 50/272750/1
Tae-Young Chung [Wed, 23 Mar 2022 14:01:52 +0000 (23:01 +0900)]
Update tensor information according to its order

[Version] 0.0.4-0
[Issue type] update

mDesignated_ouputs should be updated according to
layers' true order, not iterated order.

Change-Id: I5e2deafd01d044dc11721a345e4cdec2aa7539bf
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoUpdate GetCustomProp() to get outputLayer as well as Runtime 10/272510/6
Tae-Young Chung [Fri, 18 Mar 2022 05:41:26 +0000 (14:41 +0900)]
Update GetCustomProp() to get outputLayer as well as Runtime

[Version] 0.0.3-0
[Issue type] update

Change-Id: Ia8e9a80392e8dbaf1e0d7373743a179635ea546e
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoSupport SNPE 08/272508/2
Tae-Young Chung [Fri, 18 Mar 2022 05:00:31 +0000 (14:00 +0900)]
Support SNPE

[Version] 0.0.2-0
[Issue type] new feature

SNPE is supported when _DA_RVC_65 is defined by
inference-engine-interface (004cfa27e471d484e4ccdc68abb3a8072001bf05).
This commit is based on following commits:

commit 13237cebbc83c2e4fb02a9bb15df2aefadb09c9e
Author: Inki Dae <inki.dae@samsung.com>
Date:   Tue Jan 11 20:29:44 2022 +0900

    add custom device capacity for SNPE engine
------------------------
commit db16f45efe816a4e7521085836059b308e1f4c12
Author: Inki Dae <inki.dae@samsung.com>
Date:   Wed Dec 29 18:23:42 2021 +0900

    src: use ml_single_open_full api
------------------------
commit 58bc5dba631b40f9e7784c3e9713162078696b0d
Author: Seungbae Shin <seungbae.shin@samsung.com>
Date:   Thu Nov 25 12:30:02 2021 +0900

    Refactoring InferenceMLAPI::Load()
------------------------
commit 99114d5faa27998c3781eb7e5bfbab8f43400082
Author: Inki Dae <inki.dae@samsung.com>
Date:   Wed Nov 24 18:11:54 2021 +0900

    add SNPE tensor filter support
------------------------
commit 8f5f3b5c447fa0889a9f03d68c8a9df7c0c24bba
Author: Inki Dae <inki.dae@samsung.com>
Date:   Tue Jun 8 12:49:48 2021 +0900

    Consider user-given property info first

Change-Id: I4c0979ec4efc5dbca3b37f12f686f30ca09a46be
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
3 years agoFix svace issue 98/257598/1 accepted/tizen/6.5/unified/20211028.122207 accepted/tizen/unified/20210509.123827 accepted/tizen/unified/20210608.131214 submit/tizen/20210428.062907 submit/tizen/20210506.010918 submit/tizen/20210507.005054 submit/tizen/20210513.034723 submit/tizen/20210513.045159 submit/tizen/20210604.014750 submit/tizen_6.5/20211028.162401 tizen_6.5.m2_release
Inki Dae [Wed, 28 Apr 2021 05:15:49 +0000 (14:15 +0900)]
Fix svace issue

This patch initializes uninitialized two variables.

Change-Id: I00aadafa97738a6f7c13417856c906556b92ee9a
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoChange members of inference_engine_layer_property structure, submit/tizen/20210422.072212
Tae-Young Chung [Wed, 10 Mar 2021 09:12:57 +0000 (18:12 +0900)]
Change members of inference_engine_layer_property structure,
and change vector<inference_engine_tensor_buffer> to map<string, inference_engine_tensor_buffer>

This is based on
https://review.tizen.org/gerrit/#/c/platform/core/multimedia/inference-engine-interface/+/254892/
https://review.tizen.org/gerrit/#/c/platform/core/api/mediavision/+/254953/

Change-Id: I93eaa87c9ed5492bb308cb1ec0a35e86fd5b06dd
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
3 years agoAdd SetCLTuner interface
Inki Dae [Thu, 4 Feb 2021 01:04:07 +0000 (10:04 +0900)]
Add SetCLTuner interface

Added SetCLTuner interface for CLTuner feature support of inference
engine interface framework which has a pure virtual function interface
of SetCLTUner function so the interface implementataion is required.

Change-Id: Ie20991e6562864bca285383443880367ea00b522
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years ago[ML-API] Use capi-ml-inference package instead of capi-nnstreamer 85/253785/1 accepted/tizen/unified/20210218.080606 submit/tizen/20210217.032056
Sangjung Woo [Wed, 17 Feb 2021 05:05:54 +0000 (14:05 +0900)]
[ML-API] Use capi-ml-inference package instead of capi-nnstreamer

The name of capi-nnstreamer and its pc file is changed to
capi-ml-inference. To build without any errors, this patch updates its
related information.

Change-Id: I07bd118b90232d517fdb48f8bc1ef05b469bd477
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years agoFix build error on ARM64 19/247219/1 accepted/tizen/unified/20201112.124212 submit/tizen/20201109.053646 submit/tizen/20201110.032259
Inki Dae [Mon, 9 Nov 2020 05:03:49 +0000 (14:03 +0900)]
Fix build error on ARM64

Change-Id: I64476c001ca6ddb200fd2667c2b9d4f7d91ceabd
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoFix undefined symbole issue 03/246503/4 submit/tizen/20201104.021236 submit/tizen/20201109.032237
Inki Dae [Fri, 30 Oct 2020 07:17:40 +0000 (16:17 +0900)]
Fix undefined symbole issue

ml_single_invoke_no_alloc has been changed to ml_single_invoke_fast
so fix it.

Change-Id: I2a7d85c0adbc8b28a4139e5038e85ca1f3a4e03e
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoFix memory leak issue 69/246369/2
Sangjung Woo [Mon, 26 Oct 2020 02:24:57 +0000 (11:24 +0900)]
Fix memory leak issue

* Apply ml_single_invoke_no_alloc() ML API instead of
  ml_single_invoke().
* Remove unnecessary memory copies.

Change-Id: I41c6eaf0afe35a4dd481ac57e942dd45f0fb1e4a
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoUpdate various tensor filters support 50/246250/2
Inki Dae [Wed, 14 Oct 2020 06:38:48 +0000 (15:38 +0900)]
Update various tensor filters support

Change-Id: I2ea104cae60ba5a9049fcc8eaa1b0ec78a220112
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoUse pre-defined tensor data handles 49/246249/1
Inki Dae [Tue, 15 Sep 2020 08:30:27 +0000 (17:30 +0900)]
Use pre-defined tensor data handles

For invoke request, we don't have to get input tensor information
because we can get the information at GetInputTensorBuffers
and GetOutputTensorBuffers, and use them instead.

Change-Id: I6d2ac7fcb8d4ed129deb54eca7739038571b230e
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoAdd ARMNN and TFLITE backend support 48/246248/1
Inki Dae [Fri, 11 Sep 2020 07:20:22 +0000 (16:20 +0900)]
Add ARMNN and TFLITE backend support

Change-Id: I2fde5e660950a3e2d9d2d1722c351cdd448f86a4
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoMerge "Support two more tensor type" into tizen accepted/tizen_6.0_unified accepted/tizen_6.0_unified_hotfix tizen_6.0 tizen_6.0_hotfix accepted/tizen/6.0/unified/20201030.121108 accepted/tizen/6.0/unified/hotfix/20201103.051119 accepted/tizen/unified/20200831.002556 submit/tizen/20200828.025650 submit/tizen/20200828.100528 submit/tizen_6.0/20201029.205103 submit/tizen_6.0_hotfix/20201102.192503 submit/tizen_6.0_hotfix/20201103.114803 tizen_6.0.m2_release
Inki Dae [Wed, 26 Aug 2020 06:35:27 +0000 (06:35 +0000)]
Merge "Support two more tensor type" into tizen

3 years agoSupport two more tensor type 00/242200/1
Hyo Jong Kim [Tue, 25 Aug 2020 02:29:42 +0000 (11:29 +0900)]
Support two more tensor type

Support INT64 and UINT64

Change-Id: Iec1445e27bfeb245e1b38bd83679ea8f27e7bcf7
Signed-off-by: Hyo Jong Kim <hue.kim@samsung.com>
3 years agoSupport multiple output tensor 98/242198/2
Hyo Jong Kim [Tue, 25 Aug 2020 02:20:46 +0000 (11:20 +0900)]
Support multiple output tensor

Get the information and the number of output tensor
Set the output tensor according to that number

Change-Id: Ie803aa0aee194091006db29bd86a3d24a4f922df
Signed-off-by: Hyo Jong Kim <hue.kim@samsung.com>
3 years agoFix svace issue[WGID=443239] 14/239014/1 accepted/tizen/unified/20200722.144612 submit/tizen/20200721.063155
Inki Dae [Tue, 21 Jul 2020 05:42:58 +0000 (14:42 +0900)]
Fix svace issue[WGID=443239]

Change-Id: I79e3b1c283f9813efb48caffd7c5c30b8c2afc95
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoFix build error aarch64 and x86_64 27/237227/1 accepted/tizen/unified/20200628.221629 submit/tizen/20200626.060446 submit/tizen/20200626.070253
Inki Dae [Fri, 26 Jun 2020 06:00:59 +0000 (15:00 +0900)]
Fix build error aarch64 and x86_64

Change-Id: I4aa50fce7ed7b9c822a505be5d21f17bb5f040e9
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoCheck if model file path is valid or not 27/236327/3 submit/tizen/20200626.050805
Inki Dae [Tue, 16 Jun 2020 08:21:46 +0000 (17:21 +0900)]
Check if model file path is valid or not

Change-Id: Id621bac742d9d2a5109462ffd284b956b0feae21
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoChange in-house NN Runtime backend name 22/236322/1
Inki Dae [Tue, 16 Jun 2020 07:47:35 +0000 (16:47 +0900)]
Change in-house NN Runtime backend name

Official name of NNFW is ONE(On-device Neural Engine)
so use it instead of NNFW.

Change-Id: I8bdb279451570074f11a85386c6725afe73ceab9
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoAdd NNFW runtime support 68/236168/4
Inki Dae [Mon, 15 Jun 2020 09:25:23 +0000 (18:25 +0900)]
Add NNFW runtime support

This patch corrects the use of fixed values to support NNFW runtime.
For this, this patch updates tensor buffer information according to
a given model and add ConvertTesnorType function which is used
to convert tensor data type for NNStreamer to the one for MediaVision
Inference engine.

Change-Id: I28d80698feebe9efbb076bb8d979b0ce0d849fee
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoSet model path according to MLAPI backend 63/235963/3
Inki Dae [Thu, 11 Jun 2020 07:29:14 +0000 (16:29 +0900)]
Set model path according to MLAPI backend

NNFW - in-house NN Runtime - needs NNPackage type of package
which is a directory containing a model file and its meta file.
For more details, you can refer to
https://github.com/Samsung/ONE/tree/master/nnpackage/examples/one_op_in_tflite

ML Single API framework of NNStreamer receives a full path of a given model file
from user - in our case, inference-engine-mlapi backend - and find metadata
in the directory that the a given model file is located.

So inference-engine-mlapi backend should pass a full path of
the a given model file to ML Single API framework.

Change-Id: I6bdd871d5b683dbd6e60fce0f6dbd052985cd514
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoSet supported_device_types according to MLAPI backend type 62/235962/1
Inki Dae [Thu, 11 Jun 2020 07:16:42 +0000 (16:16 +0900)]
Set supported_device_types according to MLAPI backend type

NNFW supports only CPU and GPU accelerated NN runtime so
Consider using NNFW tensor filter plugin of NNStreamer.

Change-Id: I3ed4ae5018b984c812f8bad69eebbfdae69dd030
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoFix initializer list coding rule 94/235394/1
Inki Dae [Thu, 4 Jun 2020 08:00:14 +0000 (17:00 +0900)]
Fix initializer list coding rule

Change-Id: Id95bf653d7b6274c4803a6b240783905e96300ce
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoFix coding style based on Tizen SE C++ Coding Rule 60/235360/1
Inki Dae [Thu, 4 Jun 2020 05:47:00 +0000 (14:47 +0900)]
Fix coding style based on Tizen SE C++ Coding Rule

Tizen SE C++ Coding Rule:
https://code.sec.samsung.net/confluence/pages/viewpage.action?pageId=160925159

Change-Id: I1ae54a3676dc9cc0e06d4322eb612ceb07d7626c
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoChange a function name from SetPluginType to SetPrivateData 75/235275/2
Inki Dae [Wed, 3 Jun 2020 08:41:48 +0000 (17:41 +0900)]
Change a function name from SetPluginType to SetPrivateData

Change-Id: I4a0d2ea3345ab650f5ffe9072f8edc79f5fdca98
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoChange postfix of file name to "mlapi"
Inki Dae [Tue, 2 Jun 2020 09:36:54 +0000 (18:36 +0900)]
Change postfix of file name to "mlapi"

Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoChange a backend type from VIVANTE to MLAPI
Inki Dae [Tue, 2 Jun 2020 09:13:04 +0000 (18:13 +0900)]
Change a backend type from VIVANTE to MLAPI

Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoAdd init code
Inki Dae [Wed, 27 May 2020 08:29:46 +0000 (17:29 +0900)]
Add init code

Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoInitial empty repository master
Tizen Infrastructure [Wed, 27 May 2020 08:16:04 +0000 (08:16 +0000)]
Initial empty repository