platform/core/multimedia/inference-engine-interface.git
15 months agofix svace issues SIGN_EXTENSION 91/289991/2 accepted/tizen_8.0_unified tizen_8.0 accepted/tizen/8.0/unified/20231005.093418 accepted/tizen/unified/20230320.021843 accepted/tizen/unified/20230703.093348 tizen_8.0_m2_release
Tae-Young Chung [Fri, 17 Mar 2023 00:43:53 +0000 (09:43 +0900)]
fix svace issues SIGN_EXTENSION

[Version] : 0.4.8
[Issue type] : bug fix

Change-Id: I00ea1077fd8df154a5e54efbbd08a61b1c1b4ca5
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
15 months agofix svace issues 42/289942/1 accepted/tizen/unified/20230316.174021
Inki Dae [Thu, 16 Mar 2023 02:15:59 +0000 (11:15 +0900)]
fix svace issues

[Version] : 0.4.7
[Issue type] : bug fix

Fixed svace issues, SIGN_EXTENSION.
write function of std::ofstream class needs streamsize type as the type of
second parameter so cast existing size_t type to streamsize one.

Change-Id: I632dfdb78a69d1c476cee044dcc0df3bb3f2c702
Signed-off-by: Inki Dae <inki.dae@samsung.com>
19 months agoCode clean up 55/283155/6 accepted/tizen_7.0_unified tizen_7.0 accepted/tizen/7.0/unified/20221103.165408 accepted/tizen/7.0/unified/20221110.063616 accepted/tizen/unified/20221103.165727 accepted/tizen/unified/20230113.091233
Hyunsoo Park [Wed, 19 Oct 2022 06:26:36 +0000 (15:26 +0900)]
Code clean up

- Add macro 'TENSOR_SIZE'
- Modify scanf defect

[Version] : 0.4.6
[Issue type] : bug fix

Change-Id: Idf3b8d48c0813325215cb99fcd7e38f95fb97eaa
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
19 months agofix data type 46/283146/4
Hyunsoo Park [Wed, 19 Oct 2022 04:09:33 +0000 (13:09 +0900)]
fix data type

[Version] : 0.4.5
[Issue type] : bug fix

Change-Id: I837c3e566a1dc6fdc6a0933db5e92f50ecf11501
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
21 months agofix not-found backend library issue 63/280063/1 accepted/tizen_7.0_unified_hotfix tizen_7.0_hotfix accepted/tizen/7.0/unified/hotfix/20221116.105355 accepted/tizen/unified/20220825.063649 submit/tizen/20220823.063557 submit/tizen/20220825.024015 tizen_7.0_m2_release
Inki Dae [Tue, 23 Aug 2022 06:10:40 +0000 (15:10 +0900)]
fix not-found backend library issue

[Version] : 0.4.4
[Issue type] : bug fix

Fixed a bug that library isn't found in case that a backend_name is given
and backend_type isn't -1, which was reported by VD division.

Ps. backend_type will be dropped later because only one path should exist
for one purpose.

Change-Id: I33a27bad14982fa7913fe12fe8f33efc6a9c7c0e
Signed-off-by: Inki Dae <inki.dae@samsung.com>
22 months agoMerge "Add snpe lite2_fp32 model test" into tizen
kwang son [Tue, 16 Aug 2022 02:51:31 +0000 (02:51 +0000)]
Merge "Add snpe lite2_fp32 model test" into tizen

22 months agoAdd snpe lite2_fp32 model test 68/279668/1
Kwanghoon Son [Tue, 16 Aug 2022 01:45:51 +0000 (21:45 -0400)]
Add snpe lite2_fp32 model test

Change-Id: Id9f25f655cc85de348195fe83f54277a3d2abf9b
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
22 months agoAdd snpe type backend test 34/279634/3
Kwanghoon Son [Fri, 12 Aug 2022 10:53:52 +0000 (06:53 -0400)]
Add snpe type backend test

[Version] 0.4.3
[Issue type] new test

Change-Id: Ie0678c1046981eec9590dad717fc31717c6d0112
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
22 months agoFix wrong debug option --w 33/279633/1
Kwanghoon Son [Fri, 12 Aug 2022 10:52:49 +0000 (06:52 -0400)]
Fix wrong debug option --w

--w is typo and -w option is ignore all warning.

Change-Id: I21e9d2cbc1da424af7a0bd70a71dcdb909bafa28
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
2 years agoupdate backend name if backend type is given 03/275003/1 accepted/tizen/unified/20220726.012240 submit/tizen/20220720.053259 submit/tizen/20220721.064000 submit/tizen/20220725.050651 submit/tizen/20220817.123406
Inki Dae [Fri, 13 May 2022 07:42:36 +0000 (16:42 +0900)]
update backend name if backend type is given

[Version] : 0.4.2-0
[Issue type] : bug fix

Change-Id: I45c1e909ebde6ffe855d8e702898584841fe38e6
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agoFix bugs 02/271502/2 accepted/tizen/unified/20220224.133659 submit/tizen/20220224.031004
Tae-Young Chung [Tue, 22 Feb 2022 07:07:25 +0000 (16:07 +0900)]
Fix bugs

[Version] 0.4.1-0
[Issue type] Bug fix

1. Initialize member variables in class ctor
2. Fix usage after g_free()

