platform/upstream/nnstreamer.git
2 years ago[Query] Implement tensor query client
Gichan Jang [Wed, 11 Aug 2021 01:03:55 +0000 (10:03 +0900)]
[Query] Implement tensor query client

Implement tensor query client.
todo: support various protocols, error handling

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
2 years ago[Repo] remove meta
Jaeyun [Mon, 9 Aug 2021 09:03:21 +0000 (18:03 +0900)]
[Repo] remove meta

Gstreamer-meta in tensor repo only handles pad caps. Move caps into repo-data and remove repo-meta info.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Query] Implement common utils for TCP
Junhwan Kim [Tue, 3 Aug 2021 08:32:17 +0000 (17:32 +0900)]
[Query] Implement common utils for TCP

Common API functions used for both client and server elements
Currently based on TCP connections

TODO
- Enable timeout

Signed-off-by: Junhwan Kim <jejudo.kim@samsung.com>
2 years ago[Gst/Mqtt] Resolve compiler warnings
Gichan Jang [Mon, 9 Aug 2021 02:58:32 +0000 (11:58 +0900)]
[Gst/Mqtt] Resolve compiler warnings

Resolve compiler warnings.
 - Unused parameter
 - Different type comparison

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
2 years ago[Filter] Rename srnpu to trix-engine accepted/tizen/unified/20210810.135401 submit/main/20210806.045326 submit/tizen/20210806.045403 submit/tizen/20210809.021120
Sangjung Woo [Wed, 4 Aug 2021 05:38:18 +0000 (14:38 +0900)]
[Filter] Rename srnpu to trix-engine

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

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
2 years ago[Config/Format] tensor format in config
Jaeyun [Tue, 20 Jul 2021 10:00:37 +0000 (19:00 +0900)]
[Config/Format] tensor format in config

Set tensor format from caps struct.
tensor stream has single format, so format in tensor-info struct is unnecessary.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years agoTFLite: Allow to skip flatbuf dep check
MyungJoo Ham [Wed, 4 Aug 2021 02:26:43 +0000 (11:26 +0900)]
TFLite: Allow to skip flatbuf dep check

In Yocto build, it appears that flatbuf dep check
is not available:
https://github.com/nnstreamer/meta-neural-network/blob/master/recipes-nnstreamer/nnstreamer/files/0001-Disable-flatbuf-check-for-tf-lite-for-yocto-build.patch

