Jaeyun [Fri, 6 Nov 2020 11:34:53 +0000 (20:34 +0900)]
[Test/NNFW] fix invalid tc
nnfw-1.10 was released and now supports dynamic dimension.
Enable testcases and fix invalid test conditions.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
MyungJoo Ham [Wed, 11 Nov 2020 06:21:21 +0000 (15:21 +0900)]
Add CII Best Practices Badges
LF-AI/Data recommends to maintain CII Best Practices checks.
This badge shows the status.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Dongju Chae [Mon, 26 Oct 2020 11:52:41 +0000 (20:52 +0900)]
[gRPC/Packaging] Support packaging for nnstreamer-grpc
This patch supports packaging for nnstreamer-grpc.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Dongju Chae [Mon, 26 Oct 2020 11:51:51 +0000 (20:51 +0900)]
[gRPC/Source] Implement gRPC tensor source
This patch implements gRPC tensor source as a server.
Its gRPC client mode is WIP.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Dongju Chae [Mon, 26 Oct 2020 11:12:22 +0000 (20:12 +0900)]
[gRPC/protobuf] Implement a helper class for NNStreamer gRPC service
This patch implements a helper class for NNStreamer gRPC service.
It appends the definition of gRPC service to 'nnstreamer.proto'.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Yongjoo Ahn [Fri, 6 Nov 2020 08:31:37 +0000 (17:31 +0900)]
[unittest] Fix signed-unsigned comapre
- Fix gtest's complaint about signed-unsinged comapre in unittest_if
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Sangjung Woo [Mon, 19 Oct 2020 07:45:10 +0000 (16:45 +0900)]
Update test cases for dimension string when it is explicitly given in Pipeline
If the dimension string is explicitly given in the pipeline, the
returned dimension string by g_object_get() should return the same
value. This patch update related test cases and adds a new one.
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
Sangjung Woo [Mon, 19 Oct 2020 07:42:40 +0000 (16:42 +0900)]
Update dimension string when it is explicitly given in Pipeline
Even though the dimension string of the input tensor is given in the
pipeline, the 'input` property is always fixed 4 dimensions (i.e.
d1:d2:d3:d4). This patch returns the dimension string considering tensor
dimension and rank count.
For example, given tensor filter parameters
'tensor_filter input=3:224:224', the returned dimension string is
'3:224:224' instead of '3:224:224:1'.
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
Jaeyun [Mon, 2 Nov 2020 11:02:47 +0000 (20:02 +0900)]
[Android] handle invalid context
Handle invalid param case -init nnstreamer with invalid context.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Mon, 2 Nov 2020 11:22:21 +0000 (20:22 +0900)]
[Android] codeclean
1. move native methods registration to each file.
2. add new function to get data ptr in native.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Parichay Kapoor [Tue, 3 Nov 2020 05:40:17 +0000 (14:40 +0900)]
[tensorfilter] Set default framework when no priority
tensor_filter auto detection of framework takes in the extension
and for tflite extension tries to identify the framework using
a priority set with the configuration.
however, in case, the priority string is NULL, no tensor_filter
framework is set although multiple tensor_filters supporting
this extension can exist.
This patch sets a default framework for tflite extension which is
overwritten based on the priority if priority exists.
**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 [Fri, 30 Oct 2020 07:47:33 +0000 (16:47 +0900)]
[Android/tflite] Fix NNAPI inference bug
- Use NNAPI delegate directly instead of deprecated `UseNNAPI` method.
- Resolve #2755.
- REF: https://github.com/tensorflow/tensorflow/commit/
bf6f488c1102a88252960c4c8b90f6122e966b14
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Jaeyun [Fri, 30 Oct 2020 11:07:16 +0000 (20:07 +0900)]
[Android] fix invalid handle case
Prevent invalid element handle case, compare element type when getting the element handle in hash table.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Yongjoo Ahn [Thu, 29 Oct 2020 07:00:12 +0000 (16:00 +0900)]
[android/test] Add negative test cases with Options
- Add three negative test cases for newly added `Options`
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Yongjoo Ahn [Thu, 29 Oct 2020 06:59:15 +0000 (15:59 +0900)]
[android/SingleShot] Add Options class for configuring SingleShot instance
- Add Options to configure SingleShot instance preparing new features that might be added in future
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Sangjung Woo [Fri, 30 Oct 2020 02:11:47 +0000 (11:11 +0900)]
[Repo] Fix the assertion error when executing `gst-inspect-1.0 command
When executing `gst-inspect-1.0 tensor_reposrc' command, below error
occurs.
======================
$ gst-inspect-1.0 tensor_reposrc
...
** (gst-inspect-1.0:29483): CRITICAL **:
gst_tensor_repo_remove_repodata: assertion '_repo.initialized' failed
======================
The main reason that the disposal callback always removes the repodata
even though it is not initialized and it causes the assertion error.
This patch fixes that bug.
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
gichan-jang [Wed, 28 Oct 2020 02:00:11 +0000 (11:00 +0900)]
[TensorIF] Fix unit test fail on arm arch
The pipeline state changed to NULL before saving the result file due to slow speed of arm.
Give enough time or wait until the file is created.
Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
Yongjoo Ahn [Thu, 29 Oct 2020 11:17:45 +0000 (20:17 +0900)]
[Filter/tflite] Remove NNAPI option
- Remove NNAPI custom prop
- Enable NNAPI after the accelerator property
- @todo Support appropriate delegates after the accelerator prop
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Jaeyun [Thu, 29 Oct 2020 11:37:26 +0000 (20:37 +0900)]
[Android/Build] remove unnecessary build flag
remove unnecessary build flag - nnapi in jni is for nn-runtime.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Sangjung Woo [Wed, 14 Oct 2020 01:58:04 +0000 (10:58 +0900)]
[Test] Testcase for rank count logic in Tensor Filter
This patch newly adds the test cases for rank count logic in Tensor
Filter.
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
Sangjung Woo [Wed, 14 Oct 2020 01:52:06 +0000 (10:52 +0900)]
[Filter] Add rank count logic to GstTensorFilterProperties
This patch newly adds the rank count logic to GstTensorFilterProperties.
The rank count is automatically calculated based on the given dimension
string and NNStreamer rank count rule.
For example, given tensor filter parameters, input ranks are calculated
as follows.
* 'tensor_filter input=3:224:224': input rank is 3.
* 'tensor_filter input=3:224:224:1': input rank is 4.
* 'tensor_filter model=mobilenet_v1.tflite': input rank is 3 since input
dimension of given model is '3:224:224'.
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
Dongju Chae [Wed, 28 Oct 2020 06:42:31 +0000 (15:42 +0900)]
[README.md] Add hall-of-fame section to README.md
This patch adds hall-of-fame section to README.md
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
MyungJoo Ham [Mon, 21 Sep 2020 06:34:47 +0000 (15:34 +0900)]
Filter/TF2-Lite: remove unnecessary if in meson
TF2-Lite has all such data types enabled.
We do not need to check them.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Mon, 21 Sep 2020 07:13:25 +0000 (16:13 +0900)]
Filter/TF2-Lite: fix dependnecy big (meson)
tf2-lite should use tf2-lite dependency.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Bumsik Kim [Tue, 27 Oct 2020 04:28:15 +0000 (21:28 -0700)]
[tensor_filter_common] Fix a wrong example in accelerator prop spec
This patch fixes the wrong accelerator example in the prop spec.
This helps other developers to avoid confusions.
In actual tests, the true:(GPU,NPU,!CPU) format fails to be accepted so
that it switches to default mode. Also test cases do not cover such
format as well [1].
It also adds a note where to find available accelerator names.
[1]:
https://github.com/nnstreamer/nnstreamer/blob/main/tests/nnstreamer_filter_tensorflow_lite/runTest.sh#L108
Signed-off-by: Bumsik Kim <k.bumsik@gmail.com>
Wook Song [Tue, 27 Oct 2020 09:13:25 +0000 (18:13 +0900)]
[Dist/Debian] Move libcapi-nnstreamer.a and .so to the development package
This patch removes libcapi-nnstreamer.a from the main package and moves
libcapi-nnstreamer.so to the development package.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Jaeyun [Fri, 23 Oct 2020 04:52:23 +0000 (13:52 +0900)]
[C-Api] prepare new APIs
prepare next ACR
- function to invoke with preallocated output handle
- function to open nn model with custom options
Change function names and add description for each API.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
gichan-jang [Tue, 20 Oct 2020 09:57:14 +0000 (18:57 +0900)]
[TensorIF] Add testcases for tensor if
Add testcases for tensor_if element.
Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
MyungJoo Ham [Tue, 27 Oct 2020 04:51:55 +0000 (13:51 +0900)]
DIST/Tizen: enable flatbuf for VD
Flatbuf is required by tf-lite these days. Enable it.
Reported by Jongmin Lee.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
gichan-jang [Tue, 20 Oct 2020 08:00:11 +0000 (17:00 +0900)]
[TensorIF] Supports tensor average option for compared value
support tensor average option for compared value.
Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
Signed-off-by: gichan <gichan2.jang@samsung.com>
Dongju Chae [Thu, 22 Oct 2020 04:59:37 +0000 (13:59 +0900)]
[Build/ExtPlugin] Add registerer for ext plugins
This patch adds registerer for ext plugins, including
- tizensensor
- grpc (TBA)
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Dongju Chae [Mon, 26 Oct 2020 05:38:12 +0000 (14:38 +0900)]
[Fix/Debian] Add missing installation files (nnstreamer-check/capi)
This patch adds missing installation files on Ubuntu packaging, mostly
related to capi and nnstreamer-check.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Sangjung Woo [Mon, 26 Oct 2020 06:37:35 +0000 (15:37 +0900)]
[Filter] Fix the omitted initialization of GstTensorFilterFrameworkInfo
This patch initializes the omitted 'verify_model_path' value instead of
'allocate_in_invoke', which is set twice.
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
Jaeyun [Thu, 22 Oct 2020 10:59:50 +0000 (19:59 +0900)]
[NNFW] cache info from nnfw
Cache nnfw tensors info and handle rank value when setting input info.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Thu, 22 Oct 2020 10:55:30 +0000 (19:55 +0900)]
[NNFW/Log] common log util
change log message (use common log util in nnstreamer)
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
gichan-jang [Tue, 20 Oct 2020 07:50:18 +0000 (16:50 +0900)]
[TensorIF] Supports other/tensor(s) in output format
Supports other/tensor(s) in output format.
- Supported operator: All
- Suppoted data type: All
- Supported action: passthrough, skip, tensorpick. (Others will be added)
- Output format: other/tensor or other/tensors
Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
Jaeyun [Fri, 16 Oct 2020 10:28:05 +0000 (19:28 +0900)]
[Filter/TFLite] option to set no of threads
add option to set the number of threads to tf-lite interpreter.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Mon, 19 Oct 2020 09:09:06 +0000 (18:09 +0900)]
[Test/Benchmark] benchmark with no output alloc
1. update testcase for benchmark (single-shot no output allocation)
2. mark todo for next APIs
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
gichan-jang [Tue, 20 Oct 2020 09:30:52 +0000 (18:30 +0900)]
[Tensor Transform] Fix unsupported orc type cast
Orc does not support 64bit integer typecast.
A problem occurs when the pipeline is launched with orc option,
and then the option is changed using set_property to convert type int64 or uint64.
So disables the orc if the int64 or uint64 typecast is required.
Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
Jaeyun [Mon, 19 Oct 2020 08:27:05 +0000 (17:27 +0900)]
[ONE/Android] prepare ONE-1.10.0 release
prepare next ONE release (ver 1.10.0)
- change pkg name (nnfw -> onert)
- add new testcase to check dynamic dimension
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Dongju Chae [Mon, 19 Oct 2020 01:51:06 +0000 (10:51 +0900)]
[TensorRate/Test] Add simple testcases for tensor_rate (not QoS events)
This patch adds simple testcases for tensor_rate element, just adjusting
downstream framerate without sending QoS events to upstream elements.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Jaeyun [Tue, 6 Oct 2020 11:09:32 +0000 (20:09 +0900)]
[Filter/NNFW] dummy invoke after set-info called
When called set-info function, NNFW updates output shape after the invoke is done.
Add dummy invoke function and call it after input shape is changed.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Dongju Chae [Thu, 24 Sep 2020 08:26:12 +0000 (17:26 +0900)]
[TensorRate] Implement the prototype codes for tensor_rate element
This patch implements the prototype codes for 'tensor_rate' element.
'tensor_rate' will include two methods to adjust a frame rate.
1) Either drop or duplicate frames similar to 'videorate' plugin
2) Propagate a specified frame-rate to upstream elements.
As a prototype, most of codes are reused from 'videorate' sources codes,
and still many things should be revised according to the tensor concept.
But, at least, its functionality was checked if we run this pipeline.
gst-launch-1.0 videotestsrc
! video/x-raw,width=640,height=480,framerate=15/1
! tensor_converter
! tensor_rate framerate=10/1
! tensor_decoder mode=direct_video
! videoconvert
! autovideosink
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
gichan-jang [Tue, 13 Oct 2020 10:06:27 +0000 (19:06 +0900)]
[TensorIF] Add basic action option
Add basic action option: PASSTHROUGH, SKIP, TENSORPICK
Supported operator: All
Suppoted data type: All
Supported action: passthrough, skip, tensorpick. (Others will be added)
Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
MyungJoo Ham [Tue, 13 Oct 2020 02:04:36 +0000 (11:04 +0900)]
Docker: move location, shorten build script.
1. Move dockerfile location (/docker/... --> /tools/docker)
2. Run ninja once and do install and build.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
JeonChangMin [Thu, 10 Sep 2020 17:54:54 +0000 (02:54 +0900)]
[docker] Add ubuntu16.04/18.04 devel Dockerfile
Add Dockerfile for ubuntu16.04/18.04 nnstreamer build using meson/ninja
Signed-off-by: JeonChangMin <imsameperson@gmail.com>
JeonChangMin [Thu, 10 Sep 2020 17:54:10 +0000 (02:54 +0900)]
[docker] Add ubuntu16.04/18.04 runtime Dockerfile
Add Dockerfile for ubuntu16.04/18.04 nnstreamer runtime using ppa
Signed-off-by: JeonChangMin <imsameperson@gmail.com>
Jaeyun [Wed, 14 Oct 2020 07:50:02 +0000 (16:50 +0900)]
[Log/TF-lite] print average invoke time
add debug log in invoke function to print average time.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
MyungJoo Ham [Tue, 13 Oct 2020 01:36:41 +0000 (10:36 +0900)]
Test/Fix golden data.
The golden data itself had bugs :(
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Wed, 7 Oct 2020 13:11:02 +0000 (22:11 +0900)]
Decoder/BoundingBox: fix resolution decoding
draw() assumes that the "results" have coordinates based on
input resolutions, not output resolutions
Fixes #2781
Reported-by: @giladnahor
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Sangjung Woo [Wed, 14 Oct 2020 07:18:49 +0000 (16:18 +0900)]
[Example/Meson] Fix the buildbreak of custom_example_tensorrt example
Because of the wrong file path in meson script, below error occurs when
running 'meson build' command. This patch fixes that bug.
* Error message: nnstreamer_example/meson.build:98:2: ERROR: File
nnstreamer_customfilter_example_tensorrt_reshape.cc does not exist.
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
gichan-jang [Wed, 23 Sep 2020 10:14:08 +0000 (19:14 +0900)]
[TensorIF] Support generic type
Support generic type for compared value and supplied value
float typed is supported for supplied value.
- e.g., supplied-value=2.23e+1,2.0E+2
Supported operator: All
Suppoted data type: All
Supported action: Not given. Just operate as passthrough(TRUE) and skip(FALSE)
Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
Wook Song [Mon, 5 Oct 2020 10:30:46 +0000 (19:30 +0900)]
[Example] Place build intermediates of custom filters on the same directory
As the custom filters are installed into the same directory, this
patch places the build intermediates of custom filters, which are used
in the test cases at the build-time, on the same directory to reduce
unnecessary complexity in the test cases.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Wook Song [Tue, 6 Oct 2020 04:55:53 +0000 (13:55 +0900)]
[Example] Relocate custom filters for unittest_sink to nnstreamer_example
In order to simplify the path of custom filters used in the test cases,
this patch relocates the custom filters, nncustom_drop_buffer and
nncustom_framecounter, for unittest_sink to the nnstreamer_example
directory.
Signed-off-by: Wook Song <wook16.song@samsung.com>
gichan-jang [Wed, 23 Sep 2020 10:14:08 +0000 (19:14 +0900)]
[TensorIF] Implement basic operation with uint8 type
Supported operation: All
Suppoted data type: uint8 (need to make it as generic type)
Supported action: Not given. Just operate as passthrough(TRUE) and skip(FALSE)
Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
gichan-jang [Tue, 22 Sep 2020 08:23:15 +0000 (17:23 +0900)]
[TensorIF] Change to support single sinkpads and multi srcpads
GstBaseTransform changed to GstElement to support multi srcpads.
Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
Jaeyun [Mon, 12 Oct 2020 07:31:06 +0000 (16:31 +0900)]
[Android/SNAP] subplugin for SNAP
Upload sub-plugin for SNAP.
To build Android library with SNAP, developer should download Samsung Neural SDK and set the path to SNAP SDK interface.
Tested on S20+ (QC)
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Mon, 12 Oct 2020 04:50:33 +0000 (13:50 +0900)]
[Doc] update description
add function description about fetching version info in plugin-api header.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Yongjoo Ahn [Thu, 8 Oct 2020 06:35:42 +0000 (15:35 +0900)]
[Android/makefile] Add NNS_API_FLAGS to nnfw and snpe sub-plugins
- Add NNS_API_FLAGS to compile flags for nnfw and snpe sub-plugins
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Yongjoo Ahn [Thu, 8 Oct 2020 06:32:56 +0000 (15:32 +0900)]
[Android/tflite] Let NDK know TFLITE_VERSION
- After support for tf2-lite, TFLITE_VERSION is required. Let NDK know it
- For Android, the name of subplugin should be always "tensorflow-lite" not "tensorflow2-lite"
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Wook Song [Tue, 29 Sep 2020 08:20:30 +0000 (17:20 +0900)]
[Tests] Eliminate hard-coded build root from source code
This patch eliminates hard-coded build root from source code. Instead of
the hard-coded 'build', this patch introduces an environment variable,
NNSTREAMER_BUILD_ROOT_PATH, which is provided by the meson build script.
According to this change, packaging scripts are also updated.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Wook Song [Tue, 29 Sep 2020 12:28:57 +0000 (21:28 +0900)]
[Tests/TizenCAPI] trivial: Fix Doxygen tag should begin with /**
This patch fixes the Doxygen-tag-check failure, which is 'Doxygen or
multi line comments should begin with /**', in the Tizen C-API test
case.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Jaeyun [Fri, 25 Sep 2020 10:46:08 +0000 (19:46 +0900)]
[Filter/TF-lite] nnapi option
Add option structure to open tf-lite model, set NNAPI false as default value.
Using NNAPI in tf-lite may make lower performance and unexpected result for some model.
Let the developer select NNAPI option when constructing the pipeline.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Dongju Chae [Wed, 7 Oct 2020 03:22:03 +0000 (12:22 +0900)]
[Fix/Filter] Use g_value_take_string in get_property
This patch uses g_value_take_string, instead of g_value_set_string,
in get_property impl, to avoid redundant invoking g_free.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
gichan-jang [Wed, 16 Sep 2020 11:06:11 +0000 (20:06 +0900)]
[TensorIF] Add README.md for tensor_if element
Describe for tensor_if definition, its properties and usuage cases.
Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
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>