Change-Id: Ib0a44d17801579596fec6c70fdc58cf00a596b9c
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agotools: fix typo 69/269269/1
Hyunsoo Park [Wed, 12 Jan 2022 07:54:38 +0000 (16:54 +0900)]
tools: fix typo

[Versin] 0.4.0-1
[Issue type] clean up

Change-Id: I2870ea5ef1fe0571a2b74dd9daf2a6f82389d56f
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
2 years agodeprecate INFERENCE_BACKEND_MLAPI type 86/268786/2 accepted/tizen/unified/20220110.140020 submit/tizen/20220105.080154 submit/tizen/20220105.081745
Inki Dae [Mon, 3 Jan 2022 03:36:23 +0000 (12:36 +0900)]
deprecate INFERENCE_BACKEND_MLAPI type

[Version] : 0.4.0-0
[Issue type] : cleanup

Deprecated INFERENCE_BACKEND_MLAPI type which is not actual backend type
but another API framework. So drop this type.

Change-Id: I758240b0e916bf13554694a9232374fe9b3c6efe
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agotools: Add metadata class to correspond to multiple output layers 54/268454/9
Hyunsoo Park [Fri, 17 Dec 2021 07:49:05 +0000 (16:49 +0900)]
tools: Add metadata class to correspond to multiple output layers

[Version] 0.2.2-0
[Issue Type] Update feature

Change-Id: I91cd820a301e142c5878706593ff12bf2608c939
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
2 years agotest: add QRB4210 board support 27/268627/1
Inki Dae [Tue, 28 Dec 2021 08:28:30 +0000 (17:28 +0900)]
test: add QRB4210 board support

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

Added DA's target board(QRB4210) support.

Change-Id: I9ece225085946340a33dc13826b3acfae8cd1d32
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agotools: Modify random matrix function for supporting UINT8 DTYPE 37/268237/8
Hyunsoo Park [Fri, 17 Dec 2021 07:49:05 +0000 (16:49 +0900)]
tools: Modify random matrix function for supporting UINT8 DTYPE

[Version] 0.2.1-0
[Issue Type] Update feature

Change-Id: I4d404925d317558eb6b4c8170e1cc6558a76fc7c
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
2 years agoadd SNPE inference engine support 33/267033/2
Inki Dae [Thu, 25 Nov 2021 01:04:17 +0000 (10:04 +0900)]
add SNPE inference engine support

[Version] : 0.2.0-0
[Issue type] : new feature

Change-Id: Ia956f7bdbaab8c9683d086b7221fc439110bd779
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agotools: code clean up and relocate global variables 68/266668/14
Hyunsoo Park [Wed, 17 Nov 2021 04:57:22 +0000 (13:57 +0900)]
tools: code clean up and relocate global variables

[Version] 0.1.4-0

[Issue Type] Clean up

Change-Id: Ib2e8619b57948e1c9770a2b91ea10aa936da233f
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
2 years agoFix dlog level 95/266595/2
Kwang Son [Tue, 16 Nov 2021 04:29:27 +0000 (23:29 -0500)]
Fix dlog level

[Version] : 0.1.3-0
[Issue type] : bug fix

Fix some debug, information dlog which are wrong assigned.

Change-Id: Ie79e160f6f0af5b57bf81a7889c6be80c5c088a0
Signed-off-by: Kwang Son <k.son@samsung.com>
2 years agotools: drop unused global variable 09/266209/8
Hyunsoo Park [Tue, 9 Nov 2021 06:57:41 +0000 (15:57 +0900)]
tools: drop unused global variable

[Version] 0.1.3-0

[Issue type] Clean up

Change-Id: I5a4cb6114ee18f3d5637101ded740b29df17ed27
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
2 years agoadd NNTrainer model type 91/266291/3
Inki Dae [Wed, 10 Nov 2021 07:52:18 +0000 (16:52 +0900)]
add NNTrainer model type

[Version] : 0.1.2-0
[Issue type] : bug fix

Added NNTrainer model type missed.

Change-Id: I8e42060717d8dd5f99689f8097dc78ac5ff89ba6
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agotools: fix build error on aarch64 39/266239/3
Inki Dae [Tue, 9 Nov 2021 11:27:33 +0000 (20:27 +0900)]
tools: fix build error on aarch64

[Version] : 0.1.1-0
[Issue type] : bug fix

Fixed a build error, error: format '%d' expects argument of type 'int'
since commit-id fa6bf6018a088e31c1ee641db79b6493605d2e44.

Regarding size_t type, this patch makes it to use '%zu' instead of
'%d' as a format specifier.

Change-Id: Ib35476e899d1d1dce68ac02e32759bc2dc44ac91
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agoadd nntrainer backend support 38/266238/3
Inki Dae [Tue, 9 Nov 2021 11:20:36 +0000 (20:20 +0900)]
add nntrainer backend support

[Version] : 0.1.0-0
[Issue type] : new feature

Change-Id: I2dde532dc012d066e1ad7b5060ec93b40d781cef
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years ago[CLtuner] Refactorying CLtuner to use json parser 66/265266/12
Hyunsoo Park [Tue, 5 Oct 2021 04:09:19 +0000 (13:09 +0900)]
[CLtuner] Refactorying CLtuner to use json parser

Change-Id: I79fb610fe4d09c54d3bd6f0898c9fc0ed46e8edf
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
2 years agoFix g_print type of off_t from lld to jd 16/262616/1
Tae-Young Chung [Tue, 17 Aug 2021 01:43:02 +0000 (10:43 +0900)]
Fix g_print type of off_t from lld  to jd

