Yongjoo Ahn [Tue, 6 Oct 2020 06:49:54 +0000 (15:49 +0900)]
[test/SSAT] Fix minor SSAT test issues
- Add an escape character in runTest.sh
- Open binary file with 'rb' mode, not 'r'
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Wook Song [Tue, 29 Sep 2020 14:40:47 +0000 (23:40 +0900)]
[Ext/Filter/Python] Set verify_model_path as TRUE
This patch sets verify_model_path as TRUE to delegate the verification
of the given model files (i.e., .py scripts) to the NNS common
framework.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Wook Song [Tue, 29 Sep 2020 14:39:40 +0000 (23:39 +0900)]
[Ext/Filter/PyTorch] Set verify_model_path as TRUE
This patch sets verify_model_path as TRUE to delegate the given model
files' verification to the NNS common framework and removes the
verification code from the PyTorch tensor_filter subplugin.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Wook Song [Tue, 29 Sep 2020 14:29:22 +0000 (23:29 +0900)]
[Ext/Filter/TF] Set verify_model_path as TRUE
This patch sets verify_model_path as TRUE to delegate the given model
files' verification to the NNS common framework and removes the
verification code from the TensorFlow tensor_filter subplugin.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Dongju Chae [Thu, 24 Sep 2020 01:26:28 +0000 (10:26 +0900)]
[Custom/TensorRT] Implement example custom filter for TensorRT
This patch implements example custom filter for TensorRT, which
reshapes tensor dimensions.
Reference sample:
https://github.com/NVIDIA/TensorRT/tree/master/samples/opensource/sampleDynamicReshape
Tested environment
- Desktop PC: Ubuntu 16.04, CUDA 11.0, TensorRT 7.1.3
- Jetson Nano: Ubuntu 18.04, CUDA 10.0, TensorRT 6.0.1 (i.e., Jetpack 4.3 installed)
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Dongju Chae [Mon, 5 Oct 2020 09:13:18 +0000 (18:13 +0900)]
[Build/TF-Lite] Check tf-lite version and don't use contrib path
This patch adds tf-lite version checking and makes it remove
'contrib' include path in tflite subplugin.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Wook Song [Thu, 24 Sep 2020 07:44:46 +0000 (16:44 +0900)]
[Ext/Filter/Meson] Do not build tflite-extension without flatbuffers-dev
This patch blocks the building of the TensorFlow-Lite subplugin without
resolving the dependency on libflatbuffers-dev.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Wook Song [Wed, 23 Sep 2020 07:35:42 +0000 (16:35 +0900)]
[Meson] Merge install-example into install-test
Since there are test cases that require custom-filters, the
install-example option should be set to true as well as the
install-test option to make the installed test cases fully work. To
avoid such tangled dependencies between these meson options, this patch
merges install-example into install-test.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Parichay Kapoor [Sat, 26 Sep 2020 04:10:26 +0000 (13:10 +0900)]
[docs] Update getting-started with minimal requirement
Update getting-started.md for ubuntu to include minimal requirement
required to build nnstreamer with default configuration
V2:
Added ninja-build as dependency as nnstreamer ppa meson does not
list it as a dependency
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Jaeyun [Thu, 24 Sep 2020 03:16:57 +0000 (12:16 +0900)]
[Meson] change license arg
change license arg in meson script (LGPL > LGPL-2.1)
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Bumsik Kim [Mon, 21 Sep 2020 14:19:43 +0000 (07:19 -0700)]
[tensor_filter] [patch 4/4] Remove double underscore of a macro
s/__NO_ANONYMOUS_NESTED_STRUCT/NO_ANONYMOUS_NESTED_STRUCT/g.
By the C99 standard, all identifiers with leading underscores are
reserved, and more importantly, are for use in file scope. Though this
rule are often not observed, its macro name (no anonymous nested struct)
may give an impression that it is a special GCC feature-related macros.
Signed-off-by: Bumsik Kim <k.bumsik@gmail.com>
Bumsik Kim [Mon, 21 Sep 2020 14:04:43 +0000 (07:04 -0700)]
[ext/tensor_filter] [patch 3/4] Initialize stats variables at compile-time
This initializes stats imformation in the same manner in the previous
commits in the patch.
Signed-off-by: Bumsik Kim <k.bumsik@gmail.com>
Bumsik Kim [Mon, 21 Sep 2020 13:57:36 +0000 (06:57 -0700)]
[ext/tensor_filter] [patch 2/4] Set unimplemented API fields
This resolves build errors of the previous commit.
This commit also let contributors to spot uminplemented parts
of the subplugins.
Signed-off-by: Bumsik Kim <k.bumsik@gmail.com>
Bumsik Kim [Mon, 21 Sep 2020 13:12:59 +0000 (06:12 -0700)]
[ext/tensor_filter] [patch 1/4] Initialize driver struct at compile-time
Initialize driver structs at compile-time by using designated
initializer.
This approach also improves readability and makes it easier to kepp
track of unimplemented APIs by partially forced to set fields manually
since g++ does not implement out-of-order (including skipped) designator.
Note that this commit fails to build, which shows the later point
mentioned. This is fixed in the later commit in this patch.
Signed-off-by: Bumsik Kim <k.bumsik@gmail.com>
Sangjung Woo [Fri, 18 Sep 2020 03:25:20 +0000 (12:25 +0900)]
[SPEC] Add libcapi-nnstreamer.so.0 symlink as workaround
This patch temporarily adds the 'libcapi-nnstreamer.so.0' symlink to
support the backward compatibility of the .Net APIs. It will be removed
when fixing TizenFX and Tizen rootstrap.
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
Sangjung Woo [Fri, 18 Sep 2020 02:02:33 +0000 (11:02 +0900)]
[API/Tizen] Add verson number to libcapi-nnstreamer.so
This patch adds the verson number to libcapi-nnstreamer.so and fixes the
packaging issue as follows:
$ rpm -qlp capi-nnstreamer-1.5.3-0.x86_64.rpm
/usr/lib64/libcapi-nnstreamer.so.1
/usr/lib64/libcapi-nnstreamer.so.1.5.3
/usr/share/licenses/capi-nnstreamer
/usr/share/licenses/capi-nnstreamer/LICENSE
$ rpm -qlp capi-nnstreamer-devel-1.5.3-0.x86_64.rpm
/usr/include/nnstreamer/nnstreamer-single.h
/usr/include/nnstreamer/nnstreamer.h
/usr/lib64/libcapi-nnstreamer.so
/usr/lib64/pkgconfig/capi-nnstreamer.pc
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
Geunsik Lim [Fri, 28 Aug 2020 04:45:29 +0000 (13:45 +0900)]
[TF2/Filter] Added a framework to support TF2-Lite (2.3.0)
This commit is to support Tensorflow Lite 2.3.0 (TF2-Lite) additionally,
so that we support Tensorflow 2.x based network models (e.g., ASR) in
the Tizen 6.X platform.
**Changelog**
* Version 3:
* Removed unnecessary tflite_nnapi delegation (@jaeyun-jung)
* Version 2:
* Added a debian packaging for TF-2.3.0 in tensorflow2 (review.tizen.org)
* https://review.tizen.org/gerrit/#/c/243189/ (Reviewed, Merged)
* https://launchpad.net/~nnstreamer/+archive/ubuntu/ppa-build-test (Published)
* Added unit-test with ssat
* Version 1:
* Added tflite2_support feature for meson build procedure
* Added TF2-Lite statements in the .spec file for Tizen
* Generate two libraries with "-DTFLITE_VERSION" flag from
the tensor_filter_tensorflow_lite.cc file
* Added nnstreamer-tensorflow2-lite package
Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
Dongju Chae [Tue, 15 Sep 2020 07:29:02 +0000 (16:29 +0900)]
[Build/TensorRT] Add TensorRT dependency
This patch adds TensorRT dependency.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Wook Song [Mon, 7 Sep 2020 08:46:58 +0000 (17:46 +0900)]
[Filter/Python] Do PyType_Ready prior to PyModule_Create
In some cases, PyType_Ready after PyModule_Create fails with returning
-1. As the official tutorial [1, 2] guided, this patch moves
PyType_Ready to the location before PyModule_Create.
[1] https://docs.python.org/3/extending/newtypes_tutorial.html
[2] https://docs.python.org/2/extending/newtypes.html
Signed-off-by: Wook Song <wook16.song@samsung.com>
Wook Song [Mon, 7 Sep 2020 08:35:24 +0000 (17:35 +0900)]
[Filter/Python] Make nnstreamer-python work with python 3.8 on macOS
In order to nnstreamer-python3 work with python 3.8 on macOS, this patch
revises the libpython name and the hard-coded file extensions of shared
libraries to fit macOS.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Wook Song [Mon, 7 Sep 2020 08:13:30 +0000 (17:13 +0900)]
[Meson] Add a variable indicating the shared library's file extension
To handle the variation in the file extension of a shared library
according to the platform, this patch adds a variable to indicate it.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Jaeyun [Wed, 16 Sep 2020 08:17:48 +0000 (17:17 +0900)]
[Filter/NNFW] enable set-dim function
ONE supports API to set input info, remove unnecessary feature about changing input shape.
TODO:
1. We should wait next ONE release - maybe ONE 1.10 on next month.
2. After the next ONE release, consider to publish nnstreamer 1.6.x release.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Wed, 16 Sep 2020 09:05:35 +0000 (18:05 +0900)]
[Android/Test] test for dynamic dim
Update testcase about dynamic invoke, change dimension to 1 ~ 4.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Wed, 16 Sep 2020 07:35:33 +0000 (16:35 +0900)]
[Android] add dec-util for each decoder subplugins
Recently common dec-util function is added, update Android mk to build each decoder sub-plugins.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Bumsik Kim [Thu, 10 Sep 2020 12:50:27 +0000 (05:50 -0700)]
[tools/debugging] Add how to trace a specific NNStreamer element
This patch adds a description on how to trace individual element
using silent property.
I personally found it useful while working on PR #2714.
Signed-off-by: Bumsik Kim <k.bumsik@gmail.com>
Bumsik Kim [Thu, 10 Sep 2020 08:07:41 +0000 (01:07 -0700)]
[ext/tensor_decoder] Configure framerate caps for all tensor_decoders
This patch add framerate caps for in all tensor_decoder modes.
While I was testing the gst-launch examples, I noticed that framerate
caps are dropped by tensor_decoder elements.
There are two problems I can think of:
1. What is the right framerate policies for tensor_decoder? (1)
2. Framerate policies are inconsistent across the tensor_decoder modes.
Some passthrough framerate caps (e.g. tensordec-directvideo.c)
but the others drop framerate caps.
This patch tries to solve at least question 2 by letting them passthrough. I keep @todo tags
regarding question 1 (1) because I do not know how to verify if this policy is correct, though
I think this would be enough.
I made a function in tensordecutil.c to share the same code.
(1): https://github.com/nnstreamer/nnstreamer/blob/
a1c9b45d1ac1f3a7b830df2fa17b962d88a128cf/ext/nnstreamer/tensor_decoder/tensordec-imagesegment.c#L303
Signed-off-by: Bumsik Kim <k.bumsik@gmail.com>
Sangjung Woo [Thu, 10 Sep 2020 07:09:12 +0000 (00:09 -0700)]
[TF-lite] Check flatbuffer dependency when tf-lite is enabled.
This patch adds the dependency check of flatbuffer when tf-lite filter
is enabled. It shows developers more detailed information instead of a
simple build break log.
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
Wook Song [Mon, 7 Sep 2020 06:27:37 +0000 (15:27 +0900)]
[Filter/Python] Apply the change since v3.8 in the PyCore library name
This patch applies the change since v3.8 in the PyCore library name
from libpythonX.Xm.so.1.0 to libpythonX.X.so.1.0.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Wook Song [Mon, 7 Sep 2020 05:45:18 +0000 (14:45 +0900)]
[Meson] Use python3-embed when the version of given python3 is 3.8
python3.pc no longer provides the Libs section required to use Python
C-API since v3.8. To resolve it, this patch modifies the meson build
script to change a dependency declaration on python3 to python3-embed
when the version of a given python is upper than v3.8.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Parichay Kapoor [Tue, 8 Sep 2020 10:36:20 +0000 (19:36 +0900)]
[hw/accl] Move hardware dependent code out of tensor_filter
As per the comments received in #2651, this patch moves the hardware
dependent code out of the tensor filter.
V2:
Also updated bugfix for linux (non android, non tizen) arm build
for proper header inclusion.
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Jaeyun [Wed, 9 Sep 2020 08:32:36 +0000 (17:32 +0900)]
[TF-lite] remove nnfw-delegate feature
NNFW delegate feature is unnecessary.
NNFW supports method to set backend and no more need to set NNFW-delegation in tf-lite plugin.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
MyungJoo Ham [Wed, 9 Sep 2020 11:41:52 +0000 (20:41 +0900)]
Start of NNStreamear 1.7.0 development.
1.7.0 is 1.8.0-RC1.
x.ODD.y is developmental version.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Fri, 14 Aug 2020 10:09:56 +0000 (19:09 +0900)]
Release of NNStreamer 1.6.0 LTS
This is NNStreamer 1.6.0 release along with
- Tizen 6.0 M2 release
- Android/Phone product release
We will release 1.6.0 after all the internal testing/verification
is completed.
Hotfixes after this may create NNStreamaer 1.6.y.
If new features are being merged after 1.6.0, we will
branch out 1.6.y branch and start 1.7.x development from
the main branch.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Jaeyun [Tue, 22 Sep 2020 08:48:43 +0000 (17:48 +0900)]
[Android] remove memcpy while converting java object
With no-alloc invoke function, creates java object for output tensors and set direct buffer address.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Tue, 22 Sep 2020 07:29:40 +0000 (16:29 +0900)]
[C-Api/Single] invoke no-alloc function
Add new function to invoke the model with pre-allocated output data handle.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Thu, 17 Sep 2020 10:46:55 +0000 (19:46 +0900)]
[C-Api/Single] prepare no-alloc invoke
Code clean, prepare new API to invoke the model with allocated output data handle.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Thu, 17 Sep 2020 08:37:18 +0000 (17:37 +0900)]
[Android] new function to create data object
Prepare next version to reduce latency while converting the tensors.
Add new native function to create data object.
After implementing new single-shot API (no data alloc in invoke API), I will update Java invoke method to remove memcpy.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Wook Song [Fri, 18 Sep 2020 05:42:38 +0000 (14:42 +0900)]
[Meson] Enable fbs-support only if versions of flatc and libs are matched
This patch revises meson.build to enable the flatbuf-support only if the
versions of flatc and libflatbuffers are matched.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Wook Song [Tue, 15 Sep 2020 08:28:44 +0000 (17:28 +0900)]
[Meson] Add missing dependency in flatbuffer-support declaration
This patch adds the missing dependency in the flatbuffer-support feature
declaration.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Wook Song [Mon, 14 Sep 2020 02:44:04 +0000 (11:44 +0900)]
[Tests/Meson] bugfix: Fix meson failure because of no dependency on GTEST
This patch fixes issue-2722, which is meson failure in some test cases
when there is no dependency on GTEST.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Dongju Chae [Thu, 10 Sep 2020 02:26:34 +0000 (11:26 +0900)]
[Coverity] Fix unreachable codes
This patch fixes unreachable codes reported by coverity.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Yongjoo Ahn [Thu, 10 Sep 2020 03:11:18 +0000 (12:11 +0900)]
[Coverity] Fix CWE-466 (Lock) in tizensensor_get_property
The conditions in `if` statements is guaranteed in the get_property function, so remove this part
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Wook Song [Thu, 10 Sep 2020 02:52:08 +0000 (11:52 +0900)]
[Coverity/Repo] Fix CWE-366 in tensor_repo
This patch fixes CWE-366 (Race Condition within a Thread) in
gst_tensor_repo_add_repodata () of tensor_repo.c.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Wook Song [Thu, 10 Sep 2020 02:35:32 +0000 (11:35 +0900)]
[Coverity/Common] Fix CWE-476 in tensor_common
This patch fixes CWE-476 (NULL Pointer Dereference) in
gst_tensors_info_parse_names_string () of tensor_common.c.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Parichay Kapoor [Tue, 8 Sep 2020 07:51:48 +0000 (16:51 +0900)]
[single/test] Add unittest for allocate_in_invoke free with single API
This patch adds unittest for single API using tensor filters custom framework
which support allocate_in_invoke
Further, adds negative and positive unittests verifying that the output
memory can be allocated by the user or when the single API handle is closed
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Wed, 2 Sep 2020 14:17:04 +0000 (23:17 +0900)]
[single] Resolve tensor filter memory leak
When tensor filter with allocate in invoke allocate the memory,
its memory should be destroyed with the filters destroy notify
However, this was ignored till now for single API (#2593)
This patch fixes this
Single handle now creates a list of each such data buffer
as well as the single handle is stored in the data buffer.
If data buffer is deallocated, then destroyNotify is called from the
single handle stored in it.
However, if single handle is closed before data buffer is freed,
then all the memory is freed from the list of the data buffers
stored in the single handle.
Resolves #2593
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Jaeyun [Wed, 9 Sep 2020 03:55:13 +0000 (12:55 +0900)]
[Android] reduce method call
While converting tensor data, reduce method call to set each tensor.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
gichan-jang [Tue, 8 Sep 2020 09:33:57 +0000 (18:33 +0900)]
[Dist/debian] Fix nnstreamer install files
Since nnstreamer-protobuf package seperated from nnstreamer package, fix SO list of nnstreamer.
Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
Jaeyun [Thu, 3 Sep 2020 11:59:55 +0000 (20:59 +0900)]
[Android/NNFW] parse option
add new constructor and parse option string in NNFW sub-plugin.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Fri, 4 Sep 2020 03:10:30 +0000 (12:10 +0900)]
[Filter/NNFW] call close when failed to open model
Code clean, call _close() function when failed to open the model file.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Tue, 8 Sep 2020 02:24:22 +0000 (11:24 +0900)]
[Android/Build] remove unnecessary file
android template (proguard rule) is unnecessary, remove this file.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Tue, 8 Sep 2020 05:05:36 +0000 (14:05 +0900)]
[SVACE] fix svace issue
reset private data after deallocation.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Chunseok Lee [Thu, 3 Sep 2020 07:30:36 +0000 (16:30 +0900)]
onert(nnfw) uses 'cpu;bcq' as default backend
For now, there is no api to use bcq backend from android java
application. Thus, as a workaround, set 'cpu;bcq' as a deafult backend.
Signed-off-by: Chunseok Lee <chunseok.lee@samsung.com>
Jaeyun [Tue, 8 Sep 2020 02:41:42 +0000 (11:41 +0900)]
[Android/NNFW] update version
Change NNFW version to 1.9.0.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Mon, 7 Sep 2020 04:39:02 +0000 (13:39 +0900)]
[Android/NNFW/Build] nnfw headers
download and extract nnfw headers from devel pkg.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Fri, 4 Sep 2020 05:15:58 +0000 (14:15 +0900)]
[Android/NNFW] nnfw prebuilt libs
It is unnecessary to link all nnfw prebuilt libs. Only nnfw-dev requires to build aar.
This may fix unexpected error in nnfw runtime env.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Yongjoo Ahn [Fri, 4 Sep 2020 08:55:03 +0000 (17:55 +0900)]
[Android/SNPE] Modify SNPE prebuilt libs
- We do not need to link all snpe prebuilt libs: only libSNPE requires to build aar
- Move excluded libs to jniLibs
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Jaeyun [Thu, 3 Sep 2020 07:41:10 +0000 (16:41 +0900)]
[Filter/NNFW] directory as model parameter
Support model path as model property for NNFW.
NNFW requires model path to open model.
Current tensor-filter and API does not allow directory string.
Check the model property and if it is directory, set framework to NNFW.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Tue, 1 Sep 2020 05:44:26 +0000 (14:44 +0900)]
[NNFW] remove json-glib dependency
json-glib dependency is unnecessary when removing metadata validation in NNFW sub-plugin.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Tue, 1 Sep 2020 05:36:11 +0000 (14:36 +0900)]
[Filter/NNFW] remove metadata validation
ONE team requests to remove metadata validation.
Remove metadata validation in NNFW sub-plugin.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Dongju Chae [Wed, 2 Sep 2020 04:22:03 +0000 (13:22 +0900)]
[Clamp/UnitTest] Add testcases for transform clamp mode
This patch adds ssat testcases for trasnfrom clamp mode.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Dongju Chae [Fri, 28 Aug 2020 08:00:37 +0000 (17:00 +0900)]
[Clamp] Support 'clamp' as tensor_transform's option
This patch supports 'clamp' as tensor_transform's option.
It requires min/max values to apply clamp for input tensor data.
The usage is like below:
... ! tensor_transform mode=clamp option=-123.902313:150.837601 ! ...
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Parichay Kapoor [Fri, 14 Aug 2020 12:51:01 +0000 (21:51 +0900)]
[filter] Independency on order of the properties
This patch adds independence on the order of setting the properties
Properties of tensor filter which depends on the framework can now be set before setting the framework as well
When setting the framework, these properties are set again from the cache
Resolves #2650
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Tue, 18 Aug 2020 02:27:56 +0000 (11:27 +0900)]
[ext/nnfw] Check availability of neon at runtime
This patch adds checking the availability of NEON SIMD instructions on the machine
at runtime. If the NEON is not found, the auto accelerator of NEON backend is switched
to basic CPU. However, the NEON is still in the supported list of backends, and this
does not limit user from setting the backend of NEON even though its not available.
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Tue, 18 Aug 2020 07:25:13 +0000 (16:25 +0900)]
[tf_support] Change assert to throw/try/catch
Update assert to throw and catch them later before returning to the C-API.
This is required while setting the cached properties.
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Dongju Chae [Wed, 2 Sep 2020 07:50:31 +0000 (16:50 +0900)]
[Bug/TensorSplit] Fix the offset calculation bug
This patch fixes the offset calculation bug in tensor split
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Jaeyun [Tue, 1 Sep 2020 11:51:30 +0000 (20:51 +0900)]
[Android] deallocate direct buffer
Direct buffer allocated from native will not release the buffer.
Create instance in java and set byte array, then call method to add tensor data.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Tue, 1 Sep 2020 06:46:09 +0000 (15:46 +0900)]
[Filter/TF] fix deallocator ptr
fix function ptr when creating new tensor struct in tf sub-plugin.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Tue, 1 Sep 2020 09:00:49 +0000 (18:00 +0900)]
[CodeClean] fix coverity issue
check return value when setting conf path after test is done.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Sangjung Woo [Thu, 27 Aug 2020 07:32:55 +0000 (16:32 +0900)]
[Docs] Add a '%' before http
This patch adds a '%' before http to avoid html link. It is related to
Tizen public header issue.
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
Dongju Chae [Fri, 28 Aug 2020 08:07:11 +0000 (17:07 +0900)]
[Stand/Typo] Fix a minor typo in 'stand' transform desc
This patch fixes a minor typo in 'stand' transform desc.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Yongjoo Ahn [Tue, 25 Aug 2020 12:08:37 +0000 (21:08 +0900)]
[android/test] Remove recently added testcases
- Currently, the exception from tensor_filter is not handled properly in naive api
- It causes test failure in specific build setting, so remove it
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Yongjoo Ahn [Tue, 25 Aug 2020 12:02:16 +0000 (21:02 +0900)]
[android/build] Remove unnecessary build flag
- Remove `-Wno-exceptions` flag from Android-snpe.mk
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Jaeyun [Thu, 27 Aug 2020 08:30:57 +0000 (17:30 +0900)]
[Filter/Cpp] typo in cpp check
fix typo, cpp std version macro.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
MyungJoo Ham [Fri, 14 Aug 2020 05:34:51 +0000 (14:34 +0900)]
Dist/Tizen,Ubuntu: Add nnstreamer-util package
Package nnstreamer-check at /usr/bin with "nnstreamer-util" package.
Note that this does NOT require nnstreamer installation.
If there is no nnstreamer detected, it will simply say that nnstreamer is not found.
The utility, "nnstreamer-check", is supposed to search for nnstreamer installation with GStreamer infrastructure.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Thu, 13 Aug 2020 10:44:06 +0000 (19:44 +0900)]
[Utility] NNStreamer-Check
The new utility, "nnstreamer-check", shows
NNStreamer configuration dump to stdout.
This helps nnstreamer developers who suffer from
installation paths and configuration paths.
Fixes #2638
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Jaeyun [Tue, 25 Aug 2020 10:57:24 +0000 (19:57 +0900)]
[Android] log message
change log message when failed to create single-shot instance.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Yongjoo Ahn [Mon, 24 Aug 2020 07:37:23 +0000 (16:37 +0900)]
[Android/Test] Add Test cases for SNPE Singleshot api
- Add two negative TCs for invalid custom properties
- Add a TC to test utilizing DSP runtime
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Yongjoo Ahn [Mon, 24 Aug 2020 07:34:57 +0000 (16:34 +0900)]
[filter/SNPE] Add exception for configuring instance
- Throw invalid_argument exception when it fails to configure options
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Jaeyun [Thu, 20 Aug 2020 09:07:17 +0000 (18:07 +0900)]
[Android/Test] img classification using NNFW
Add simple testcase of image classification result using NNFW.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
gichan-jang [Mon, 24 Aug 2020 05:50:49 +0000 (14:50 +0900)]
[TEST] Fix duplicated test
Fix duplicated test in capi.
Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
Sangjung Woo [Mon, 24 Aug 2020 05:09:54 +0000 (14:09 +0900)]
[CAPI] Update sample code for Custom Filter
This patch adds the Tensor dimension information, which is omitted in
the sample code.
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
Yongjoo Ahn [Thu, 20 Aug 2020 12:07:06 +0000 (21:07 +0900)]
[filter/tflite] Cache tensor ptr after the first invoke
- This resolves #2665
- For some tflite models, the `Invoke()` function newly reserve the vector `tensors_`
- To fix this issue, cache after the first invoke
REF:
- [void Subgraph::EnsureTensorsVectorCapacity()](https://github.com/tensorflow/tensorflow/blob/v1.13.1/tensorflow/lite/core/subgraph.h#L400)
- [TfLiteStatus Subgraph::Invoke()](https://github.com/tensorflow/tensorflow/blob/v1.13.1/tensorflow/lite/core/subgraph.cc#L611)
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Yongjoo Ahn [Thu, 20 Aug 2020 06:59:57 +0000 (15:59 +0900)]
[trivial/lint] Fix minor coding style
- Add spaces
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Jaeyun [Thu, 20 Aug 2020 08:09:50 +0000 (17:09 +0900)]
[Decoder] signed and unsigned comparison
Fix svace issues, signed / unsigned value comparison.
Also prevent underflow to set the number of detected objects.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Thu, 20 Aug 2020 08:06:38 +0000 (17:06 +0900)]
[Common] check ptr after mem allocation
Add code to check mem ptr after the allocation.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
MyungJoo Ham [Thu, 20 Aug 2020 07:51:24 +0000 (16:51 +0900)]
[Tizen/DA] DA wants to omit openvino
Remove openvino for DA's own build configurations.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Wook Song [Tue, 18 Aug 2020 02:45:58 +0000 (11:45 +0900)]
[Ext/Decoder] Support face detection models for OpenVino
The output tensor description of face detection model for OpenVino is
the same as that of person detection model for the same framework. This
patch updates the bounding-boxes mode of tensor decoder to support face
detection model by reusing the code for the person detection model
support.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Parichay Kapoor [Fri, 14 Aug 2020 12:05:25 +0000 (21:05 +0900)]
[single] Bug fix for setting accelerator
Bug fix for setting accelerator in the C-API.
When accelerator is set after the framework, tensor_filter does not know the framework
to check its version and store that information appropriately.
This patch changes the order of setting this information.
However, this bug still exists for pipeline API.
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Yongjoo Ahn [Thu, 20 Aug 2020 01:16:21 +0000 (10:16 +0900)]
[test/fix] Fix signed-unsigned compare
- Fix build fail issue when build with capi
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
MyungJoo Ham [Thu, 13 Aug 2020 08:42:06 +0000 (17:42 +0900)]
[Documentation] Revised getting started for better readability.
Do not mix up different build environments.
Seperate documents for better readability.
Added ```rm -rf build``` in spec file to make it consistent with the documentation.
Now, you may do ```gbs build --include-all``` even if you have built in your git repo.
Fixes #2636
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
gichan-jang [Wed, 19 Aug 2020 09:51:08 +0000 (18:51 +0900)]
[TESTS/CAPI] Seperate negative TC as single test case
Negative TCs has multiple tests, separate them as single test cases.
Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
Jaeyun [Fri, 14 Aug 2020 08:53:41 +0000 (17:53 +0900)]
[Android] build script with tf-lite 2.3
update tf-lite version info in build script.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Sangjung Woo [Wed, 19 Aug 2020 08:37:34 +0000 (17:37 +0900)]
[SPEC] Exclude device-dependent filters when checking testcase coverage
This patch excludes the device-dependent filters such as OpenVino and
EdgeTPU when checking testcase coverage.
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
gichan-jang [Fri, 14 Aug 2020 07:47:00 +0000 (16:47 +0900)]
[TESTS/CAPI] Seperate negative TC as single test case - cutom filter register
Negative TCs has multiple tests, separate them as single test cases.
After this commit:
- Total TCs: 458
- Positive TCs: 250
- Negative TCs: 208
Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
gichan-jang [Fri, 14 Aug 2020 07:21:03 +0000 (16:21 +0900)]
[TESTS/CAPI] Seperate negative TC as single test case - element-wise control function
Negative TCs has multiple tests, separate them as single test cases.
After this PR :
- Total TCs: 450
- Positive TCs: 250
- Negative TCs: 200
Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
Wook Song [Fri, 14 Aug 2020 16:59:21 +0000 (01:59 +0900)]
[Ext/Decoder] Support person detection models for OpenVino
This patch updates the tensor-decoder subplugin, "bounding-boxes", to
support person detection models for OpenVino.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Jaeyun [Wed, 19 Aug 2020 06:15:00 +0000 (15:15 +0900)]
[Android/NNFW] update version
We will use ONE v1.8.0 from next build & release of Android APIs.
cc. @lemmaa @chunseoklee
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Wook Song [Fri, 14 Aug 2020 17:23:37 +0000 (02:23 +0900)]
[Tools/Profiling] Add a section for NNShark to README.md
This patch adds a section for NNShark to the README.md file.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Jaeyun [Tue, 18 Aug 2020 07:39:22 +0000 (16:39 +0900)]
[Android] fix data conversion error
The result of single-shot invoke is invalid.
Remove tensor data free after converting native handle to data object in single-shot.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>