MyungJoo Ham [Wed, 27 Oct 2021 14:04:49 +0000 (23:04 +0900)]
tensor-filter-common: unnecessary usage of volatile
GLib-Once (g_once_init_enter/leave) have already taken
care of concurrency.
Its users do not need to worry about cache coherency or
concurrency issues for the initialization.
Actually, as #3440 is showing, the volatile keyword
is neglected by g_once_init_enter function, making
the usage of volatile meaningless anyway.
Remove volatile keyword and mitigate the first
compiler warning-error of #3440
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
gichan [Mon, 11 Oct 2021 10:59:10 +0000 (19:59 +0900)]
[MQTT] Wait until connection is established.
Change to wait until connection is successfully established within timeout
limit.
This patch fix the error:
ERROR: MQTTSrc: cb_mqtt_on_connect_failure: failed to connect to the broker: TCP/TLS connect failure.
Test pipeline:
Publisher
```bash
$ gst-launch-1.0 videotestsrc is-live=true ! video/x-raw,format=RGB,width=640,height=480,framerate=5/1 ! mqttsink pub-topic=test/videotestsrc
```
Subscriber
```bash
$ gst-launch-1.0 mqttsrc sub-topic=test/videotestsrc ! video/x-raw,format=RGB,width=640,height=480,framerate=5/1 ! videoconvert ! ximagesink
```
Signed-off-by: gichan <gichan2.jang@samsung.com>
Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
Jaeyun [Tue, 19 Oct 2021 07:22:42 +0000 (16:22 +0900)]
[svace] fix svace issue
Fix svace issue
- allocation with invalid size param
- possible int underflow
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Wed, 13 Oct 2021 02:44:44 +0000 (11:44 +0900)]
[Query] separate hybrid feature
Separate query-hybrid functions and fix build error.
- add new file for query-hybrid feature.
- change property name (mqtt-host > broker-host).
- function declaration on old ubuntu.
- mqtt-c library (downloaded from github released) requires thread.
- fix indent and code style.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Yongjoo Ahn [Fri, 8 Oct 2021 06:44:14 +0000 (15:44 +0900)]
[build/fix] Add Android log lib in meson
- Add android log lib dep when the platform is android.
- This resolves #3515
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Yongjoo Ahn [Fri, 8 Oct 2021 06:37:58 +0000 (15:37 +0900)]
[build/fix] Fix sign-unsign compare
- Fix sing-unsign value comapre in tensordec-pose
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Julien Vuillaumier [Thu, 14 Oct 2021 08:20:38 +0000 (10:20 +0200)]
[armnn] compilation error - unused parameter
correction for occurences of compilation error below, when compilation
switch ENABLE_ARMNN_CAFFE is disabled.
error: unused parameter '[parameter name]' [-Werror=unused-parameter]
Signed-off-by: Julien Vuillaumier <julien.vuillaumier@nxp.com>
Sangjung Woo [Tue, 12 Oct 2021 06:17:30 +0000 (15:17 +0900)]
[Doc] Fix the simple typo in tensor_quey doc
This patch fixes the simple typoes in tensor_quey README file.
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
Sangjung Woo [Wed, 13 Oct 2021 03:32:55 +0000 (12:32 +0900)]
[Query] Set TCP_NODELAY option to avoid buffering algorithm
Basically, the Nagle algorithm is enabled in TCP, which means that data
is buffered until there is a sufficient amount to send out. However, the
payload of Query should be sent as soon as possible, even if there is
only a small amount of data. This patch sets TCP_NODELAY option to avoid
buffering algorithm.
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
Gichan Jang [Wed, 6 Oct 2021 01:32:14 +0000 (10:32 +0900)]
[Query][NEED REVERT] Exclude tensor query from android build.
Exclude tensor query from android build until mqtt-hybrid is separated.
After the separation works, please revert this commit.
Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
gichan [Fri, 1 Oct 2021 02:21:44 +0000 (11:21 +0900)]
[TEST] Add MQTT-hybrid test
Test robustness of the query pipeline.
Server 1 stops when it receivces 3 buffers and the client reconnects to server 2.
Signed-off-by: gichan <gichan2.jang@samsung.com>
Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
gichan [Thu, 30 Sep 2021 09:45:46 +0000 (18:45 +0900)]
[Query] Add mqtt state change callback.
Add mqtt state change callback instead of uncertain sleep.
Signed-off-by: gichan <gichan2.jang@samsung.com>
Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
gichan [Thu, 30 Sep 2021 07:02:13 +0000 (16:02 +0900)]
[Query] Add meson option.
Exclude tensor_query from nnstreamer plugins if nnsquery is not available.
Signed-off-by: gichan <gichan2.jang@samsung.com>
Gichan Jang [Wed, 29 Sep 2021 01:25:49 +0000 (10:25 +0900)]
[QUERY] Robustness support of MQTT-hybrid
Releated issue: #3508
Robustness support of MQTT-hybrid.
If the connected server is stop, re-connect to another availabe server.
Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
Yongjoo Ahn [Fri, 17 Sep 2021 07:50:09 +0000 (16:50 +0900)]
[test/snpe] Add snpe unittest for uint8 input/output model
- Add a snpe model `add2_uint8.dlc` which takes
a single uint8 value as input.
- Add a unittest with it.
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Yongjoo Ahn [Fri, 17 Sep 2021 07:47:17 +0000 (16:47 +0900)]
[filter/snpe] Support uint8 input/output type
- If custom prop "InputType:uint8,OutputType:uint8" is given,
run the model as uint8 input/output type mode.
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Jaeyun [Tue, 5 Oct 2021 03:04:42 +0000 (12:04 +0900)]
[Build] fix build warning
Fix build warning (missing-braces, uninitialized).
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
MyungJoo Ham [Thu, 30 Sep 2021 08:24:08 +0000 (17:24 +0900)]
README update: add recent papers
1. ICSE 2021 SEIP (published)
2. ICSE 2022 SEIP (submitted)
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Yongjoo Ahn [Fri, 1 Oct 2021 05:20:45 +0000 (14:20 +0900)]
[test/mqtt] Fix and add negative testcases for mqttsink's invalid prop
- Test invalid properties of mqttsink with `gst_harness_new_parse`
instead of `g_object_set`.
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Yongjoo Ahn [Fri, 1 Oct 2021 05:17:48 +0000 (14:17 +0900)]
[test/mqtt] Remove a testcase which assumes no broker
- Remove a testcase which assumes no broker.
- When a broker running in the test env, it fails.
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Wook Song [Wed, 28 Jul 2021 09:30:57 +0000 (18:30 +0900)]
[Gst/MQTT] Introduce the Unix epoch synchronization using NTP
This patch introduces the self-synchronization mechanism of the Unix
epoch timestamps. Note that if the 'ntp-sync' property is set to true
(which means that if this feature is enabled), the pipeline would be
stuck after a while. This is because most of the public NTP servers
restrict clients not to poll too frequently. To fix it, polling
intervals and caching mechanisms should be applied to the NPT utility
functions.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Wook Song [Thu, 15 Jul 2021 08:49:12 +0000 (17:49 +0900)]
[Gst/MQTT] Add utility functions to get timestamps from NTP server
This patch adds the implementation of the basic utility functions to get
timestamps from the given or public NTP servers.
Signed-off-by: Wook Song <wook16.song@samsung.com>
MyungJoo Ham [Tue, 28 Sep 2021 07:52:55 +0000 (16:52 +0900)]
Start development of 2.1.0 (2.2 RC1)
This is the version marking for the 2.1.0 development start.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Mon, 9 Aug 2021 00:34:38 +0000 (09:34 +0900)]
Release of 2.0 Long-Term-Stable
This is NNStreamer 2.0 Long-Term-Stable release.
2.0's main features after 1.8 release include:
- Edge-AI capability (among-device AI) with pub/sub and query. In 2.0, this capability is an initial release without performance optimizations or feature extensions. We will eventually implement the promised optimizations and extensions with later (2.1+) versions.
- Tensor stream types updated: flexible tensors and sparse tensors are now supported. Single-tensor (other/tensor) is being obsoleted. Please use other/tensors instead.
- New H/W accelerators and AI frameworks supported
- Tensor-converter/decoder with subplugins and custom functions
- New elements: Tensor-IF, Join, Tensor-crop, Tensor-rate
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Taras Drozdovskyi [Fri, 24 Sep 2021 07:33:04 +0000 (10:33 +0300)]
[Doc] Add security policy
Benefits:
* Improve github profile
* One of the requirements of the CII Best Practices
Signed-off-by: Taras Drozdovskyi <t.drozdovsky@samsung.com>
Yongjoo Ahn [Mon, 27 Sep 2021 04:05:06 +0000 (13:05 +0900)]
[build/fix] Fix meson.build to skip snpe build when it's unavailable
- Change `error` with `message` to skip snpe build when it's unavailable
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Taras Drozdovskyi [Thu, 23 Sep 2021 07:35:03 +0000 (10:35 +0300)]
[Doc] Refactore badges in README.md
Changes are as follows:
1) Gitter - no change
2) DailyBuild - the project is successfully build
3) CII Best Practices - the project applies the best practices
4) LGTM Alerts - vulnerabilities found
5) Coverage - Test Coverage
6) Coverity - Defect Display
7) GitHub Repo Size - Repository Size
-) GitHub Issues - removed (indicated above on the page, has a negative shade)
-) GitHub Pull Requests - deleted (indicated above on the page, can be examined as not processed requests)
Signed-off-by: Taras Drozdovskyi <t.drozdovsky@samsung.com>
Jaeyun [Tue, 21 Sep 2021 01:33:40 +0000 (10:33 +0900)]
[Filter/openvino] fix invalid args
As mentioned in another PR, openvino subplugin calls accel function with invalid args.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Taras Drozdovskyi [Wed, 22 Sep 2021 07:53:40 +0000 (10:53 +0300)]
[Doc] Add LGTM badge
* In accordance with the requirement of the CII Best Practices: all achievements must be specified.
* Display the LGTM current status of the project.
Signed-off-by: Taras Drozdovskyi <t.drozdovsky@samsung.com>
Yongjoo Ahn [Thu, 16 Sep 2021 08:09:04 +0000 (17:09 +0900)]
[test/snpe] Add unittest for SNPE subplugin
- Add unittest for SNPE subplugin.
- Add a sample model file `add2_float.dlc` for the test.
It takes a single float value and returns a single float value
with plus 2.0.
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Yongjoo Ahn [Thu, 16 Sep 2021 08:05:50 +0000 (17:05 +0900)]
[build/snpe] Check host_machine and fix join_paths
- Check host_machine when using SNPE SDK.
- Use `join_paths` properly`
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Julien Vuillaumier [Thu, 16 Sep 2021 20:27:17 +0000 (20:27 +0000)]
[armnn] compilation error - unused parameter
correction for multiple occurences of compilation error:
error: unused parameter '[parameter name]' [-Werror=unused-parameter]
Signed-off-by: Julien Vuillaumier <julien.vuillaumier@nxp.com>
Julien Vuillaumier [Thu, 16 Sep 2021 20:20:44 +0000 (20:20 +0000)]
[armnn] compilation error - missing initializer
correction for compilation error:
tensor_filter_armnn.cc: In function 'int armnn_open(const GstTensorFilterProperties*, void**)':
nnstreamer_plugin_api_filter.h:568:76: error: missing initializer for member 'parse_accl_args::auto_accl' [-Werror=missing-field-initializers]
#define parse_accl_hw(...) parse_accl_hw_fill((parse_accl_args){__VA_ARGS__})
^
tensor_filter_armnn.cc:672:8: note: in expansion of macro 'parse_accl_hw'
hw = parse_accl_hw (prop->accl_str, armnn_accl_support);
^~~~~~~~~~~~~
Signed-off-by: Julien Vuillaumier <julien.vuillaumier@nxp.com>
Taras Drozdovskyi [Thu, 16 Sep 2021 14:30:52 +0000 (17:30 +0300)]
Final fix LGTM alerts
Final correction of alerts found by the LGTM, one of which is marked as false-positive
Signed-off-by: Taras Drozdovskyi <t.drozdovsky@samsung.com>
gichan [Wed, 15 Sep 2021 11:28:50 +0000 (20:28 +0900)]
[Bug] Fix config from structure function
Wrong forat variable is used at L908.
If tensors format is not given, defualt format should be static.
Signed-off-by: gichan <gichan2.jang@samsung.com>
gichan [Thu, 16 Sep 2021 02:43:22 +0000 (11:43 +0900)]
[TEST] Adjust state change timeout.
cppFilterObj.base03 test fail intermittenly on armv7l during state change to GST_STATE_PLAYING.
When measuring the state change tome, it took around 600~800ms on armv7l.
The current timeout is 1000ms, which is close to the boundary.
The test failure did not occur when repeated 1000 times.
Previously, it occurred about once in 20 times.
Signed-off-by: gichan <gichan2.jang@samsung.com>
Taras Drozdovskyi [Wed, 15 Sep 2021 09:58:22 +0000 (12:58 +0300)]
Fix some alerts that were detected by the LGTM system
nnstream project was analyzed by the LGTM system
Signed-off-by: Taras Drozdovskyi <t.drozdovsky@samsung.com>
Yongjoo Ahn [Wed, 8 Sep 2021 09:09:26 +0000 (18:09 +0900)]
[build/snpe] Build snpe subplugin when the platform supports the lib
- If the build platform supports snpe lib, use it to build snpe subplugin
- Add snpe related packages in spec
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Gichan Jang [Mon, 13 Sep 2021 05:20:50 +0000 (14:20 +0900)]
[query] Handle different framerate of clients
If data is not available in the socket, check the next socket.
So, server can hanlde different framerate of clients.
Todo:
- Create threads for each client.
Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
Jaeyun [Mon, 13 Sep 2021 07:52:02 +0000 (16:52 +0900)]
[Filter/SharedModel] fix svace
Fix svace issue,
- set next node when releasing the list item
- use macro to define local lock for shared table
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Mon, 13 Sep 2021 08:31:31 +0000 (17:31 +0900)]
[Svace] fix res leak case
Fix svace issue,
- fix invalid condition to check the args.
- possible res leak in query close function.
- condition to free strings for test models.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Mon, 6 Sep 2021 10:29:53 +0000 (19:29 +0900)]
[Test/CodeClean] improve coverage
Update testcase to improve test coverage.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
gichan [Fri, 13 Aug 2021 05:55:54 +0000 (14:55 +0900)]
[Query] Identify client using id
currently, ip address of the client is only used to distinguish client which will receive buffers.
In this case, server cannot distinguish if more than one client with the sampe ip is connected.
So instead of ip address, changed it to use the client's unique id.
Signed-off-by: gichan <gichan2.jang@samsung.com>
Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
Jaeyun [Mon, 6 Sep 2021 07:06:59 +0000 (16:06 +0900)]
[Test/Sparse] add testcase for common functions
Add new testcase for sparse tensor utils.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Mon, 6 Sep 2021 07:03:00 +0000 (16:03 +0900)]
[Sparse] change util function param
Change param - gst-memory to convert tensor data.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Tue, 7 Sep 2021 08:26:14 +0000 (17:26 +0900)]
[Meson] feature for supported plugins
Add feature for supported plugins in meson script.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Yongjoo Ahn [Tue, 7 Sep 2021 09:42:55 +0000 (18:42 +0900)]
[test/py] Fix test related python sources to increase SAM score
- Refactor complex functions to increase FME score
- Total python SAM score 3.82 -> 4.66
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Yongjoo Ahn [Mon, 6 Sep 2021 10:36:53 +0000 (19:36 +0900)]
[tvm/test] Add negative testcase for invalid custom prop
- Add negative testcases for invalid custom props
- Add valid custom prop in the positive launch testcase.
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
gichan [Fri, 3 Sep 2021 09:00:34 +0000 (18:00 +0900)]
[Doc] Add tensor_quey README.md
Add tensor query documentation.
- How to run examples.
- How to run test.
Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
Yongjoo Ahn [Fri, 3 Sep 2021 07:32:40 +0000 (16:32 +0900)]
[lua/test] Add tc for multiple tensor types in lua filter
- Add a testcase which covers all tensor types in tensor_filter::lua
- Add a negative case of invalid data type.
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Jaeyun [Fri, 27 Aug 2021 09:27:13 +0000 (18:27 +0900)]
[Test] aggregator from multi clients
Add testcase - aggregator from multiple clients using query meta.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Fri, 27 Aug 2021 05:37:15 +0000 (14:37 +0900)]
[Common/Adapter] aggregation from multi clients
Use hashtable to aggregate buffers from multiple clients.
- create gst-adapter for each client id
- for normal case, set default adaptor (no meta in gst-buffer)
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Tue, 31 Aug 2021 05:22:18 +0000 (14:22 +0900)]
[Test/CodeClean] new testcases for coverage
Add new cases to improve test coverage and fix some minor comment.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Gichan Jang [Wed, 25 Aug 2021 09:29:50 +0000 (18:29 +0900)]
[TEST] Add tensor query tests
Add tensor query tests.
line coverage increased from 6.6% to 77.6%.
Signed-off-by: gichan <gichan2.jang@samsung.com>
Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
Jaeyun [Mon, 30 Aug 2021 08:18:41 +0000 (17:18 +0900)]
[Test/Filter] testcase for filter-single
Add new testcases for tensor-filter single.
filter-single class is used only for ML single API. For coverage report, we need to run and test this class.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Yongjoo Ahn [Tue, 27 Jul 2021 03:11:41 +0000 (12:11 +0900)]
[tensor_sparse] Add SSAT test for tensor_sparse
- Add SSAT test for tensor_sparse_enc and tensor_sparse_dec
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Yongjoo Ahn [Tue, 27 Jul 2021 03:10:58 +0000 (12:10 +0900)]
[tensor_sparse] Implement tensor_sparse_enc and tensor_sparse_dec
- tensor_sparse_enc: encoding static tensors into sparse tensors
- tensor_sparse_dec: decoding sparse tensors into stsatic tensors
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Yongjoo Ahn [Tue, 27 Jul 2021 03:07:56 +0000 (12:07 +0900)]
[tensor_sparse] Implement util functions for sparse tensors
- Implement util functions for enc/decoding sparse tensors
- Allow sparse format caps in tensor_sink
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Jaeyun [Fri, 20 Aug 2021 09:48:16 +0000 (18:48 +0900)]
[Test/Py/CodeClean] reduce code complexity
Code clean, reduce complexity.
- use itertool to remove multi loops
- separate code blocks
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
MyungJoo Ham [Sun, 29 Aug 2021 12:59:16 +0000 (21:59 +0900)]
Fix mutex error in nnstreamer_filter_shared_model_insert_and_get
nnstreamer_filter_shared_model_insert_and_get may return without unlocking the mutex in an exception case.
Unlock it before exiting.
Junhwan Kim [Thu, 12 Aug 2021 11:46:58 +0000 (20:46 +0900)]
[Filter/TFLite] Fix remove shared model table
Refactored common removal behavior in destructor
Added mutex and callback on removal on shared table
Signed-off-by: Junhwan Kim <jejudo.kim@samsung.com>
Hyoung Joo Ahn [Tue, 29 Jun 2021 15:16:30 +0000 (00:16 +0900)]
[Filter/TFLite] enable the shared representation
For the specific purpose, the interpreters are need to be shared.
Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
Hyoung Joo Ahn [Tue, 29 Jun 2021 15:15:29 +0000 (00:15 +0900)]
[Filter] add a hash table for shared key
[Filter] add a hash table for shared key
Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
Jaeyun [Fri, 27 Aug 2021 09:29:07 +0000 (18:29 +0900)]
[Filter/Common] declare extern
Declare extern to prevent warning when using filter common functions in cpp.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Yongjoo Ahn [Fri, 27 Aug 2021 08:19:00 +0000 (17:19 +0900)]
[query/server] Fix possible leaks in query_server_data_free
- Free remaining TensorQueryConnection in conn_queue
- Clear error in query_connect
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Jaeyun [Thu, 26 Aug 2021 07:57:03 +0000 (16:57 +0900)]
[Query/Sink] handle error case
Fix error case, unmap memory block when failed to send data to client.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Gichan Jang [Tue, 24 Aug 2021 08:24:58 +0000 (17:24 +0900)]
[Query] Fix unnecessary unreference
GstBaseSink unref object after render.
So, don't need to unref out buffer.
Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
Gichan Jang [Fri, 20 Aug 2021 06:12:21 +0000 (15:12 +0900)]
[Query] Handle tensor query meta
- Null check of the tensor query meta
- Copy GstMeta of the first buffer to outbuf for collect pad.
-> Copy policy should be updated considering multiple clients.
Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
Gichan Jang [Wed, 25 Aug 2021 07:46:46 +0000 (16:46 +0900)]
[Query] Change property type
Change port property type to unsigned int.
Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
Jaeyun [Fri, 20 Aug 2021 06:16:05 +0000 (15:16 +0900)]
[Filter/Sub] add event handler for filter-fw v0
Add event handler for filter framework v0 and new event to check hw availability with custom option.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Yongjoo Ahn [Mon, 23 Aug 2021 06:30:27 +0000 (15:30 +0900)]
[mqtt/trivial] Fix typos in mqtt related codes
- Fix some minor typos in mqtt related codes
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Jaeyun [Wed, 18 Aug 2021 11:57:56 +0000 (20:57 +0900)]
[Test] unittest pkg
Add test directory into unittest pkg and remove generated files.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Fri, 20 Aug 2021 02:59:32 +0000 (11:59 +0900)]
[Test/Py/CodeClean] util functions to run test
Code clean, reduce duplicated source. Add util functions to run the unittest.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Thu, 19 Aug 2021 09:06:42 +0000 (18:06 +0900)]
[tools/pbtxt/py] fix warning
remove global variables - it complains not to set global val.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Xavier Roumegue [Thu, 19 Aug 2021 13:02:51 +0000 (13:02 +0000)]
[Test/bmp2png]: Fix -Werror errors after warnings level increase
This fixes the following error, encountered with gcc 10.2:
| ../../../../../../workspace/sources/nnstreamer/tests/bmp2png.c: In function 'save_png_to_file':
| ../../../../../../workspace/sources/nnstreamer/tests/bmp2png.c:95:16: error: variable 'status' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
| 95 | register int status = -1;
| | ^~~~~~
| cc1: all warnings being treated as errors
Signed-off-by: Xavier Roumegue <xavier.roumegue@nxp.com>
Xavier Roumegue [Thu, 19 Aug 2021 12:59:16 +0000 (12:59 +0000)]
[Filter/Vivante] Fix -Werror after warnings level increase
This fixes the following errors:
../../../../../../workspace/sources/nnstreamer/ext/nnstreamer/tensor_filter/vivante/tensor_filter_subplugin.c:411:50: error: unused parameter 'prop' [-Werror=unused-parameter]
411 | vivante_close (const GstTensorFilterProperties * prop, void **private_data)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
../../../../../../workspace/sources/nnstreamer/ext/nnstreamer/tensor_filter/vivante/tensor_filter_subplugin.c: In function 'vivante_invoke':
../../../../../../workspace/sources/nnstreamer/ext/nnstreamer/tensor_filter/vivante/tensor_filter_subplugin.c:456:17: error: comparison of integer expressions of different signedness: 'int' and 'uint32_t' {aka 'unsigned int'} [-Werror=sign-compare]
456 | for (i = 0; i < pdata->graph->input.num; i++) {
| ^
../../../../../../workspace/sources/nnstreamer/ext/nnstreamer/tensor_filter/vivante/tensor_filter_subplugin.c:507:17: error: comparison of integer expressions of different signedness: 'int' and 'uint32_t' {aka 'unsigned int'} [-Werror=sign-compare]
507 | for (i = 0; i < pdata->graph->output.num; i++) {
| ^
../../../../../../workspace/sources/nnstreamer/ext/nnstreamer/tensor_filter/vivante/tensor_filter_subplugin.c:438:51: error: unused parameter 'prop' [-Werror=unused-parameter]
438 | vivante_invoke (const GstTensorFilterProperties * prop,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
../../../../../../workspace/sources/nnstreamer/ext/nnstreamer/tensor_filter/vivante/tensor_filter_subplugin.c: In function 'vivante_getInputDim':
../../../../../../workspace/sources/nnstreamer/ext/nnstreamer/tensor_filter/vivante/tensor_filter_subplugin.c:538:56: error: unused parameter 'prop' [-Werror=unused-parameter]
538 | vivante_getInputDim (const GstTensorFilterProperties * prop,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
../../../../../../workspace/sources/nnstreamer/ext/nnstreamer/tensor_filter/vivante/tensor_filter_subplugin.c: In function 'vivante_getOutputDim':
../../../../../../workspace/sources/nnstreamer/ext/nnstreamer/tensor_filter/vivante/tensor_filter_subplugin.c:561:57: error: unused parameter 'prop' [-Werror=unused-parameter]
561 | vivante_getOutputDim (const GstTensorFilterProperties * prop,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
cc1: all warnings being treated as errors
Signed-off-by: Xavier Roumegue <xavier.roumegue@nxp.com>
Jaeyun [Thu, 19 Aug 2021 07:07:43 +0000 (16:07 +0900)]
[tools/pbtxt/py] fix warning
Fix warning - undefined variables.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Gichan Jang [Thu, 12 Aug 2021 09:55:37 +0000 (18:55 +0900)]
[Query] Support flexible tensors format
Support flexible tensors format for tensor query.
Test pipeline
server:
gst-launch-1.0 tensor_query_serversrc host=127.0.0.1 ! other/tensors,format=flexible ! tensor_query_serversink host=127.0.0.1
client:
gst-launch-1.0 v4l2src ! videoconvert ! videoscale ! video/x-raw,width=320,height=240,format=RGB,framerate=30/1 ! tensor_converter ! other/tensors,format=flexible ! tensor_query_client src-host=127.0.0.1 sink-host=127.0.0.1 ! tensor_converter input-dim=3:320:240 input-type=uint8 ! tensor_decoder mode=direct_video ! videoconvert ! ximagesink
Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
Jaeyun [Tue, 17 Aug 2021 03:19:52 +0000 (12:19 +0900)]
[SAM/CodeClean/Py] fix pylint and syntax error
Code clean, fix pylint warning and syntax error.
- indent with 4 spaces
- function name rule: lowercase
- 2 blank lines between class and function
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
gichan [Tue, 17 Aug 2021 07:10:14 +0000 (16:10 +0900)]
[LICENSE] Add SPDX reference in LICENSE file.
Add SPDX license identifier reference in LICENSE file.
Signed-off-by: gichan <gichan2.jang@samsung.com>
Yongjoo Ahn [Wed, 18 Aug 2021 04:53:51 +0000 (13:53 +0900)]
[tensor_query] Fix double free in tensor_query_server
- Assign NULL value after call `query_server_data_free` to prevent double free
- Remove some trailing spaces
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
gichan [Tue, 17 Aug 2021 02:13:52 +0000 (11:13 +0900)]
[Query] Change GLib types to standard types.
- Change type of the port from uint32 to uint16.
- Change Glib types to standard types.
Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
gichan [Fri, 13 Aug 2021 07:13:42 +0000 (16:13 +0900)]
[Query] Add address resolver for server
Add address resolver for server.
Signed-off-by: gichan <gichan2.jang@samsung.com>
Jaeyun [Tue, 17 Aug 2021 09:56:46 +0000 (18:56 +0900)]
[Filter/Sub] unnecessary log to get subplugin from ini
Remove unnecessary log while loading sub-plugins from conf file.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Gichan Jang [Wed, 18 Aug 2021 01:59:19 +0000 (10:59 +0900)]
[Query] Fix resource leak
Fix resource leaks reported by coverity.
Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
Sangjung Woo [Wed, 11 Aug 2021 07:40:25 +0000 (16:40 +0900)]
[Build] Set 'filter-aliases' option for trix-engine
The sub-plugin name of SRNPU is changed to trix-engine. So this patch
add 'trix-engine = srnpu' option in 'filter-aliases' field to provide
backward compatibility.
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
Sangjung Woo [Wed, 11 Aug 2021 07:36:46 +0000 (16:36 +0900)]
[Filter/Sub] Support 'filter-aliases' option
This patch supports the 'filter-aliases' option for searching the
sub-plugin. For example, if 'tf = tensorflow' option is given,
application developers can use 'framework = tf' in pipeline description
to use 'tensorflow' sub-plugin.
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
Yongjoo Ahn [Tue, 17 Aug 2021 04:59:26 +0000 (13:59 +0900)]
[fix/build] Fix build error unused vars
- Fix unused var build error in tensorrt related codes
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Jaeyun [Fri, 13 Aug 2021 05:41:06 +0000 (14:41 +0900)]
[Query] res leak
Code clean, fix possible res leak and invalid param.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Junhwan Kim [Tue, 10 Aug 2021 13:07:06 +0000 (22:07 +0900)]
[Query] Update server elements
Update query serversrc, serversink & meta-query
Src accepts connection from clients receiving messages such as
- Request Info : send back to client w/ src tensor config
- Start : indicates beginning of data transfer
- Data : contains tensor data
- End : ends transfer
Sink can identify client by meta-query, which contains host address
Sink sends transformed tensor by same policy
Example pipeline
```
gst-launch-1.0 tensor_query_serversrc host=127.0.0.1 ! other/tensors,num_tensors=1,dimensions=3:300:300:1,types=uint8,framerate=30/1 ! tensor_query_serversink host=127.0.0.1
gst-launch-1.0 v4l2src ! videoconvert ! videoscale ! video/x-raw,width=300,height=300,format=RGB,framerate=30/1 ! tensor_converter ! tensor_query_client src-host=127.0.0.1 sink-host=127.0.0.1 ! tensor_decoder mode=direct_video ! videoconvert ! ximagesink
```
Signed-off-by: Junhwan Kim <jejudo.kim@samsung.com>
Junhwan Kim [Tue, 10 Aug 2021 12:56:39 +0000 (21:56 +0900)]
[Query/common] Update server to handle multi-clients
Query server should be capable of serving multi-clients
Update asynchronous handler to accept async connection
Signed-off-by: Junhwan Kim <jejudo.kim@samsung.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>