off_t returns long in 32bit environment but long long in 64bit
so that it causes build error.
jd makes g_print expect a intmax_t-sized integer.

Change-Id: I5686483df98aa60910047ba694a9d212af42f9e5
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agotest: drop test_gtest.cpp file 68/262468/1
Inki Dae [Wed, 11 Aug 2021 09:25:31 +0000 (18:25 +0900)]
test: drop test_gtest.cpp file

Move main function into actual tc files.
We don't have to keep separate test_gtest.cpp file.

Change-Id: Ie9894ad6a08194795d3027ce35f17e1506027387
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoMove cltuner generator location to /tools
Hyunsoo Park [Fri, 14 May 2021 06:56:57 +0000 (15:56 +0900)]
Move cltuner generator location to /tools

Change-Id: Ic921f2a8455ba6825db7b71a3a0e869a7a8c2897
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
3 years agoCLtuner generator initial drafts
Hyunsoo Park [Thu, 4 Feb 2021 10:45:39 +0000 (19:45 +0900)]
CLtuner generator initial drafts

It creates tune file enables optimized inference.

Change-Id: I72b209cf320e41da83c3e9cedf8efb6689f18719
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
3 years agoFix backend type issue 95/259395/1
Inki Dae [Mon, 7 Jun 2021 07:44:29 +0000 (16:44 +0900)]
Fix backend type issue

Fixed a backend issue that when user requested an inference with
ONE type, it passed TFLITE type instead of ONE.

So this patch passes ONE type to inference-engine-mlapi backend correctly.

Change-Id: Ib91e9880873f1023dfb7bc8bf3b5f838029527a3
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoChange path of configuration file 66/259166/2 accepted/tizen/unified/20210608.131151 accepted/tizen/unified/20210608.131429 submit/tizen/20210604.014750 submit/tizen/20210604.030216
Hyunsoo Park [Wed, 2 Jun 2021 00:30:20 +0000 (09:30 +0900)]
Change path of configuration file

Change-Id: I561c41bd5d8fde46a9e94b6c810feafe5c75f2e8
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
3 years agoRevert "SPEC:Add gcov option" 18/257718/2 accepted/tizen/unified/20210509.123809 submit/tizen/20210506.010918 submit/tizen/20210507.005054 submit/tizen/20210512.095706 submit/tizen/20210513.024033 submit/tizen/20210513.024256 submit/tizen/20210513.034723 submit/tizen/20210513.045159
Kwang Son [Fri, 30 Apr 2021 04:58:16 +0000 (13:58 +0900)]
Revert "SPEC:Add gcov option"

This reverts commit 6a733d6b9966c3706164377de989b5abd6da2889.
Gov package build is for tizen capi-packages, which is not related with
this interface package.

Change-Id: I445cce11bc7f84a4ff8f03aa51feb2579c22ac00
Signed-off-by: Kwang Son <k.son@samsung.com>
3 years agoAdd iniparser to PC_REQUIRED submit/tizen/20210422.072212 submit/tizen/20210428.062907
Tae-Young Chung [Wed, 31 Mar 2021 07:01:42 +0000 (16:01 +0900)]
Add iniparser to PC_REQUIRED

Change-Id: I77becd79c2271de775996d028dd6b9abcfc96200
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
3 years agoChange members of inference_engine_layer_property structure,
Tae-Young Chung [Wed, 10 Mar 2021 09:05:36 +0000 (18:05 +0900)]
Change members of inference_engine_layer_property structure,
and change vector<inference_engine_tensor_buffer> to map<string, inference_engine_tensor_buffer>

This patch is to use inference_engine_tensor_info and inference_engine_tensor_buffer
based on input/output layers' name.

Change-Id: I18d3e7ae80a8c2a1e6236938571b8f22b12b2e1e
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
3 years agotest: Update descriptions to test case parameters
Inki Dae [Mon, 8 Feb 2021 05:04:34 +0000 (14:04 +0900)]
test: Update descriptions to test case parameters

Updated descriptions to test case parameters, which
describe parameters for each test case correctly.

Change-Id: Id7d6b992bbea67e5354774fee03671a9933e274e

3 years agotest: Add measurement cases for CLTuner
Inki Dae [Mon, 8 Feb 2021 04:51:09 +0000 (13:51 +0900)]
test: Add measurement cases for CLTuner

Added several measurement cases to compare the inference performance
of ARMNN CLTuner.

This patch measures the performance in following order,
 1. Generate CLTuner files for reference models.
 2. Measure inference performance without CLTuner.
 3. Measure inference performance with CLTuner.

Change-Id: I0336a472ec381e4d89bc1491b9a458f05f55c71f
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agotest: Add verification code for CLTuner feature
Inki Dae [Sun, 7 Feb 2021 23:53:45 +0000 (08:53 +0900)]
test: Add verification code for CLTuner feature

Added verification cases for CLTuner feature, which
verify other reference models, quantized image classification,
object detection, face detection and pose estimation.

Change-Id: I250152282ee3364865c9d10d020aead687eeb0d9
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agotest: Use some macros for test case parameters
Inki Dae [Thu, 4 Feb 2021 09:22:49 +0000 (18:22 +0900)]
test: Use some macros for test case parameters

Added some macros for tflite and cltuner test cases
to avoid code duplication.