@anyj0527 : Let's remove all *.patch files from
meta-neural-network by updating related nnstreamer/*.git
*.patch files in meta-neural-network are obvious
hazards.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years ago[filter/SNAP] Add TensorFlow Lite support
Yongjoo Ahn [Mon, 2 Aug 2021 11:13:54 +0000 (20:13 +0900)]
[filter/SNAP] Add TensorFlow Lite support

- SNAP v3.0 supports inference with TensorFlow Lite.
- Add the supported enum.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[Subplugin/Py] prevent resizing the array length
Jaeyun [Mon, 2 Aug 2021 02:30:22 +0000 (11:30 +0900)]
[Subplugin/Py] prevent resizing the array length

In the sub-plugins for python, prevent resizing the array length when creating new array object.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Doc] Add serialized buffer description
gichan [Tue, 3 Aug 2021 01:15:42 +0000 (10:15 +0900)]
[Doc] Add serialized buffer description

Add serialized buffer description.(flatbuf, protobuf, flexbuf)

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[Test/Ubuntu] add nnfw test
Jaeyun [Tue, 27 Jul 2021 06:20:52 +0000 (15:20 +0900)]
[Test/Ubuntu] add nnfw test

enable nnfw subplugin test in ubuntu build.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Converter/Py] mem size
Jaeyun [Thu, 29 Jul 2021 07:29:53 +0000 (16:29 +0900)]
[Converter/Py] mem size

set memory size from mapped info, not buffer size.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Build] fix build error
Jaeyun [Fri, 30 Jul 2021 11:07:32 +0000 (20:07 +0900)]
[Build] fix build error

Fix build error after changing warning level.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years agoDIST (rpm/deb): add nnstreamer-util.h
MyungJoo Ham [Wed, 28 Jul 2021 09:20:13 +0000 (18:20 +0900)]
DIST (rpm/deb): add nnstreamer-util.h

The newly introduced external header should be
included in devel package.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years agoStyle fix of gst-indent
MyungJoo Ham [Wed, 28 Jul 2021 08:21:01 +0000 (17:21 +0900)]
Style fix of gst-indent

With a lot of files modified by previous "warning fix" commit,
unrelated style fixes are required.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years agoIncrease warning level and resolve compiler warnings.
MyungJoo Ham [Tue, 27 Jul 2021 10:31:11 +0000 (19:31 +0900)]
Increase warning level and resolve compiler warnings.

1. Increase warning level of meson from 1 --> 2.
2. Resolve all warnings.

TODO: Increase warning level further.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years agoCommon: add a common util header.
MyungJoo Ham [Wed, 28 Jul 2021 08:18:01 +0000 (17:18 +0900)]
Common: add a common util header.

For nnstreamer developers including sub-plugin writers,
provide a common nnstreamer utility header that does not
depend on additional libraries.

TODO: migrate such functions from other external headers.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years agoTransform: ignore warnings from generated files.
MyungJoo Ham [Wed, 28 Jul 2021 01:18:22 +0000 (10:18 +0900)]
Transform: ignore warnings from generated files.

For the increased warning level, add a script to ignore
warnings from generated C files.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years ago[Test] fix res leak
Jaeyun [Thu, 29 Jul 2021 06:09:07 +0000 (15:09 +0900)]
[Test] fix res leak

fix res leak in tvm testcase.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years agoMove nnstreamer_example to tests/
MyungJoo Ham [Wed, 28 Jul 2021 09:17:23 +0000 (18:17 +0900)]
Move nnstreamer_example to tests/

With nnstreamer_example directory at the top,
some users are confused and thought that this directory
is the official nnstreamer example apps.

However, these are merely example codes for unit tests;
thus, they should be moved into tests to prevent
the confusion.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years agoCommon: refactor silent_debug() and make it common
MyungJoo Ham [Thu, 15 Jul 2021 07:44:28 +0000 (16:44 +0900)]
Common: refactor silent_debug() and make it common

1. Provide common macro of silent_debug and silent_debug_caps,
 which had been repeatedly defined in each plugin.
2. Refactor the two macros to get "object" as an argument
 so that it wouldn't use implicit argument exceot for "DBG".

The same macros are not touched in /ext directory
because they are not supposed to include "tensor_common.h",
which is an internal header.

@todo There are a few subplugins in /ext (not tensor-filter)
that uses "tensor_common.h". They should be refactored not to
use internal headers so that we can separate them to
independent repo anytime. Although we don't have such plans,
we need to keep them as appropriate examples for users.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years ago[Common] remove tensor-config struct
Jaeyun [Wed, 7 Jul 2021 08:40:16 +0000 (17:40 +0900)]
[Common] remove tensor-config struct

Remove tensor-config struct (for single tensor) and replace it to tensors-config.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Query] Define tensor query common data structures.
Gichan Jang [Thu, 22 Jul 2021 05:17:23 +0000 (14:17 +0900)]
[Query] Define tensor query common data structures.

Re-define tensor query common data structures.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
2 years ago[TVM/test] Add models for more architectures
Junhwan Kim [Fri, 16 Jul 2021 10:59:24 +0000 (19:59 +0900)]
[TVM/test] Add models for more architectures

Add tvm test models to support test on arm and aarch64

Signed-off-by: Junhwan Kim <jejudo.kim@samsung.com>
2 years ago[Test] update testcases about changed caps
Jaeyun [Mon, 5 Jul 2021 11:14:02 +0000 (20:14 +0900)]
[Test] update testcases about changed caps

Old mime type for flex-tensor is removed, and added format in caps string.
Fix all related testcases.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Caps/Format] add tensor format in caps
Jaeyun [Mon, 5 Jul 2021 11:05:16 +0000 (20:05 +0900)]
[Caps/Format] add tensor format in caps

Add tensor format in caps.
Fix pad template with flex tensor and remove old mimetype.
Now caps string for flex-tensor has framerate field.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[SparseTensor] Define SparseTensor and API
Yongjoo Ahn [Wed, 16 Jun 2021 04:27:00 +0000 (13:27 +0900)]
[SparseTensor] Define SparseTensor and API

- Define a tensor_format for SparseTensor
- Define a info structure for SparseTensor which has "length" of
  non-zero elements
- Add a internal header `tensor_sparse_util.h` for util functions that
  will be used in related elements
- Add a union in GstTensorMetaInfo for SparseTensor

SparseTensors could be more efficient on processing of tensors that
contain a lot of zero values.
I'll adopt the coordinate list (COO) format for encoding it, same as
other NN frameworks.

The COO encoding for sparse tensors is comprised of REF:
(https://www.tensorflow.org/guide/sparse_tensor):

values: A 1D tensor with shape [N] containing all nonzero values.
indices: A 2D tensor with shape [N, rank], containing the indices of the
nonzero values.
dense_shape: A 1D tensor with shape [rank], specifying the shape of the
tensor.

For example a Tensor
```
[[1, 0, 0, 0]
 [0, 0, 2, 0]
 [0, 0, 0, 0]]
```
can be encoded as
```
SparseTensor(values=[1, 2], indices=[[0, 0], [1, 2]], dense_shape=[3, 4])
```

In our project, a SparseTensor should be encoded with these information:
```cpp
tensor_type   data_type;
tensor_dim    dense_shape;
unsigned int  nnz; /* the number of non-zero elements */
data_type     values[nnz];
unsigned int  indices[nnz][RANK_LIMIT];
```

Since data_type and dense_shape are could be represented in `GstTensorMetaInfo`,
Add a `GstSparseTensorInfo`, and let it have the `nnz` (number of non-zeros).
The values and indices are stored in a single memory chunk, and the
`nnz` information would be used for parsing the buffer.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[Build/Deb] dependency to NNFW
Jaeyun [Tue, 20 Jul 2021 10:57:09 +0000 (19:57 +0900)]
[Build/Deb] dependency to NNFW

Add new pkg for NNFW (ONE) in debian build.

Related issue: https://github.com/Samsung/ONE/issues/7196

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years agoPaho-mqtt: enable to use paho-mqtt w/o pkgconfig submit/tizen/20210723.070532
MyungJoo Ham [Fri, 9 Jul 2021 06:46:04 +0000 (15:46 +0900)]
Paho-mqtt: enable to use paho-mqtt w/o pkgconfig

In case pkgconfig is not available for paho-mqtt,
prepare hardcoded library dependencies for paho-mqtt.

However, using this hardcoded dependency is not recommended
and using pkgconfig files is already recommended.

paho-mqtt build is force-enabled for Debian, too.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years agoDebian: add debian release changelog for Sid
MyungJoo Ham [Wed, 7 Jul 2021 10:53:39 +0000 (19:53 +0900)]
Debian: add debian release changelog for Sid

Add Debian Sid as debian release target.
Sid is the "devel" version of Debian.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years agoDebian: enable armnn in Sid.
MyungJoo Ham [Mon, 5 Jul 2021 06:55:59 +0000 (15:55 +0900)]
Debian: enable armnn in Sid.

Debian-Sid has armnn without pkgconfig.
Allow to use armnn without pkgconfig file.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years agoMeson: use flatbuf if it's >= 2.0.0
MyungJoo Ham [Mon, 5 Jul 2021 05:19:29 +0000 (14:19 +0900)]
Meson: use flatbuf if it's >= 2.0.0

Restrict flatbuf version to 2.0.0 or higher.
Older flatbuf incurs test case errors.
Disable related test cases, too.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years agoUbuntu: Xenial build fail with pdebuild fixed.
MyungJoo Ham [Mon, 5 Jul 2021 03:30:30 +0000 (12:30 +0900)]
Ubuntu: Xenial build fail with pdebuild fixed.

Xenial appears to identify build-deps before dh_clean.
Keep Ubuntu-Xenial control file as default for this issue.

In Ubuntu-Bionic or Debian-Sid, there is no such issues.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years agoDebian: disable edge-tpu and openvino.
MyungJoo Ham [Mon, 5 Jul 2021 03:06:53 +0000 (12:06 +0900)]
Debian: disable edge-tpu and openvino.

Debian does not have edge-tpu or openvino ready, yet.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years agoDebian: skip SSAT for Debian
MyungJoo Ham [Mon, 5 Jul 2021 02:50:09 +0000 (11:50 +0900)]
Debian: skip SSAT for Debian

We have not duploaded SSAT for Debian.
Skip SSAT for Debian.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years agoDebian: draft Debian distro build files.
MyungJoo Ham [Thu, 1 Jul 2021 02:00:51 +0000 (11:00 +0900)]
Debian: draft Debian distro build files.

Provided packages are a bit different between Ubuntu and Debian.
Provide a different control file for Debian builds.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years agoDebian: multiple control files for different distros.
MyungJoo Ham [Wed, 30 Jun 2021 09:35:20 +0000 (18:35 +0900)]
Debian: multiple control files for different distros.

Build-deps cannot be dynamically replaced per distro.
Thus, we need to prepare multiple control files and
slap in appropriate control files with rules.

This allow to prepare Debian and Ubuntu simultaneously.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years ago[Coverity/MQTT/Sink] Fix a critical Coverity defect (WGID 1238814)
Wook Song [Thu, 22 Jul 2021 04:29:11 +0000 (13:29 +0900)]
[Coverity/MQTT/Sink] Fix a critical Coverity defect (WGID 1238814)

This patch fixes a critical Coverity defect (WGID 1238814), which is
tagged as FORWARD_NULL, in the GstMQTTSink plugin.

Signed-off-by: Wook Song <wook16.song@samsung.com>
2 years ago[Coverity/Tests/MQTT] Fix critical defects in MQTT test cases
Wook Song [Thu, 22 Jul 2021 00:54:56 +0000 (09:54 +0900)]
[Coverity/Tests/MQTT] Fix critical defects in MQTT test cases

This patch fixes the critical defects, 1238819,1238820, 1238824,
1238830, and 1238821, which are related to resource leak, in the MQTT
test cases.

Signed-off-by: Wook Song <wook16.song@samsung.com>
2 years ago[Coverity/MQTT/Src] Fix major coverity issues 1238821, 1238825, 1238826
Wook Song [Wed, 21 Jul 2021 08:13:29 +0000 (17:13 +0900)]
[Coverity/MQTT/Src] Fix major coverity issues 1238821, 1238825, 1238826

This patch fixes the major coverity issues related to missing locks in
the MQTT source element.

Signed-off-by: Wook Song <wook16.song@samsung.com>
2 years ago[Coverity/Tests/MQTT] Fix a critical coverity issue 1238828
Wook Song [Wed, 21 Jul 2021 07:35:00 +0000 (16:35 +0900)]
[Coverity/Tests/MQTT] Fix a critical coverity issue 1238828

This patch fixes a critical coverity issue (WGID: 1238828), which is
about uninitialized non-static variables in the GstMqttTestHelper class.

Signed-off-by: Wook Song <wook16.song@samsung.com>
2 years ago[Build] framework priority option
Jaeyun [Mon, 19 Jul 2021 06:57:24 +0000 (15:57 +0900)]
[Build] framework priority option

Add meson-option to set fw priority for file extension (.nb, .bin)

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years agoDecoder: Bounding boxes: option3 comments update
MyungJoo Ham [Fri, 16 Jul 2021 00:33:38 +0000 (09:33 +0900)]
Decoder: Bounding boxes: option3 comments update

Mobilenet-ssd-postprocess has its own syntax for option3.
Describe it for users.

This should be merged AFTER #3408

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years ago[Filter] init properites
Jaeyun [Tue, 20 Jul 2021 08:25:28 +0000 (17:25 +0900)]
[Filter] init properites

Add init code - newly updated properties in filter.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Coverity] Fix coverity issues (689481, 689480)
Junhwan Kim [Tue, 20 Jul 2021 01:29:10 +0000 (10:29 +0900)]
[Coverity] Fix coverity issues (689481, 689480)

Uninitialized read on `PackedFunc` assignment
Fix dynamic overflow

Signed-off-by: Junhwan Kim <jejudo.kim@samsung.com>
2 years ago[armnn] Fix coverity issue
Gichan Jang [Wed, 21 Jul 2021 02:51:06 +0000 (11:51 +0900)]
[armnn] Fix coverity issue

Fix converity issue
 - Fix resource leak (delete core when init failed)
 - Initialize networkid.
 - Fix use after free (stop test when there isn't test model)

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
2 years ago[Common] util function to copy tensor config
Jaeyun [Mon, 19 Jul 2021 11:08:24 +0000 (20:08 +0900)]
[Common] util function to copy tensor config

Add util function to copy tensor config struct.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Decoder/BoundingBox]: SSD: Estimate valid detection against sigmoid value
Xavier Roumegue [Tue, 13 Jul 2021 16:04:19 +0000 (16:04 +0000)]
[Decoder/BoundingBox]: SSD: Estimate valid detection against sigmoid value

The sigmoid/logistic function is mathematically monotonic by definition.
Hence, computing the bijective threshold value thanks to its inverse
function (logit) once and compare it directly against logistic activation
values while sorting out the valid detected objects, helps to significantly
improve pipeline latency, and reduce power consumption/cpu load.

Signed-off-by: Xavier Roumegue <xavier.roumegue@nxp.com>
2 years ago[Decoder/BoundingBox]: SSD: PP parameters can be set through option3
Xavier Roumegue [Tue, 13 Jul 2021 14:37:40 +0000 (14:37 +0000)]
[Decoder/BoundingBox]: SSD: PP parameters can be set through option3

The post processing parameters used to decode a mobilenet SSD neural
network can be optionally set through option3, using ':' as parameter
delimiter.

The option3 definition scheme is, in order, the following:
- box priors location file (mandatory)
- Detection threshold (optional, default set to 0.5)
- Y box scale (optional, default set to 10.0)
- X box scale (optional, default set to 10.0)
- h box scale (optional, default set to 5.0)
- w box scale (optional, default set to 5.0)
- IOU box valid threshold (optional, default set to 0.5)

The default parameters value could be set through the following option3
example:

... option3=box-priors.txt:0.5:10.0:10.0:5.0:5.0:0.5 ...
or
... option3=box-priors.txt ...
or
... option3=box-priors.txt:::::: ...

It's possible to set only few values, using the default values for
those not specified through the command line.
You could specify respectively the detection and IOU thresholds to 0.65
and 0.6 with the option3 parameter as follow:

... option3=box-priors.txt:0.65:::::0.6 ...

Signed-off-by: Xavier Roumegue <xavier.roumegue@nxp.com>
2 years ago[Tests/GRPC] Skip GRPC tests on the qemu/arm environment either
Wook Song [Wed, 14 Jul 2021 08:35:02 +0000 (17:35 +0900)]
[Tests/GRPC] Skip GRPC tests on the qemu/arm environment either

Since some system calls required by GRPC are not supported on qemu/arm
as well, this patch blocks SSAT-based GRPC test cases' running on such
environment.

See also: 8a3eedc95a814a27949de4850f4ed6b670ac3616

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years agoFilter/Vivante: apply gst-indent
MyungJoo Ham [Tue, 13 Jul 2021 09:33:53 +0000 (18:33 +0900)]
Filter/Vivante: apply gst-indent

Vivante filter codes incur gst-indent complaints.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years agoFilters: add custom property descriptions
MyungJoo Ham [Tue, 13 Jul 2021 09:32:59 +0000 (18:32 +0900)]
Filters: add custom property descriptions

This adds custom property descriptions for
- edge-tpu
- python3
- snap
- snpe
- tf-lite
- vivante

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[Filter/NNFW] add custom description accepted/tizen/unified/20210714.014142 submit/tizen/20210713.072613
Jaeyun [Mon, 12 Jul 2021 08:22:45 +0000 (17:22 +0900)]
[Filter/NNFW] add custom description

add custom option description in nnfw sub-plugin.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Query] add tensor query boilerplate
Junhwan Kim [Fri, 9 Jul 2021 04:18:17 +0000 (13:18 +0900)]
[Query] add tensor query boilerplate

- draft for tensor-query

Signed-off-by: Junhwan Kim <jejudo.kim@samsung.com>
3 years ago[Common/Util] function to get possible caps
Jaeyun [Mon, 5 Jul 2021 09:11:37 +0000 (18:11 +0900)]
[Common/Util] function to get possible caps

Fix nego error case, add new function to get possible caps from config.
When receives caps event, element should return all possible caps.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Doc] Fix android documentation
Junhwan Kim [Mon, 12 Jul 2021 09:20:18 +0000 (18:20 +0900)]
[Doc] Fix android documentation

- fix docs more likely to work for beginners

Signed-off-by: Junhwan Kim <jejudo.kim@samsung.com>
3 years ago[Common] util function to handle tensor format
Jaeyun [Mon, 5 Jul 2021 10:38:39 +0000 (19:38 +0900)]
[Common] util function to handle tensor format

Add util function to handle tensor format.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Caps/Tensor] caps string with format
Jaeyun [Thu, 24 Jun 2021 09:49:29 +0000 (18:49 +0900)]
[Caps/Tensor] caps string with format

Define caps template with tensor format.
After this PR, old caps (tensors/tensors-flexible) will be removed, and nnstreamer elements/testcases will be updated with new caps string.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Spec] Remove flatbuffers-python recommends section
Sangjung Woo [Mon, 12 Jul 2021 02:18:04 +0000 (11:18 +0900)]
[Spec] Remove flatbuffers-python recommends section

Because of the security issue, VD does not use the script language.
Moreover, VD officially uses Python 3.5 for debugging purposes but the
latest Tizen 6.5 uses Python 3.9. Because of this reason, 'Recommends:
flatbuffers-python' section should be removed for VD build infra.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[Query] Add common socket functions
Gichan Jang [Fri, 9 Jul 2021 03:20:14 +0000 (12:20 +0900)]
[Query] Add common socket functions

Add common sokcet functions for tensor-query.
Other common functions are added later.
tensor_query_src, tensor_query_sink and tensor_query_filter will use
these functions.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Split/Merge/Aggregator] caps template for single tensor
Jaeyun [Wed, 7 Jul 2021 06:36:11 +0000 (15:36 +0900)]
[Split/Merge/Aggregator] caps template for single tensor

Modify pad caps template - other/tensors with num 1.
Set src-pad caps using peer caps.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years agoARMNN: fix unittest fail
MyungJoo Ham [Tue, 6 Jul 2021 09:55:37 +0000 (18:55 +0900)]
ARMNN: fix unittest fail

1. Fix segmentation fault.

nnstreamerFilterArmnn.invoke02_n tests armnn_invoke() where
private_data == NULL, which incurs segmentation fault
of armnn subplugin.

2. Fix -EPERM of open()

If a Caffe/TFLite parser was not available at build time,
opening Caffe/TFLite file results in -EPERM.
Such cases should not be regarded as test-fail.

3. Fix error handling of armnn subplugin

Use the proper error codes!

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years agoTizen: re-enable armnn build.
MyungJoo Ham [Tue, 6 Jul 2021 02:46:49 +0000 (11:46 +0900)]
Tizen: re-enable armnn build.

Provide as many tensor-filter subplugins as possible!

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years agoARMNN: update deprecated type enum.
MyungJoo Ham [Tue, 6 Jul 2021 02:45:14 +0000 (11:45 +0900)]
ARMNN: update deprecated type enum.

QuantisedAsymm8 and QuantisedSymm16 are deprecated by both
Tizen and Debian's ARMNN versions.
Use new enum declarations.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years agoARMNN: enable Caffe/TFLite parses only when available
MyungJoo Ham [Mon, 5 Jul 2021 10:43:35 +0000 (19:43 +0900)]
ARMNN: enable Caffe/TFLite parses only when available

Include Caffe-parser or TFLite-parser only if they are
available at build-time.

Note that Debian-Sid does not have Caffe-parser ready with
its ARMNN-devel packages.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years agoARMNN: Fix comments
MyungJoo Ham [Tue, 6 Jul 2021 03:22:09 +0000 (12:22 +0900)]
ARMNN: Fix comments

Fix ArmNNCore::makeTfLiteNetwork's Doxygen description.

Reported-by: Dongju Chae <dongju.chae@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[TEST] Fix streambuffers test
Gichan Jang [Fri, 25 Jun 2021 05:48:34 +0000 (14:48 +0900)]
[TEST] Fix streambuffers test

Test fails on arm arch(gbs build) because buffer conversion takes long time.
The purpose of the test is converting other/tensors to streambuffers, so modifies the test.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Tests/GstMQTT] Initialize PTS and DTS in the dummy header
Wook Song [Wed, 7 Jul 2021 06:35:24 +0000 (15:35 +0900)]
[Tests/GstMQTT] Initialize PTS and DTS in the dummy header

This patch adds the initialization code of PTS and DTS in the dummy
header to the helper function that fills the timestamp information.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Tests/GstMQTT] Increase the timeout for receiving a message
Wook Song [Tue, 6 Jul 2021 06:50:27 +0000 (15:50 +0900)]
[Tests/GstMQTT] Increase the timeout for receiving a message

The default timeout, 10 secs, for receiving a message from the
subscribed topic might be short for sandboxed-test environments such as
GBS and Pbuilder. To avoid failure of GstMQTT test cases due to the
timeout, this patch increases the timeout to 1 min instead of using the
defualt one, 10 secs.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Tests/GstMQTT] Do not use 'fakevideosink' in test cases
Wook Song [Mon, 5 Jul 2021 12:21:14 +0000 (21:21 +0900)]
[Tests/GstMQTT] Do not use 'fakevideosink' in test cases

Since 'fakevideosink' is included in gst-plugins-bad, extra dependency
should be declared to use this element. To avoid it, this patch replaces
'fakevideosink' in the MQTT test cases with 'fakesink'.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Tests/GstMQTT] Rename the test suite that uses the mocking library
Wook Song [Mon, 5 Jul 2021 11:23:41 +0000 (20:23 +0900)]
[Tests/GstMQTT] Rename the test suite that uses the mocking library

This patch changes the test suite name including the test cases based
on the mocking Paho-MQTT APIs.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years agoRevert "[MQTT] Disable MQTT temporary"
Wook Song [Mon, 5 Jul 2021 11:56:10 +0000 (20:56 +0900)]
Revert "[MQTT] Disable MQTT temporary"

This reverts commit a78ad73ddc2d7068f8818f1c025a21e085e6b675.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[merge] remove tensor-config
Junhwan Kim [Thu, 1 Jul 2021 07:34:22 +0000 (16:34 +0900)]
[merge] remove tensor-config

- fix merge & converter

Signed-off-by: Junhwan Kim <jejudo.kim@samsung.com>
3 years ago[test/sink] fix tensor-config in test
Junhwan Kim [Thu, 1 Jul 2021 07:49:34 +0000 (16:49 +0900)]
[test/sink] fix tensor-config in test

- Fix unittest_sink & unittest_plugin

Signed-off-by: Junhwan Kim <jejudo.kim@samsung.com>
3 years ago[TVM/spec] Update spec for TVM
Junhwan Kim [Tue, 6 Jul 2021 04:45:50 +0000 (13:45 +0900)]
[TVM/spec] Update spec for TVM

- Update spec file

Signed-off-by: Junhwan Kim <jejudo.kim@samsung.com>
3 years ago[TVM] fix sub filter to fit stable version
Junhwan Kim [Tue, 6 Jul 2021 04:45:08 +0000 (13:45 +0900)]
[TVM] fix sub filter to fit stable version

- fix to tvm v0.7.0

Signed-off-by: Junhwan Kim <jejudo.kim@samsung.com>
3 years ago[Doc] Fix title to comply hotdoc rule
Gichan Jang [Tue, 6 Jul 2021 02:42:11 +0000 (11:42 +0900)]
[Doc] Fix title to comply hotdoc rule

Fix title to comply hotdoc rule.
Special characters are not allowed in the hotdoc title.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Doc] fix param annotation
Jaeyun [Tue, 6 Jul 2021 10:02:26 +0000 (19:02 +0900)]
[Doc] fix param annotation

fix param annotation of common util functions.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[CodeClean] prepare next caps nego
Jaeyun [Mon, 5 Jul 2021 05:19:51 +0000 (14:19 +0900)]
[CodeClean] prepare next caps nego

Code clean, prepare caps string with tensor format.
- clean source code and update description

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Aggregator] remove tensor-config
Junhwan Kim [Mon, 28 Jun 2021 08:19:52 +0000 (17:19 +0900)]
[Aggregator] remove tensor-config

replace tensor-config to tensors-config

Signed-off-by: Junhwan Kim <jejudo.kim@samsung.com>
3 years ago[Split] remove tensor-config
Junhwan Kim [Mon, 28 Jun 2021 04:17:48 +0000 (13:17 +0900)]
[Split] remove tensor-config

replace tensor-config to tensors-config

Signed-off-by: Junhwan Kim <jejudo.kim@samsung.com>
3 years ago[filter/log] Log filter statistics when the mode is enabled
Yongjoo Ahn [Fri, 2 Jul 2021 00:52:14 +0000 (09:52 +0900)]
[filter/log] Log filter statistics when the mode is enabled

- Log latency and throughput values when the mode is enabled
- This resloves issue #3186

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[pkg] Change group of nnstremaer package accepted/tizen/unified/20210702.133351 submit/tizen/20210702.044746
Jihoon Lee [Wed, 30 Jun 2021 07:47:22 +0000 (16:47 +0900)]
[pkg] Change group of nnstremaer package

This patch changes group of some packages to ML Framework

**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[MQTT] Disable MQTT temporary
Sangjung Woo [Thu, 1 Jul 2021 08:45:03 +0000 (17:45 +0900)]
[MQTT] Disable MQTT temporary

This patch disables the MQTT temporarily as a workaround for TC failure issue.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[Test/GstMQTT] Use gstmqtt_mocking_dep instead of gstmqtt_dep
Sangjung Woo [Thu, 1 Jul 2021 05:35:45 +0000 (14:35 +0900)]
[Test/GstMQTT] Use gstmqtt_mocking_dep instead of gstmqtt_dep

gstmqtt_dep is removed and newly gstmqtt_mocking_dep is declared.
This patch uses gstmqtt_mocking_dep to fix the buildbreak issue.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[Test/GstMQTT] trivial: Do not use underscore in test case's name
Wook Song [Mon, 28 Jun 2021 11:40:59 +0000 (20:40 +0900)]
[Test/GstMQTT] trivial: Do not use underscore in test case's name

This patch removes underscores in the test cases' names.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Test/GstMQTT] Improve line coverage of GstMQTT using mock functions
Wook Song [Fri, 28 May 2021 13:48:15 +0000 (22:48 +0900)]
[Test/GstMQTT] Improve line coverage of GstMQTT using mock functions

To improve line coverage of the GstMQTT plugins without the actual
running broker, this patch implements mock functions for the methods
related to publishing/subscribing to a topic in the Paho Asynchronou
MQTT C Client Library. Based on those mock functions, more test cases
for MQTTSink and MQTTSrc are added.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Gst/MQTT/Meson] Use the internal header in the test cases
Wook Song [Fri, 4 Jun 2021 08:40:33 +0000 (17:40 +0900)]
[Gst/MQTT/Meson] Use the internal header in the test cases

This patch modifies the meson build scripts to use the internal header
file for the GstMQTT elements in building those elements' test cases.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Dist/Debian] Add the MQTT elements to nnstreamer-misc
Wook Song [Mon, 7 Jun 2021 02:14:54 +0000 (11:14 +0900)]
[Dist/Debian] Add the MQTT elements to nnstreamer-misc

This patch adds the MQTT elements to the nnstreamer-misc package for
Ubuntu/Debian.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Dist/Tizen] Include the MQTT elements in the misc package
Wook Song [Mon, 7 Jun 2021 01:34:27 +0000 (10:34 +0900)]
[Dist/Tizen] Include the MQTT elements in the misc package

This patch updates the rpm spec file to include the MQTT elements in the
nnstreamer-misc package.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Test/MQTT] Fix the wrong usages of integer literals in g_object_set
Wook Song [Mon, 7 Jun 2021 05:25:42 +0000 (14:25 +0900)]
[Test/MQTT] Fix the wrong usages of integer literals in g_object_set

This patch fixes the wrong usages of integer literals in g_object_set.
In detail, G_GINT64_CONSTANT or G_GUINT64_CONSTANT macros are used for
the 64bit wide integer literals and the 'UL' suffixes are used for the
unsigned long integer literals.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Gst/MQTTSink] Use the platform dependent conversion specifier of gsize
Wook Song [Mon, 7 Jun 2021 03:46:59 +0000 (12:46 +0900)]
[Gst/MQTTSink] Use the platform dependent conversion specifier of gsize

This patch fixes a trivial bug. Since the length of gsize depends on
whether the platform is 32-bit or 64-bit, this patch replaces %lu with
GSIZE_FORMAT that is the platform-dependent conversion specifier of it.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years agoDist/spec: code clean w/ proper macro if/endif for unittest submit/tizen/20210630.024211
MyungJoo Ham [Mon, 28 Jun 2021 09:31:48 +0000 (18:31 +0900)]
Dist/spec: code clean w/ proper macro if/endif for unittest

Rewrite if-conditions for unit test executions.
Use direct conditions, not indirect conditions.
Add comments for conditions requiring further explanations.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[TensorFilter] Add SLSI NPU option as HW accelerator
Sangjung Woo [Tue, 29 Jun 2021 03:22:20 +0000 (12:22 +0900)]
[TensorFilter] Add SLSI NPU option as HW accelerator

This patch newly adds the SLSI NPU option as the HW accelerator.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[Crop] remove tensor-config struct
Jaeyun [Fri, 25 Jun 2021 08:21:19 +0000 (17:21 +0900)]
[Crop] remove tensor-config struct

Prepare refactoring about tensor config, remove tensor-config struct and replace to tensors-config.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years agomeson: configure inidir properly when a relative path is given.
MyungJoo Ham [Fri, 25 Jun 2021 07:11:35 +0000 (16:11 +0900)]
meson: configure inidir properly when a relative path is given.

If sysconfdir option is not given or a relative path is given,
add prefix so that its actual install path (which uses prefix
if a relative path is given) matches NNSTREAMER_CONF_FILE
macro in nnstreamer_conf.h

Fixes #3161

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years agopkgconfig: add nnstreamer-internal for API developers.
MyungJoo Ham [Wed, 23 Jun 2021 01:41:20 +0000 (10:41 +0900)]
pkgconfig: add nnstreamer-internal for API developers.

API developers require additional headers than subplugin writers,
which is packaged as "nnstreamer-internal".
With this additional pkgconfig file, such dependency can be met.

Fixes #3230

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years agoDist/spec: update pkg desc of devel/devel-internal
MyungJoo Ham [Wed, 23 Jun 2021 01:36:04 +0000 (10:36 +0900)]
Dist/spec: update pkg desc of devel/devel-internal

The role of devel package has been expanded since the
introduction. Update the descriptions.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[Test/TVM] Fix gbs test to run only on x86_64
Junhwan Kim [Fri, 25 Jun 2021 01:48:20 +0000 (10:48 +0900)]
[Test/TVM] Fix gbs test to run only on x86_64

TVM test model is compiled for x86_64, disable test on other architectures
TODO: prepare test models for more target devices

Signed-off-by: Junhwan Kim <jejudo.kim@samsung.com>
3 years ago[fix/lua] Fix convertiy/svace issues issued in lua source code
Yongjoo Ahn [Fri, 25 Jun 2021 01:55:45 +0000 (10:55 +0900)]
[fix/lua] Fix convertiy/svace issues issued in lua source code

- Use `g_malloc` instead of `malloc` to abort program when malloc fails
- Give correct size to `lua_newuserdata`

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>