platform/upstream/nnstreamer.git
23 months agoTools/Parser: Silence a warning about using a deprecated directive
Wook Song [Wed, 31 Aug 2022 07:51:17 +0000 (16:51 +0900)]
Tools/Parser: Silence a warning about using a deprecated directive

This patch fixes the following warning about using a deprecated
directive, '%pure-parser'. Note that '%pure-parser' is deprecated since
Bison 2.3b (bison_min_version defined in meson.build is 2.4).

../tools/development/parser/grammar.y:372.1-12: warning: deprecated directive: ‘%pure-parser’, use ‘%define api.pure’ [-Wdeprecated]
  372 | %pure-parser
      | ^~~~~~~~~~~~
      | %define api.pure
../tools/development/parser/grammar.y: warning: fix-its can be applied.  Rerun with option '--update'. [-Wother]

Signed-off-by: Wook Song <wook16.song@samsung.com>
23 months agotest:query launch mosquitto for testing
MyungJoo Ham [Thu, 18 Aug 2022 04:03:27 +0000 (13:03 +0900)]
test:query launch mosquitto for testing

Launch mosquitto with a random port for testing
and terminate it after testing.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
23 months agoTizen: add mosquitto at build-time for unit testing
MyungJoo Ham [Thu, 18 Aug 2022 02:15:42 +0000 (11:15 +0900)]
Tizen: add mosquitto at build-time for unit testing

Mosquitto is not used for building nnstreamer.
It is used for unit testing; thus, the built binaries
shouldn't have dependencies on Mosquitto.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
23 months ago[Py/Dims] error case to handle dimension
Jaeyun [Mon, 1 Aug 2022 09:54:58 +0000 (18:54 +0900)]
[Py/Dims] error case to handle dimension

Handle error case if rank from python script is larger than max rank value.
Update log message in python helper.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
23 months ago[Doc] Fix incorrect docement link
gichan [Tue, 30 Aug 2022 04:27:58 +0000 (13:27 +0900)]
[Doc] Fix incorrect docement link

Fix incorrect file path and names.

Signed-off-by: gichan <gichan2.jang@samsung.com>
23 months ago[TEST] Check more properties of query server.
gichan [Tue, 30 Aug 2022 02:15:04 +0000 (11:15 +0900)]
[TEST] Check more properties of query server.

Check more properties of query server.

Signed-off-by: gichan <gichan2.jang@samsung.com>
23 months ago[TEST] Enable edge releated test only.
gichan [Tue, 23 Aug 2022 07:29:40 +0000 (16:29 +0900)]
[TEST] Enable edge releated test only.

If "unit_test" is disabled and "edge_test" is enabled, run query and
edge test.

Signed-off-by: gichan <gichan2.jang@samsung.com>
23 months ago[TEST] Change test name.
gichan [Fri, 26 Aug 2022 01:47:33 +0000 (10:47 +0900)]
[TEST] Change test name.

To fix xml parser error, change the test name.

Error message: Unescaped '<' not allowed in attributes values

Signed-off-by: gichan <gichan2.jang@samsung.com>
23 months ago[Query/Test] Set listener port for query client accepted/tizen/unified/20220825.053108 submit/tizen/20220825.022456
gichan [Tue, 23 Aug 2022 07:45:58 +0000 (16:45 +0900)]
[Query/Test] Set listener port for query client

tensor client of TEST 5-2 and 5-3 use same default port for listener.
Set random available port for query client.

Signed-off-by: gichan <gichan2.jang@samsung.com>
23 months agotest/query: revive pid retrieval accepted/tizen/unified/20220819.122515 submit/tizen/20220818.081536 submit/tizen/20220819.071123
MyungJoo Ham [Tue, 16 Aug 2022 09:39:54 +0000 (18:39 +0900)]
test/query: revive pid retrieval

In recent commits, pid assignment after invoking background processes
has disappeared. Revivde pid assignment so that we can kill unnecessary
processes and avoid indefinite waits.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
23 months ago[spec] Disable AI Offloading on VD Cosmos infra
Sangjung Woo [Thu, 18 Aug 2022 04:28:01 +0000 (13:28 +0900)]
[spec] Disable AI Offloading on VD Cosmos infra

This patch disables the AI offloading feature on VD Cosmos infra.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
2 years agoproto/flat/flex buffers: reorganize common data structure.
MyungJoo Ham [Thu, 11 Aug 2022 04:33:35 +0000 (13:33 +0900)]
proto/flat/flex buffers: reorganize common data structure.