Changelog v1:
- Correct macro names like below.
  *IC_OD* -> *OD*
  *IC_FD* -> *FD*
  *IC_PE* -> *PE*

Change-Id: I1f8902c2779a4889a315a9402f290502e86002c0
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agotest: Rename test model enumeration values
Inki Dae [Thu, 4 Feb 2021 08:35:29 +0000 (17:35 +0900)]
test: Rename test model enumeration values

Just let's keep name consistency.

Change-Id: Id8e593a37160a49929184afc2d8f8afcf7948dc1
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agotest: Introduce GetModelString function
Inki Dae [Thu, 4 Feb 2021 04:49:04 +0000 (13:49 +0900)]
test: Introduce GetModelString function

Added GetModelString function to avoid code duplication.

Converting a given model type to its corresponding string
was duplicated in several test cases. We can share the code
by introducing GetModelString function which returns
a string corresponding to a given test model type.

Change-Id: Iba325074aff6fa40ac5621b4c6b519a75774d3dc
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agotest: Do not return in error case
Inki Dae [Thu, 4 Feb 2021 03:58:00 +0000 (12:58 +0900)]
test: Do not return in error case

Google test framework provides assertion macro so
we don't have to return in error case.
It must be enough with the assertion macro.

Change-Id: I9a8f1375e5ddfbe06a2803567a3eea8f11f1e74d
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agotest: Add CLTuner verification code
Inki Dae [Fri, 29 Jan 2021 06:31:59 +0000 (15:31 +0900)]
test: Add CLTuner verification code

This patch adds CLTuner verification code which generages
a tuner file and then requests an inference with the generated
file for each tuning mode and image classification model.

Change-Id: I82dd0f3de7ba3f1ba8213241eca5f175490c575b
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoAdd CLTuner support
Inki Dae [Thu, 21 Jan 2021 07:36:37 +0000 (16:36 +0900)]
Add CLTuner support

Added CLTuner support.

For CLTuner support, this patch adds a new internal API, SetCLTuner function.
This function passes user-given CLTuner configuration to MLAPI and ARMNN
backends before inference engine loads a given model file.

[How to use]
There are two CLTuner modes:
    READ : inference engine refers to a given tuned file for inference.
    GENERATION : inference engine generates a tuning file to a given model file.

And there are three CLTuner types:
    EXHAUSTIVE : The tuning speed is slow but aggressive optimization.
    NORMAL : The tuning speed is reasonable and reasonable optimization.
    RAPID : The tuning speed is fast but leient optimization.

- For CLTuner read mode,
    inference_engine_cltuner cltuner = {
        .active = true,
        .update = false,
        .cltuner.type = INFERENCE_ENGINE_CLTUNER_READ,
    };

- For CLTuner generation mode,
    inference_engine_cltuner cltuner = {
        .active = true,
        .update = true,
        .cltuner.type = INFERENCE_ENGINE_CLTUNER_{EXHAUSTIVE |
                                                  NORMAL |
                                                  RAPID},
    };

    inference_engine_capacity capacity;
    engine->GetBackendCapacity(&capacity);

    if (capacity.cltuner_supported)
        engine->SetCLTuner(&cltuner);

Change-Id: Id1cc9513e444dfad21b933b46535c1b810f4a4d6
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoChange behavior to MLAPI type 30/255830/1 accepted/tizen/unified/20210331.053928 submit/tizen/20210325.014337
Inki Dae [Wed, 24 Mar 2021 06:27:03 +0000 (15:27 +0900)]
Change behavior to MLAPI type

The behavior of INFEENCE_BACKEND_MLAPI type is fixed with
NPU device according to policy change so this patch makes
it to support only NPU device when user requested an inference
with INFERENCE_BACKEND_MLAPI type.

Change-Id: I25afff6cb8ff346a76bddde10fa021d11ca2b22f
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoDrop duplicated BindBackend function 10/255810/1
Inki Dae [Wed, 24 Mar 2021 03:55:02 +0000 (12:55 +0900)]
Drop duplicated BindBackend function

Change-Id: I5cbdb64420ce07e5cba9941bd3d76a14c3e90552
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoApply a new policy for inference engine backend path 48/255748/5
Inki Dae [Thu, 18 Mar 2021 12:04:25 +0000 (21:04 +0900)]
Apply a new policy for inference engine backend path

This patch applies a new policy for inference engine backend path.

Inference engine interface framework has a role to decide which inference
engine API framework - internal or ML Single API - will be used according
to user desired inference requests.

In runtime, inference engine interface framework loads ini file -
/etc/inference/inference_engine_backend_path.ini - and parse it
to check which API framework current Platform wants to use for a given
backend.

So this patch applies below role according to user desired inference requests.

    User          INI configuration file             API framework
   ---------------------------------------------------------------
   ONE                      -                           MLAPI
   MLAPI                    -                           MLAPI
   CUSTOM device(NPU)       -                           MLAPI
   ARMNN                    -                          Internal
   ARMNN                  MLAPI                         MLAPI
   TFLITE                   -                          Internal
   TFLITE                 MLAPI                         MLAPI
   OPENCV                   -                          Internal
   --------------------------------------------------------------

   Legends
   -------
     - : nothing declared.
 Internal : internal plugin will be used.
 MLAPI : ML Single API will be used.

Change-Id: If2f310171671e911717792538cc6977c46f2bcd8
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoAllow user given ini file path 42/253342/1
Inki Dae [Tue, 9 Feb 2021 04:39:43 +0000 (13:39 +0900)]
Allow user given ini file path

This patch allows user to pass a full path of ini file which
contains default tensor filter types for MLAPI backend.

Change-Id: Iaecf5bae5ad567570e4b57fe3cf109088b95359e
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agotest: Use a macro instead of hard-coded count 53/252353/1
Inki Dae [Wed, 27 Jan 2021 05:34:04 +0000 (14:34 +0900)]
test: Use a macro instead of hard-coded count

Change-Id: I1c0a5dd47d67a7a9eca725d932d0a73001ca85e2
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agotest: Fix invalid device type issue 77/251977/1
Inki Dae [Thu, 21 Jan 2021 07:50:28 +0000 (16:50 +0900)]
test: Fix invalid device type issue

Change-Id: I718d815ccfd0c3edf6bcc7d789bbdcf4c33e3020
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoSet profile data to 0 at failure 66/249266/1 accepted/tizen/unified/20201214.124522 submit/tizen/20201210.015517
Inki Dae [Wed, 9 Dec 2020 10:42:40 +0000 (19:42 +0900)]
Set profile data to 0 at failure

Do not skip updating the profile data if the profiling failed.
Instead, update all data to 0 for visualizer.

Change-Id: I2f145e462716ad221bfa57a9831c606025059f54
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoFix backend name when profiling 33/249233/1
Inki Dae [Wed, 9 Dec 2020 06:36:09 +0000 (15:36 +0900)]
Fix backend name when profiling

This patch corrects a backend name when profiling via MLAPI.

In case of MLAPI backend, there are two cases. One is "ONE",
and other is "TFLITE" in default. So this patch changes actual
backend name by checking backend_type in runtime when logging
the profile data, backend name.

Change-Id: I0126cd6d427aee760df6224b2813b532d584d287
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agotest: Clean up profiler 68/249168/1 accepted/tizen/unified/20201209.124900 submit/tizen/20201208.082555
Inki Dae [Tue, 8 Dec 2020 07:57:31 +0000 (16:57 +0900)]
test: Clean up profiler

Change-Id: I1894b47931c46ee341be6415d3cab4020dda4575
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoUse static profiler object instead of dynamic one 96/248296/2 accepted/tizen/unified/20201126.233219 submit/tizen/20201126.061710
Inki Dae [Wed, 25 Nov 2020 06:48:42 +0000 (15:48 +0900)]
Use static profiler object instead of dynamic one

Only one profiler object is needed per a inference engine common class
so use static profiler object instead of dynamic one.

Change-Id: I29980442617aaca6e50b07392c50c74154a3ac29
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoStop profiling if inference failed 82/248282/1 submit/tizen/20201125.055433
Inki Dae [Wed, 25 Nov 2020 05:27:00 +0000 (14:27 +0900)]
Stop profiling if inference failed

Change-Id: I4ed0f45e7f34677470f81c2161370ff89d15f467
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoSet target device correctly 09/246709/1 tizen_devel_gesture submit/tizen/20201104.021236 submit/tizen/20201109.032237 submit/tizen/20201109.053646 submit/tizen/20201110.032259
Inki Dae [Tue, 3 Nov 2020 09:00:39 +0000 (18:00 +0900)]
Set target device correctly

Change-Id: I0d822d8e28d1c497c9371741397d1018161a09af
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agotest: Add AIC's hand gesture model verification support 38/246638/1
Inki Dae [Mon, 2 Nov 2020 08:20:35 +0000 (17:20 +0900)]
test: Add AIC's hand gesture model verification support

Change-Id: I2beab7041e7b57f93f4fef22e2e7e8178470a3b2
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agotest: Add reference model profiling support for ONERT 15/246415/3
Inki Dae [Thu, 29 Oct 2020 06:21:31 +0000 (15:21 +0900)]
test: Add reference model profiling support for ONERT

Change-Id: I48bcc8f959b3a803b75a0ea76cdf01c19b58ed92
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoIntroduce default tensor filter type support for MLAPI 51/246251/2
Inki Dae [Tue, 27 Oct 2020 08:34:27 +0000 (17:34 +0900)]
Introduce default tensor filter type support for MLAPI

This patch introduces default tensor filter type support for MLAPI.

In case that user requests a inference with INFERENCE_BACKEND_MLAPI type,
inference engine mlapi backend requests the inference to a tensor filter
type corresponding to a given device type such as CPU, GPU or NPU.

1. If device type is CPU or GPU then it requests a inference to
   MLAPI backend with a tensor filter type written in mDefault_MLAPI_Backend[0].
2. If device type is NPU then it requests a inference to
   MLAPI backend with a tensor filter type written in mDefault_MLAPI_Backend[1].

Change-Id: I898a993c15ec24504b663b49ba5ac48ac4a25ff4
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agotest: fix a type 64/245164/1
Inki Dae [Mon, 5 Oct 2020 05:09:10 +0000 (14:09 +0900)]
test: fix a type

Change-Id: Ia3ced406afc99243457377cde2459e13198f7d58
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agotest: Add NIKE-M board support 67/244567/1
Inki Dae [Tue, 22 Sep 2020 02:42:15 +0000 (11:42 +0900)]
test: Add NIKE-M board support