Do not have common data structures of ext modules in the
global-common directory. Put them in the ext modules
to avoid convoluted dependency.

Fixes #3837

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years agofilter:pytorch allow gcc only.
MyungJoo Ham [Tue, 16 Aug 2022 06:57:58 +0000 (15:57 +0900)]
filter:pytorch allow gcc only.

Do not allow to build with other compilers.
Refer to #3873 and https://lfscanning.org/reports/lfai/nnstreamer-2022-07-02-8eb54f0b-f36e-43ff-826f-80e9f251e17e.html

This is to comply with GPL-3.0 GCC Runtime Exception License of a few headers in PyTorch.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years ago[Query] fix res leak case
Jaeyun [Thu, 11 Aug 2022 08:55:42 +0000 (17:55 +0900)]
[Query] fix res leak case

Fix res leak in query elements.
Add destroy-cb function in query-server table to prevent mem leak.
Prevent duplicated creation of edge-handle in event callback.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Spec] feature to enable nns-edge
Jaeyun [Tue, 16 Aug 2022 07:52:49 +0000 (16:52 +0900)]
[Spec] feature to enable nns-edge

Add feature to support tensor_query using nnstreamer-edge library.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Query/Test] property name in test
Jaeyun [Thu, 11 Aug 2022 08:58:02 +0000 (17:58 +0900)]
[Query/Test] property name in test

Update property name in testcase (connect-type).

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Query/Test] caps string in query test
Jaeyun [Thu, 11 Aug 2022 10:50:36 +0000 (19:50 +0900)]
[Query/Test] caps string in query test

Add debug message to print caps string from query-server.
Prevent invalid caps when parsing tensors caps string in testcases.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[TEST] Disable query-hybrid test
gichan [Tue, 16 Aug 2022 05:53:13 +0000 (14:53 +0900)]
[TEST] Disable query-hybrid test

Disable query-hybrid test unitl the test is fixed.
Related issue: #3877

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[Edge] remove nns-edge
Jaeyun [Mon, 4 Jul 2022 07:09:06 +0000 (16:09 +0900)]
[Edge] remove nns-edge

nnstreamer-edge is moved to other repository.
Remove related files and build scrit.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Query] Remove unnecessary lines
Yechan Choi [Thu, 11 Aug 2022 16:11:32 +0000 (01:11 +0900)]
[Query] Remove unnecessary lines

This patch removes meaningless Caps releated actions from gst_tensor_query_serversink_start.

Signed-off-by: Yechan Choi <yechan9.choi@samsung.com>
2 years agotensor-decoder: add ssd_mobilenet v3 support accepted/tizen/unified/20220811.135951 submit/tizen/20220810.074948
Aymen Sghaier [Tue, 9 Aug 2022 09:02:42 +0000 (11:02 +0200)]
tensor-decoder: add ssd_mobilenet v3 support

This patch adds ssd_mobilent v3 support for post-processing,
it is needed for models without post-processing layer

ssd_mobilenet v3 models handle 2034 anchor boxes
while previous models v2 and v1 handles only 1917 boxes
thus updating the MAX value to 2034 adds support for v3 models

Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
2 years ago[Gst/Edge] Add edge pipeline tests
Yechan Choi [Mon, 1 Aug 2022 07:31:34 +0000 (16:31 +0900)]
[Gst/Edge] Add edge pipeline tests

Add edgesrc and edgesink pipeline tests.

Signed-off-by: Yechan Choi <yechan9.choi@samsung.com>
2 years ago[Gst/Edge] Init tests for edgesrc and edgesink
Yechan Choi [Thu, 21 Jul 2022 08:42:27 +0000 (17:42 +0900)]
[Gst/Edge] Init tests for edgesrc and edgesink

Init 'nnstreamer_edge/runTest.sh' and 'nnstreamer_edge/unittest_edge.cc'.
Modify 'tests/meson.build' for unittest_edge.

Signed-off-by: Yechan Choi <yechan9.choi@samsung.com>
2 years ago[test][trivial] Fix return errcode EPIPE to ESTRPIPE
Yongjoo Ahn [Fri, 5 Aug 2022 01:17:05 +0000 (10:17 +0900)]
[test][trivial] Fix return errcode EPIPE to ESTRPIPE