Change-Id: I5809659098c55189e13b969befe46224cfa0f3ff
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoCheck tensor data type correctly 55/242255/1 accepted/tizen_6.0_unified accepted/tizen_6.0_unified_hotfix tizen_6.0 tizen_6.0_hotfix accepted/tizen/6.0/unified/20201030.121100 accepted/tizen/6.0/unified/hotfix/20201103.051658 accepted/tizen/unified/20200831.002558 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 [Tue, 25 Aug 2020 08:18:16 +0000 (17:18 +0900)]
Check tensor data type correctly

Change-Id: I47a65126b6a5532477cd7b3fd2b30dc2f1153348
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoAdd uint64 and int64 data type 54/242254/1
Inki Dae [Tue, 25 Aug 2020 08:14:32 +0000 (17:14 +0900)]
Add uint64 and int64 data type

Change-Id: I24764b01a5873e79924e883ab53b50320a7b26cc
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agotest: Add Odroid-XU3 board support 13/237413/1
Inki Dae [Tue, 30 Jun 2020 06:59:07 +0000 (15:59 +0900)]
test: Add Odroid-XU3 board support

Change-Id: I463523251a6fb5c21d035019dcd0f93c8c835453
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agotest: Add NNStreamer's ML Single API backend test cases 30/236330/3 accepted/tizen/unified/20200628.221641 submit/tizen/20200626.050805 submit/tizen/20200626.060446 submit/tizen/20200626.070253
Inki Dae [Tue, 16 Jun 2020 08:27:52 +0000 (17:27 +0900)]
test: Add NNStreamer's ML Single API backend test cases