- Change return errcode EPIPE to ESTRPIPE according to ml-api's ret
  value

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[Query] Update query for new edge interface
gichan [Fri, 29 Jul 2022 06:42:49 +0000 (15:42 +0900)]
[Query] Update query for new edge interface

 - Update query for new edge interface.
 - Separate ip and port for self and destination.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[Edge] Update edge lib
gichan [Fri, 29 Jul 2022 06:41:05 +0000 (15:41 +0900)]
[Edge] Update edge lib

 - Update new edge interface.
 - Separate ip and port for self and destination.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years agoubuntu: force enable mqtt
MyungJoo Ham [Tue, 2 Aug 2022 09:53:32 +0000 (18:53 +0900)]
ubuntu: force enable mqtt

Force-enable mqtt for PPA / pdebuild builds.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years agopython: fix python 3.10 PyObject type errors.
MyungJoo Ham [Tue, 2 Aug 2022 04:49:23 +0000 (13:49 +0900)]
python: fix python 3.10 PyObject type errors.

From Python 3.10 python->C/C++ object transfer
has stricter type checks. Floats are no more
supported by PyLong.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years ago[Filter] support NNS_TENSOR_RANK_LIMIT 8
Yelin Jeong [Tue, 5 Jul 2022 08:31:14 +0000 (17:31 +0900)]
[Filter] support NNS_TENSOR_RANK_LIMIT 8

This patch changes filter pytorch and tensorflow lites
to support NNS_TENSOR_RANK_LIMIT 8

tensor_filter_pytorch's invoke does not have a problem when NNS_TENSOR_RANK_LIMIT is 4.
But when rank limit is 8, model->invoke has an exception while running the model.

Similarly, tensor_filter_tensorflow_lite's tflite_setInputDim has a problem.
TFLiteInterpreter::setInputTensorsInfo now iterates all possible ranks starting from MAX.
If NNS_TENSOR_RANK_LIMIT changed to 8, there is a case which ResizeInputTensor works
while AllocateTensors does not work.
So I chagned to iterate from MIN, and Allocate Tensors inside for loop.

Signed-off-by: Yelin Jeong <yelini.jeong@samsung.com>
2 years agoquery: doxygen tag comment fix
MyungJoo Ham [Mon, 1 Aug 2022 06:58:29 +0000 (15:58 +0900)]
query: doxygen tag comment fix