Change-Id: I8d0d4f4163328ad6907f8e4fb99b0d4832127e84
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 years agoChange in-house NN runtime backend name 20/236320/3
Inki Dae [Tue, 16 Jun 2020 07:41:41 +0000 (16:41 +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: I42ea92df4d9e3e7694d16b673b26db9e375575c0
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agotest: Perform test cases depending on current HW capability 43/235743/2
Inki Dae [Tue, 9 Jun 2020 07:04:40 +0000 (16:04 +0900)]
test: Perform test cases depending on current HW capability

This patch adds a new feature which detects Machine ID in runtime,
and then performs test cases properly depending on whether current
Platform is able to use GPU or NPU for the inference.

Linux kernel exposes device tree sysfs files which describe
HW information so this patch reads /sys/firmware/devicetree/base/model
file to get Machine name in runtime.

Based on this information, test case and profiler applications
decide whether inference should be performed on a given accelerator -
GPU or NPU - according on pre-defined HW table which contains
what kinds of HW accelerators can be used for the inference.

Change-Id: If052c9860dbb72f36c73baf6eb52f627bdde08a9
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agoFix coding style based on Tizen C++ Coding Rule 54/235354/4
Inki Dae [Thu, 4 Jun 2020 05:31:45 +0000 (14:31 +0900)]
Fix coding style based on Tizen C++ Coding Rule

Tizen C++ Coding Rule:
https://wiki.tizen.org/Native_Platform_Coding_Idiom_and_Style_Guide#C.2B.2B_Coding_Style

Change-Id: I71226dee9f5192292641a50bf5d5774133f34272
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agomv_inference: Change a function name from SetPluginType to SetPrivateData 73/235273/2
Inki Dae [Wed, 3 Jun 2020 08:42:34 +0000 (17:42 +0900)]
mv_inference: Change a function name from SetPluginType to SetPrivateData

This patch changes a function name from SetPluginType to SetPrivateData
to utilize it as more purposes which may be needed to pass some backend
private data to a given backend before loading a model file.

And also this patch makes IInferenceEngineCommon to become interface class
by declaring SetPrivateData funtion as a pure virtual function.

Change-Id: Icc0db970ca2b9d44e3954c50e837ebccc996b83d
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agoChange MLAPI backend string to "mlapi" 72/235172/1
Inki Dae [Tue, 2 Jun 2020 09:36:23 +0000 (18:36 +0900)]
Change MLAPI backend string to "mlapi"

Change-Id: I6914c71d00b59cadd3145bcd725129c827b1b6ce
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agoChange a backend type from VIVANTE to MLAPI 68/235168/1
Inki Dae [Tue, 2 Jun 2020 09:12:42 +0000 (18:12 +0900)]
Change a backend type from VIVANTE to MLAPI

Change-Id: Ia4210279f8efc4875f0c0db813c9f03d8411f7ff
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agoAdd ML Single API support of NNStreamer 41/234941/1
Inki Dae [Mon, 1 Jun 2020 02:16:53 +0000 (11:16 +0900)]
Add ML Single API support of NNStreamer

This patch adds ML Single API support of NNStreamer.

On MediaVision, NNFW(in-house NN Runtime) and Vivante NPU
will be controlled by inference-engine-mlapi backend
through ML Single API of NNStreamer.

As one more backends should be controlled by the inference-engine-mlapi
backend, this patch introduces a new function, SetPluginType,
which lets ML Single API know which tensor filter - NNFW or Vivante NPU -
should be used, and adds two backend types - Vivante and NNFW.

Change-Id: Iccf9fe97f5ec50c5c1bfd7bab48927e0f343f182
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agotest: Enable profiler for inference test 75/233375/1 accepted/tizen/unified/20200603.150125 submit/tizen/20200602.011936 submit/tizen/20200602.084841
Inki Dae [Thu, 14 May 2020 05:40:14 +0000 (14:40 +0900)]
test: Enable profiler for inference test

This patch enables and disbles the inference engine profiler
according to a given inference test request with a given mode,
storing profile data on file or just printing out it on
console screen.

Change-Id: I1528ecfb593d11a4686e4c388c01bb8dff9b6b97
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agoMerge "rename inference engine profiler relevant files" into tizen
Inki Dae [Thu, 14 May 2020 07:28:37 +0000 (07:28 +0000)]
Merge "rename inference engine profiler relevant files" into tizen

4 years agorename inference engine profiler relevant files 39/233339/2
Inki Dae [Thu, 14 May 2020 05:02:34 +0000 (14:02 +0900)]
rename inference engine profiler relevant files

This patch renames
src/inference_engine_profiler.cpp -> src/inference_engine_common_profiler.cpp
include/inference_engine_profiler.h -> include/inference_engine_common_profiler.h
because the name is conflicted with the one of inference engine profiler test file.

Change-Id: Ibce9ba539b02826601eac4f8eebe16cf32dabf2d
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agoSPEC:Add gcov option 37/233337/1
Hyunsoo Park [Thu, 14 May 2020 04:38:24 +0000 (13:38 +0900)]
SPEC:Add gcov option

For measuring line coverage, gcov option is added to spec file.
Build command is like below.

Usage:
gbs build -A armv7l --include-all --define "gcov 1"

Change-Id: Idf255054036adf8edeaddd51372834c92f9312a5
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
4 years agotest: Add OpenCV backend test support 65/233265/1
Inki Dae [Wed, 13 May 2020 09:00:43 +0000 (18:00 +0900)]
test: Add OpenCV backend test support

Change-Id: Ic44af23e2cf9b54aa84e6a7e502217466e3b9556
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agotest: Add new test cases for a new BindBackend function 54/233254/4
Inki Dae [Wed, 13 May 2020 08:09:10 +0000 (17:09 +0900)]
test: Add new test cases for a new BindBackend function

Change-Id: I9829475e6fe9bbe3794d7e01a1c523fbaa0e6c34
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agoAdd a new BindBackend function with backend type 53/233253/4
Inki Dae [Wed, 13 May 2020 08:07:59 +0000 (17:07 +0900)]
Add a new BindBackend function with backend type

This patch adds a new BindBackend function which requires
backend type as a parameter.

Change-Id: I842be4033d8cfd2cc3f2e455bd02123c95f126b4
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agoHandle exception cases to BindBackend 36/233236/3
Inki Dae [Wed, 13 May 2020 07:04:55 +0000 (16:04 +0900)]
Handle exception cases to BindBackend

This patch handles below two exception cases properly,
 - A case that user calls BindBackend second time.
 - A case that user calls BIndBackend with null parameter.

Change-Id: Ia104226b81b5fcb56fe0111a5d74f27ec4d0ed01
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agoDrop mBackendLibName member 35/233235/3
Inki Dae [Wed, 13 May 2020 06:57:51 +0000 (15:57 +0900)]
Drop mBackendLibName member

We can just use local varible instead of member one
so drop it.

Change-Id: I2f84e401b0af07a56b2bf1793d36da37980dceaf
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agoDrop SetLibraryPath and SetBackendEngine functions 34/233234/3
Inki Dae [Wed, 13 May 2020 06:50:03 +0000 (15:50 +0900)]
Drop SetLibraryPath and SetBackendEngine functions

These functions aren't needed anymore so drop them.

Change-Id: Ifee9279068efdbe7e5aa3e2937c00a7efa5f4c07
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agoAdd InitBackendEngine function for a new bind function 33/233233/3
Inki Dae [Wed, 13 May 2020 06:45:04 +0000 (15:45 +0900)]
Add InitBackendEngine function for a new bind function

This patch introduces a new private function, InitBackendEngine
which loads library file with a given backend library path.

This function will be used by other bind function which
passes backend type instead of name.

Change-Id: I54b1970b72c8cee258c9d33e4bd2a32ff5132a2f
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agotest: Add set input and output layer test cases 32/233232/3
Inki Dae [Wed, 13 May 2020 06:20:28 +0000 (15:20 +0900)]
test: Add set input and output layer test cases

This patch adds below new test cases,
 - SetInputLayer positive and negative tests.
 - SetOutputLayer positive and negative tests.

Change-Id: I3ec64d821b747b5c7a4365d7f56e1d16a15ec2a7
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agoCheck if a given property is valid or not 31/233231/1
Inki Dae [Wed, 13 May 2020 06:18:33 +0000 (15:18 +0900)]
Check if a given property is valid or not

Change-Id: Icd7ba4c1a68fbd215bb075fdd2e8255544dec86b
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agoClean up target device type verification code 25/233125/3
Inki Dae [Tue, 12 May 2020 09:10:46 +0000 (18:10 +0900)]
Clean up target device type verification code

INFERENCE_TARGET_MASK definition isn't needed so drop it
and use INFERENCE_TARGET_MAX instead.

Change-Id: I913f29f6963be95614307e12a0c8abb381b8c1c4
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agotest: update test cases 14/233114/1
Inki Dae [Tue, 12 May 2020 07:28:33 +0000 (16:28 +0900)]
test: update test cases

This patch adds below test cases,
 - Two negative tests for GetBackendCapacity callback.
 - Two negative tests and one positive test for SetTargetDevices callback.
 - Two negative tests for Load callback.

Change-Id: I30c3703d73be91455a0ac2afc8970f81731a7e43
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agotest: mitigate code duplication with lambda functions 13/233113/1
Inki Dae [Tue, 12 May 2020 05:38:49 +0000 (14:38 +0900)]
test: mitigate code duplication with lambda functions

Inference engine initialization is common to all test cases
so move the initialization code to lambda funtions and use them instead.

Change-Id: Ied4bfd77c19ceb3855f6e070a548cda6418e547e
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agoCheck if inference target types are valid or not 12/233112/1
Inki Dae [Tue, 12 May 2020 07:04:26 +0000 (16:04 +0900)]
Check if inference target types are valid or not

Change-Id: I8ad50b13b7377dde306d052267705f5465062c32
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agocheck inference engine backend handle correctly 11/233111/1
Inki Dae [Tue, 12 May 2020 06:27:59 +0000 (15:27 +0900)]
check inference engine backend handle correctly

inference engine backend callbacks should be requested
after the backend handle is checked if it is valid or not.

Change-Id: I15d25664186710d455835ed6d7055317d43275ca
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agohandle an error case to GetBackendCapacity correctly 10/233110/1
Inki Dae [Tue, 12 May 2020 06:16:20 +0000 (15:16 +0900)]
handle an error case to GetBackendCapacity correctly

Change-Id: I86f633f9b8b43a375b80e662d081a5537890e796
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agoReturn an error value correctly 72/233072/1
Inki Dae [Mon, 11 May 2020 09:28:42 +0000 (18:28 +0900)]
Return an error value correctly

Change-Id: I4b2f9fd312626277ffa98b391ef8d8229038a0fc
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agopackaging: drop capi-base-common dependency 71/233071/1
Inki Dae [Mon, 11 May 2020 08:54:38 +0000 (17:54 +0900)]
packaging: drop capi-base-common dependency

capi-bace-common package isn't required anymore.

Change-Id: I49afc28d97ddf8f7be808c16a3d6ccf72e07b25f
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agoClean up class member initialization 08/232908/1
Inki Dae [Fri, 8 May 2020 08:27:20 +0000 (17:27 +0900)]
Clean up class member initialization

Change-Id: I29328408fe8f7495ba71ef26e8df08f72a0d4109
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agotest: use smart pointer instead of raw one 89/232889/2
Inki Dae [Fri, 8 May 2020 06:46:40 +0000 (15:46 +0900)]
test: use smart pointer instead of raw one

Change-Id: I04e4f4e2f887d1850b4e2440a6d2f06a6029b546
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agoClean up constructor functions 88/232888/1
Inki Dae [Fri, 8 May 2020 06:29:45 +0000 (15:29 +0900)]
Clean up constructor functions

Constructor function of InferenceEngineCommon class doesn't need
any parameter so drop other unused functions.

Change-Id: Icb806d10050b55456929b6bca5e2901fee2b0354
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agoFix UNINIT.CTOR.MANY issues 28/232728/2 accepted/tizen/unified/20200510.220417 submit/tizen/20200508.021019
Inki Dae [Thu, 7 May 2020 09:14:11 +0000 (18:14 +0900)]
Fix UNINIT.CTOR.MANY issues

Change-Id: Ieef228cea4ac43b0da154659ca408b04ab726a35
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agoFix UNREACHABLE_CODE issues 27/232727/1
Inki Dae [Thu, 7 May 2020 09:05:57 +0000 (18:05 +0900)]
Fix UNREACHABLE_CODE issues

Change-Id: Idb729c0e74c21e60285df6dd1ffd1a0f9f217aeb
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agotest: rename a test file 80/232180/1
Inki Dae [Wed, 29 Apr 2020 03:14:39 +0000 (12:14 +0900)]
test: rename a test file

Just rename inference_engine_test.cpp to inference_engine_profiler.cpp

Change-Id: Ia20af23be4f6256dd969eb19a44ff5d780b9ad12
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agotest: avoid code from duplicated 79/232179/1
Inki Dae [Wed, 29 Apr 2020 03:09:06 +0000 (12:09 +0900)]
test: avoid code from duplicated

This patch moves common code from test files to
a new file, inference_enigne_test_common.cpp, to avoid
code from duplicated.

Change-Id: Id516b91298bc9fbef779d6568de449b9538ecba6
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agotest: add inference_engine_tc 78/232178/1
Inki Dae [Wed, 29 Apr 2020 02:56:37 +0000 (11:56 +0900)]
test: add inference_engine_tc

This patch adds a inference_engine_tc.cpp which
contains test cases moved from inference_engine_test.cpp.

Change-Id: I3e60b74b79a574f169d726447118dce883f58cfe
Signed-off-by: Inki Dae <inki.dae@samsung.com>
4 years agoDrop gmock dependency 46/231646/1 submit/tizen/20200423.083755 submit/tizen/20200424.035635 submit/tizen/20200424.041307 submit/tizen/20200424.055009
Inki Dae [Thu, 23 Apr 2020 07:19:11 +0000 (16:19 +0900)]
Drop gmock dependency

For gtest based tc, gmock isn't required.

Change-Id: I7eed61f7009e5c8dc5a6703cdcedac0045f963a0
Signed-off-by: Inki Dae <inki.dae@samsung.com>