Use /** for doxygen-tag comments.
@gichan-jang : please apply this to nnstreamer-edge.git .

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years agoquery: fix null pointer access
MyungJoo Ham [Mon, 1 Aug 2022 06:50:41 +0000 (15:50 +0900)]
query: fix null pointer access

After the while loop, addrs may be a nullptr.
This causes a segmentation fault found with pdebuild/ubuntu 22.04.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years ago[CodeClean] fix typo, indent
Jaeyun [Mon, 1 Aug 2022 07:39:34 +0000 (16:39 +0900)]
[CodeClean] fix typo, indent

Code clean, trivial, fix typo / indent and add feature for sub-plugin in meson.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years agoubuntu: lose python 2
MyungJoo Ham [Fri, 29 Jul 2022 04:25:29 +0000 (13:25 +0900)]
ubuntu: lose python 2

Python3 is no more supported in 22.04. Lose it.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years agodebian: nnfw and tf-1 is now optional.
MyungJoo Ham [Wed, 20 Jul 2022 07:43:41 +0000 (16:43 +0900)]
debian: nnfw and tf-1 is now optional.

We are (temporarily?) dropping nnfw and tensorflow-1 support
from Ubuntu 22.04. Make dependencies to nnfw, tf-1 optional
in Debian build scripts.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years ago[Query] Implement mqtt-hybrid
gichan [Fri, 22 Jul 2022 01:47:58 +0000 (10:47 +0900)]
[Query] Implement mqtt-hybrid

Implement mqtt-hybrid using nnstreamer-edge lib.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[Edge] Add mqtt-hubrid feature
gichan [Fri, 22 Jul 2022 01:24:31 +0000 (10:24 +0900)]
[Edge] Add mqtt-hubrid feature

Add mqtt-hybrid feature to nns-edge lib.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[Edge] Sync with nnst-edge repo latest
gichan [Fri, 22 Jul 2022 00:47:54 +0000 (09:47 +0900)]
[Edge] Sync with nnst-edge repo latest

Sync with nnstreamer-edge repo latest.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[Join] Don't wait all pads get eos event.
gichan [Fri, 22 Jul 2022 11:05:58 +0000 (20:05 +0900)]
[Join] Don't wait all pads get eos event.

Don't wait all pad get eos event.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[TEST] Enable query test on ubuntu
gichan [Fri, 22 Jul 2022 10:23:49 +0000 (19:23 +0900)]
[TEST] Enable query test on ubuntu

Let's enable query test on ubuntu.
It seems that the problem that the test sometimes failed has now been solved.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[TEST] Apply background test to grpc
gichan [Mon, 25 Jul 2022 05:15:51 +0000 (14:15 +0900)]
[TEST] Apply background test to grpc

 - Apply background test to grpc.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[Svace] code clean and fix svace
Jaeyun [Thu, 21 Jul 2022 02:09:36 +0000 (11:09 +0900)]
[Svace] code clean and fix svace

Code clean, fix svace issues.
- check null string when getting caps from edge handle
- fix mem leak case
- fix invalid data comparison

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Doc] Update how-to-write-testcase.md
Yechan Choi [Wed, 20 Jul 2022 07:15:30 +0000 (16:15 +0900)]
[Doc] Update how-to-write-testcase.md

This patch updates 'runTest.sh' template.

Signed-off-by: Yechan Choi <yechan9.choi@samsung.com>
2 years agotests/grpc: remove timeout command
MyungJoo Ham [Thu, 14 Jul 2022 04:49:27 +0000 (13:49 +0900)]
tests/grpc: remove timeout command

GBS does not support timeout. Remove it.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years ago[Edge/Query] Replace caps info when set edge info.
gichan [Tue, 19 Jul 2022 09:39:58 +0000 (18:39 +0900)]
[Edge/Query] Replace caps info when set edge info.

Replace caps info when set edge info.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[Edge] Disable format warning
gichan [Thu, 14 Jul 2022 07:35:22 +0000 (16:35 +0900)]
[Edge] Disable format warning

Disable format warning to avoid build failure on macOS

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[Edge] Update edge lib
gichan [Thu, 14 Jul 2022 05:32:02 +0000 (14:32 +0900)]
[Edge] Update edge lib

Update edge lib
 - This chagnes will be removed soon.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[TEST] Modify query test
gichan [Wed, 8 Jun 2022 01:07:49 +0000 (10:07 +0900)]
[TEST] Modify query test

 - Some parameters are removed, change the query test.
 - Apply back ground test

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[Edge] Tensor query TCP connection
gichan [Wed, 8 Jun 2022 00:55:44 +0000 (09:55 +0900)]
[Edge] Tensor query TCP connection

Implement tensor query TCP connection using nnstreamer-edge lib.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years agodoc/distro-features: update features per distro
MyungJoo Ham [Thu, 14 Jul 2022 08:28:34 +0000 (17:28 +0900)]
doc/distro-features: update features per distro

Update the list of features deployed via distro releases.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years ago[Android] Update file list of nnstreamer elements
Sangjung Woo [Wed, 6 Jul 2022 02:19:34 +0000 (11:19 +0900)]
[Android] Update file list of nnstreamer elements

Since the paths and names of nnstreamer elements are changed, this patch
updates the Android NDK build file.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
2 years ago[Doc] Update markdown file list of nnstreamer elements
Sangjung Woo [Wed, 6 Jul 2022 01:36:55 +0000 (10:36 +0900)]
[Doc] Update markdown file list of nnstreamer elements

Since the paths and names of nnstreamer elements are changed, this patch
updates the markdown file list of nnstreamer elements.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
2 years ago[Common] Reduce Dependency complexity to increase the SAM score
Sangjung Woo [Sun, 3 Jul 2022 14:14:12 +0000 (23:14 +0900)]
[Common] Reduce Dependency complexity to increase the SAM score

There are lots of modules in /get/nnstreamer folder and it causes a high
dependency complexity. This patch reduces the module number by
integrating elements. Eventually it increases the DEP score from 2.73
to 5.0.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
2 years ago[Gst/MQTT/Sink] fix: Remove duplicated g_free for the message buffer
Yechan Choi [Tue, 19 Jul 2022 06:00:11 +0000 (15:00 +0900)]
[Gst/MQTT/Sink] fix: Remove duplicated g_free for the message buffer

This patch remove duplicated g_free for the message buffer(self->mqtt_msg_buf).

Signed-off-by: Yechan Choi <yechan9.choi@samsung.com>
2 years agodoc/edge-ai: update documentation
MyungJoo Ham [Thu, 14 Jul 2022 02:40:45 +0000 (11:40 +0900)]
doc/edge-ai: update documentation

Add more explanation on edge-AI / among-device AI

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years agodoc/component-description: apply recent updates.
MyungJoo Ham [Thu, 7 Jul 2022 08:04:05 +0000 (17:04 +0900)]
doc/component-description: apply recent updates.

We now have a lot more elements and features.
Update component desciption accordingly.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years ago[Svace] init member variables
Jaeyun [Mon, 18 Jul 2022 07:30:53 +0000 (16:30 +0900)]
[Svace] init member variables

Fix svace issue, initialize member variables in constructor.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Svace] fix svace issues
Jaeyun [Fri, 15 Jul 2022 09:11:42 +0000 (18:11 +0900)]
[Svace] fix svace issues

Fix svace issue, handle memory boundary and return code in test.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[test/tvm] Apply Test Fixture to remove redundant code
Sangjung Woo [Tue, 5 Jul 2022 16:22:29 +0000 (01:22 +0900)]
[test/tvm] Apply Test Fixture to remove redundant code

To remove duplicate code in each test case, this patch applies the test
fixture framework of Google Test. It helps focus on the test case
without considering model loading, or memory allocation.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
2 years ago[TEST/query] Do not use fixed port number
gichan [Thu, 14 Jul 2022 02:14:01 +0000 (11:14 +0900)]
[TEST/query] Do not use fixed port number

Do not use fix port number.
Let's get an available port number so that multiple tests do not use the same port number.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[Tests/Meson] Copy bmp2png to the tests directory every build time
Wook Song [Thu, 30 Jun 2022 10:56:06 +0000 (19:56 +0900)]
[Tests/Meson] Copy bmp2png to the tests directory every build time

In order to enforce to keep ./tests/bmp2png the same as the one in the
build directory, this patch modifies the meson build script to copy
bmp2png to the tests directory from the build directory every build time.

Signed-off-by: Wook Song <wook16.song@samsung.com>
2 years agofilter/python3: support multi-threaded python custon filters.
MyungJoo Ham [Thu, 7 Jul 2022 08:04:49 +0000 (17:04 +0900)]
filter/python3: support multi-threaded python custon filters.

Use Python GIL for multi-threaded python custom filters.
Don't use a local lock, use GIL.

Fixes #3822

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
ps. The execution result of CV2 enabled python code of #3822:

```
$ gst-launch-1.0 videotestsrc num-buffers=10 ! video/x-raw,format=RGB,width=280,height=40 ! tensor_converter ! tensor_filter framework=python3 model=p2.py input=3:280:40:1 inputtype=uint8 output=3:280:40:1 outputtype=uint8  ! tensor_decoder mode=direct_video ! videoconvert ! ximagesink
init_filter_py:844
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
--- USE_CV2:True /source/AutoDrv/NNStreamer/tests/p2.py (33600,)
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
--- USE_CV2:True /source/AutoDrv/NNStreamer/tests/p2.py (33600,)
--- USE_CV2:True /source/AutoDrv/NNStreamer/tests/p2.py (33600,)
--- USE_CV2:True /source/AutoDrv/NNStreamer/tests/p2.py (33600,)
--- USE_CV2:True /source/AutoDrv/NNStreamer/tests/p2.py (33600,)
--- USE_CV2:True /source/AutoDrv/NNStreamer/tests/p2.py (33600,)
--- USE_CV2:True /source/AutoDrv/NNStreamer/tests/p2.py (33600,)
--- USE_CV2:True /source/AutoDrv/NNStreamer/tests/p2.py (33600,)
--- USE_CV2:True /source/AutoDrv/NNStreamer/tests/p2.py (33600,)
--- USE_CV2:True /source/AutoDrv/NNStreamer/tests/p2.py (33600,)
Got EOS from element "pipeline0".
Execution ended after 0:00:00.333332913
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
```

2 years ago[github-action] Run GBS in github-action
MyungJoo Ham [Wed, 6 Jul 2022 04:54:52 +0000 (13:54 +0900)]
[github-action] Run GBS in github-action

Run gbs in github-action for more Tizen testing.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years agodoc/coding-convention: update the changes of recent years.
MyungJoo Ham [Wed, 6 Jul 2022 09:37:16 +0000 (18:37 +0900)]
doc/coding-convention: update the changes of recent years.

Coding convention for C++ has become more concrete and the components of nnstreamer and its neighbor have been updated.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years ago[Tests] Remove unnecessary line feeds in the runTest.sh files
Wook Song [Thu, 7 Jul 2022 03:40:28 +0000 (12:40 +0900)]
[Tests] Remove unnecessary line feeds in the runTest.sh files

This patch removes unnecessary line feed in the middle of the string
from the runTest.sh files.

Signed-off-by: Wook Song <wook16.song@samsung.com>
2 years ago[Tests/Query] Revise runTest.sh to support macOS
Wook Song [Fri, 1 Jul 2022 11:57:09 +0000 (20:57 +0900)]
[Tests/Query] Revise runTest.sh to support macOS

grep in macOS does not have -P, --perl-regexp. In addition, the stat's
option to specify a format also differs from that of Linux distros. This
patch revises runTest.sh to support macOS by applying the above
differences.

Signed-off-by: Wook Song <wook16.song@samsung.com>
2 years ago[tests/gRPC] Change the hard-coded shared object's extension
Wook Song [Tue, 5 Jul 2022 09:01:41 +0000 (18:01 +0900)]
[tests/gRPC] Change the hard-coded shared object's extension

This patch changes the hard-coded string, indicating the shared object's
extension, to SO_EXT provided by the SSAT API.

Signed-off-by: Wook Song <wook16.song@samsung.com>
2 years ago[tests/gRPC] Use ssat-api to check the size of marker.log
Wook Song [Tue, 5 Jul 2022 08:52:58 +0000 (17:52 +0900)]
[tests/gRPC] Use ssat-api to check the size of marker.log

In order to make the test script more portable, this patch changes the
stat command line checking the size of marker.log to the universal
command provided by the SSAT API.

Signed-off-by: Wook Song <wook16.song@samsung.com>
2 years agodoc/API-reference: elaborate the document.
MyungJoo Ham [Wed, 6 Jul 2022 09:31:32 +0000 (18:31 +0900)]
doc/API-reference: elaborate the document.

Add some explanations to the topic lists.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years ago[Edge] migrating edge library accepted/tizen/unified/20220707.133441 submit/tizen/20220706.100329
Jaeyun [Wed, 6 Jul 2022 04:58:49 +0000 (13:58 +0900)]
[Edge] migrating edge library

Prepare uploading edge library.
- temporally rename edge library in nnstreamer
- remove unnecessary param in edge APIs

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Tests/gRPC] Prepare a fallback value for PATH_TO_PLUGIN
Wook Song [Thu, 30 Jun 2022 08:55:25 +0000 (17:55 +0900)]
[Tests/gRPC] Prepare a fallback value for PATH_TO_PLUGIN

In case NNSTREAMER_BUILD_ROOT_PATH is not defined, the test cases for
gRPC might run in an unintentional way. To this end, this patch adds a
fallback value for PATH_TO_PLUGIN to runTest.sh.

Signed-off-by: Wook Song <wook16.song@samsung.com>
2 years agodist/Ubuntu: enable Float16 support
MyungJoo Ham [Tue, 21 Jun 2022 04:48:30 +0000 (13:48 +0900)]
dist/Ubuntu: enable Float16 support

Enable Float16 support in deb build.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years agodist/Tizen: Enable FLOAT16 in Tizen x64/arm64/arm32
MyungJoo Ham [Tue, 21 Jun 2022 04:46:07 +0000 (13:46 +0900)]
dist/Tizen: Enable FLOAT16 in Tizen x64/arm64/arm32

Although tensor-transform doesn't support fp16, yet,
let's enable fp16 support for further development.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years agotest: float16 arithmetic
MyungJoo Ham [Wed, 22 Jun 2022 05:37:25 +0000 (14:37 +0900)]
test: float16 arithmetic

By default, float16 tests are not critical.
However, if the envvar, "FLOAT16_SUPPORTED" is 1, they become
critical.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years agotensor-transform: float16 support.
MyungJoo Ham [Fri, 17 Jun 2022 04:26:33 +0000 (13:26 +0900)]
tensor-transform: float16 support.

ORC/SIMD support not included.
Float16 w/ heavy tensor-transform is not recommended.

- Generate error if float16 is used in unsupported build
- Generate warning if float16 op is used too heavily (it's slow!)
- Future todo: support SIMD for float16 ops

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years agotensor-filter subplugins: add FLOAT16 support
MyungJoo Ham [Fri, 17 Jun 2022 02:26:55 +0000 (11:26 +0900)]
tensor-filter subplugins: add FLOAT16 support

Add float16 support for a few subplugins
with possible float16 usages.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years agoIntroduce FLOAT16 stream type
MyungJoo Ham [Fri, 10 Jun 2022 04:26:04 +0000 (13:26 +0900)]
Introduce FLOAT16 stream type

Add FLOAT16 type.
Fortunately, gcc for x64, aarch64, and arm has extension for
float16.

@todo: update meson script so that arch-specific compiler
options for float16 can be added if float16 is enabled.

Addressed #3784

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years ago[gRPC/Common] Modify hard-coded strings indicating sub-plugins' names
Wook Song [Thu, 30 Jun 2022 08:42:17 +0000 (17:42 +0900)]
[gRPC/Common] Modify hard-coded strings indicating sub-plugins' names

This patch modifies the hard-coded strings (e.g., libnnstreamer_grpc_*.so)
which indicate the file name of the sub-plugins to use the pre-defined
file extensions according to the platform.

Signed-off-by: Wook Song <wook16.song@samsung.com>
2 years ago[Ext/Meson] Use find_program() instead of 'which'
Wook Song [Thu, 30 Jun 2022 11:07:05 +0000 (20:07 +0900)]
[Ext/Meson] Use find_program() instead of 'which'

This patch changes the way to find 'grpc_cpp_plugin' to use
find_program(), the built-in function provided by Meson.

Signed-off-by: Wook Song <wook16.song@samsung.com>
2 years ago[Edge] prepare migration
Jaeyun [Mon, 27 Jun 2022 10:53:25 +0000 (19:53 +0900)]
[Edge] prepare migration

Change header name for nnstreamer edge library.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Edge] refactoring edge cmd
Jaeyun [Fri, 24 Jun 2022 10:47:02 +0000 (19:47 +0900)]
[Edge] refactoring edge cmd

Refactoring to send/receive edge command and buffer.
- define command info struct to handle command, id, and memories.
- util functions to init, clear edge command.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Edge] client IDs in handle
Jaeyun [Wed, 22 Jun 2022 08:02:03 +0000 (17:02 +0900)]
[Edge] client IDs in handle

Remove global table for client IDs, and move it to edge handle.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Edge] new function to invoke event callback
Jaeyun [Wed, 15 Jun 2022 08:44:20 +0000 (17:44 +0900)]
[Edge] new function to invoke event callback

Add new function to invoke event and export edge-event functions.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Filter/TFLite] Fix model tensors allocation not working for some delegates
Julien Vuillaumier [Tue, 28 Jun 2022 07:31:40 +0000 (09:31 +0200)]
[Filter/TFLite] Fix model tensors allocation not working for some delegates

This change is correction for error below reported by the TFlite library
during Invoke():

"Invoke called on model that is not ready."

Tensors allocation may be done by TFLite framework during call to
ModifyGraphWithDelegate() but that is not guaranteed.
Therefore, even if delegates are used, tensors allocation must be done
explicitly with AllocateTensors(), prior to inferencing with Invoke().

Signed-off-by: Julien Vuillaumier <julien.vuillaumier@nxp.com>
2 years ago[Edge] invalid data info when copying edge data
Jaeyun [Fri, 24 Jun 2022 06:05:29 +0000 (15:05 +0900)]
[Edge] invalid data info when copying edge data

Fix mem leak and invalid data info when copying edge-data.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Edge] util functions for edge data
Jaeyun [Mon, 20 Jun 2022 07:56:26 +0000 (16:56 +0900)]
[Edge] util functions for edge data

Add new functions for edge data.
- The edge-data type is unnecessary when creating data handle.
- Client ID will be used in the pipeline, as a meta of buffer.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Edge] code clean
Jaeyun [Mon, 20 Jun 2022 08:11:23 +0000 (17:11 +0900)]
[Edge] code clean

Code clean, check returned err-code and params. Prevent null ptr exception case.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Edge] base code for mutex lock
Jaeyun [Fri, 10 Jun 2022 10:51:47 +0000 (19:51 +0900)]
[Edge] base code for mutex lock

Update macros and mutex lock in edge handle.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[trivial] Fix typos in the spec file
Yongjoo Ahn [Mon, 20 Jun 2022 04:52:54 +0000 (13:52 +0900)]
[trivial] Fix typos in the spec file

- Fix some typos in `nnstreamer.spec`.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[Edge] Add tcp implementation
gichan [Tue, 7 Jun 2022 09:39:01 +0000 (18:39 +0900)]
[Edge] Add tcp implementation

 - Add NNStreamer-edge TCP implementation.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[Edge] possible mem leak
Jaeyun [Fri, 17 Jun 2022 02:18:29 +0000 (11:18 +0900)]
[Edge] possible mem leak

Fix svace issue, mem leak case when connection is failed.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years agotest/grpc: correct parallel unit test calls
MyungJoo Ham [Thu, 9 Jun 2022 08:37:52 +0000 (17:37 +0900)]
test/grpc: correct parallel unit test calls

1. Do not fork ssat-api functions
2. Do not sleep constant time. Check the launch process.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years ago[Edge] remove unnecessary function
Jaeyun [Tue, 14 Jun 2022 07:39:15 +0000 (16:39 +0900)]
[Edge] remove unnecessary function

Code clean, remove unnecessary function and fix invalid return.
The edge-handle may have multiple connections, checking connection is unnecessary.
Instead, we will add internal function for each socket.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Doc] Add yocto daily build result in README.md
Yongjoo Ahn [Mon, 13 Jun 2022 08:06:10 +0000 (17:06 +0900)]
[Doc] Add yocto daily build result in README.md

- Add a link to build result of yocto (nnstreamer/meta-neural-network)

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[spec] Fix spec to cut the depedency on custom tflite in 64-bit accepted/tizen/unified/20220615.135323 submit/tizen/20220614.100238
Yongjoo Ahn [Tue, 14 Jun 2022 08:34:15 +0000 (17:34 +0900)]
[spec] Fix spec to cut the depedency on custom tflite in 64-bit

- In 64-bit the dep is like "libtensorflow2-lite-custom.so()(64bit)"
- To cut this properly, replace "so" with "*"

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years agotests: build error w/ higher gcc & lower gtest submit/tizen/20220614.070712
MyungJoo Ham [Thu, 2 Jun 2022 08:58:08 +0000 (17:58 +0900)]
tests: build error w/ higher gcc & lower gtest

If you have gcc >= 11 and gtest <= 1.8, you may have build errors:

/usr/src/gtest/src/gtest-death-test.cc: In function ‘bool testing::internal::StackGrowsDown()’:
/usr/src/gtest/src/gtest-death-test.cc:1009:24: error: ‘dummy’ may be used uninitialized [-Werror=maybe-uninitialized]
 1009 |   StackLowerThanAddress(&dummy, &result);
      |   ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/src/gtest/src/gtest-death-test.cc:999:6: note: by argument 1 of type ‘const void*’ to ‘void testing::internal::StackLowerThanAddress(const void*, bool*)’ declared here
  999 | void StackLowerThanAddress(const void* ptr, bool* result) {
      |      ^~~~~~~~~~~~~~~~~~~~~
/usr/src/gtest/src/gtest-death-test.cc:1007:7: note: ‘dummy’ declared here
 1007 |   int dummy;
      |       ^~~~~

As gtest's code is not our test target, let the compiler ignore warnings of gtest codes.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years ago[Edge] add mqtt functions
Jaeyun [Wed, 11 May 2022 07:29:20 +0000 (16:29 +0900)]
[Edge] add mqtt functions

Add internal functions to handle mqtt message.
This is initial commit for mqtt-hybrid feature after separating the edge library.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Edge] handle magic validation
Jaeyun [Fri, 10 Jun 2022 10:12:39 +0000 (19:12 +0900)]
[Edge] handle magic validation

Before adding mutex lock, update magic validation.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years agotest/query: update gtest utc for updated protocol property.
MyungJoo Ham [Thu, 9 Jun 2022 07:42:03 +0000 (16:42 +0900)]
test/query: update gtest utc for updated protocol property.

We now use enum type for protocol property, which is NO MORE case insensitive.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years agoQuery: fix protocol property handling
MyungJoo Ham [Thu, 9 Jun 2022 04:44:15 +0000 (13:44 +0900)]
Query: fix protocol property handling

Protocols are enum. Use enum-param, not int or string.
With this, users can use both numbers and enum-strings.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years agodoc/filter subplugin: brief guide on how to write subplugin
MyungJoo Ham [Wed, 8 Jun 2022 04:59:39 +0000 (13:59 +0900)]
doc/filter subplugin: brief guide on how to write subplugin

To clarify which mechanism to use for new tensor-filter subplugin,
added a short guide on how to write tensor-filter subplugin.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>