platform/core/ml/nnfw.git
6 years agoSupport skip test in run_test.sh (#466)
오형석/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 5 Apr 2018 09:29:56 +0000 (18:29 +0900)]
Support skip test in run_test.sh (#466)

Support skip test in run_test.sh
Can skip by setting STATUS="disabled" in config.sh

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
6 years agoRemove verbose in run_test.sh (#461)
오형석/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 5 Apr 2018 08:30:08 +0000 (17:30 +0900)]
Remove verbose in run_test.sh (#461)

Remove verbose in run_test.sh to reduce CI record

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
6 years agoAdd tools/test_driver on build_test_suite in Makefile (#458)
김용섭/동작제어Lab(SR)/Engineer/삼성전자 [Thu, 5 Apr 2018 07:41:41 +0000 (16:41 +0900)]
Add tools/test_driver on build_test_suite in Makefile (#458)

Adds tools/test_driver on build_test_suite in Makefile. test_driver.sh
is going to be included in the test-suite.tar.gz.

Signed-off-by: Yongseop Kim <yons.kim@samsung.com>
6 years agoIntroduce nnfw::support::tflite::TensorView (#456)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 5 Apr 2018 06:17:40 +0000 (15:17 +0900)]
Introduce nnfw::support::tflite::TensorView (#456)

This commit introduces 'nnfw::support::tflite::TensorView' which allows
users to easily access elements in TensorFlow Lite Tensor object.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoAdd test_driver.sh for verification (#439)
김용섭/동작제어Lab(SR)/Engineer/삼성전자 [Thu, 5 Apr 2018 05:43:41 +0000 (14:43 +0900)]
Add test_driver.sh for verification (#439)

* Add test_driver.sh for verification

This commits add test_driver.sh to Product/out/bin for verification.
Additional tests would be appended in this script soon.

Signed-off-by: Yongseop Kim <yons.kim@samsung.com>
6 years agoAdd more test scripts for TF Lite models (#422)
서상민/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 5 Apr 2018 04:25:25 +0000 (13:25 +0900)]
Add more test scripts for TF Lite models (#422)

Related issues #84 and #402

This patch adds test scripts for TF Lite models created in #402.

Signed-off-by: Sangmin Seo <sangmin7.seo@samsung.com>
6 years agoSupport Enable/Disable VLOG (#451)
이한종/동작제어Lab(SR)/Engineer/삼성전자 [Thu, 5 Apr 2018 04:25:06 +0000 (13:25 +0900)]
Support Enable/Disable VLOG (#451)

Introduce environment variable VLOG for Enable/Disable VLOG outputs.
`VLOG` is disabled by default.

Example usage

```
VLOG=1 ./tests/framework/run_test.sh # Enable VLOG
```

6 years agoIntroduce 'nnfw_support_tflite' lib (#452)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 5 Apr 2018 04:14:03 +0000 (13:14 +0900)]
Introduce 'nnfw_support_tflite' lib (#452)

This commit introduces 'nnfw_support_tflite' lib which provides various
helpes for accessing TensorFlow Lite internals.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[Pure ACL NN Runtime] Implement ANeuralNetworksMemory (#424)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 5 Apr 2018 04:08:09 +0000 (13:08 +0900)]
[Pure ACL NN Runtime] Implement ANeuralNetworksMemory (#424)

This commit implements ANeuralNetworksMemory in experimental pure ACL NN
runtime.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoIntroduce IndexIterator (for feature) (#428)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 5 Apr 2018 02:13:17 +0000 (11:13 +0900)]
Introduce IndexIterator (for feature) (#428)

This commit introduces IndexIterator class and relevent helpers in
nnfw::util::feature namespace to make it easy to iterate over feature
elements.

This commit includes updates on NNAPI Conv1 Unittest to demonstrate how
to use these helpers.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoPrint shape info in model parser tool (#449)
오형석/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 5 Apr 2018 02:12:00 +0000 (11:12 +0900)]
Print shape info in model parser tool (#449)

* Print shape info in model parser tool

Print shape info in model parser tool to get tensor size

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
* Update README.md

Update README.md to show shape info

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
6 years agoSupport update in TfLiteFeatureView (#425)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 5 Apr 2018 02:02:43 +0000 (11:02 +0900)]
Support update in TfLiteFeatureView (#425)

This commit introduces a (in-place) update method into TfLiteFeatureView
class.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoIntroduce 'nnfw::util::fp32' namespace (#445)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 5 Apr 2018 02:01:17 +0000 (11:01 +0900)]
Introduce 'nnfw::util::fp32' namespace (#445)

This commit introduces 'nnfw::util::fp32' namespace which includes
various helps for handling floating-pointer numbers.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoIntroduce 'nnfw::util::tensor' namespace (#440)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 5 Apr 2018 01:53:39 +0000 (10:53 +0900)]
Introduce 'nnfw::util::tensor' namespace (#440)

This commit introduces 'nnfw::util::tensor' namespace which will include
various helpers for tensor (ND-array) object.

Currently, 'nnfw::util::tensor' namespace includes the following
classes and funtiont:
 - class Index
 - class Shape
 - class IndexIterator
 - method iterate

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoBring android NN runtime tests (#438)
이상규/동작제어Lab(SR)/Principal Engineer/삼성전자 [Wed, 4 Apr 2018 13:46:39 +0000 (22:46 +0900)]
Bring android NN runtime tests (#438)

This PR introduces TestMain.cpp, TestTrivialModel and TestValidation
from Android NN tests.

Signed-off-by: Sanggyu Lee <sg5.lee@samsung.com>
6 years agoEnable ModelBuilder::sortIntoRunOrder() (#435)
김수진/동작제어Lab(SR)/Engineer/삼성전자 [Wed, 4 Apr 2018 13:44:12 +0000 (22:44 +0900)]
Enable ModelBuilder::sortIntoRunOrder() (#435)

This commit enables ModelBuilder::sortIntoRunOrder() which is missed in implementation.

Signed-off-by: sjsujinkim <sjsujin.kim@samsung.com>
6 years agoComment out the unnecessary assertion in CONV2D Op. (#430)
김수진/동작제어Lab(SR)/Engineer/삼성전자 [Wed, 4 Apr 2018 13:42:57 +0000 (22:42 +0900)]
Comment out the unnecessary assertion in CONV2D Op. (#430)

This commit comments out the unnecessary assertion in CONV2D Op.

Related #403

Signed-off-by: sjsujinkim <sjsujin.kim@samsung.com>
6 years agoIntroduce 'nnfw::util::vector' namespace (#421)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Wed, 4 Apr 2018 12:50:57 +0000 (21:50 +0900)]
Introduce 'nnfw::util::vector' namespace (#421)

This commit introduces 'nnfw::util::vector' namespace which includes
various helpers for vector objects.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoFix wrong return value (#436)
장지섭/동작제어Lab(SR)/Engineer/삼성전자 [Wed, 4 Apr 2018 08:42:00 +0000 (17:42 +0900)]
Fix wrong return value (#436)

This commit fixes wrong return value.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
6 years agoRemove the dependency on hal and hidl from interfaces related to the memory. (#399)
장지섭/동작제어Lab(SR)/Engineer/삼성전자 [Wed, 4 Apr 2018 08:29:23 +0000 (17:29 +0900)]
Remove the dependency on hal and hidl from interfaces related to the memory. (#399)

This commit removes the dependency on hal and hidl from interfaces related to the memory.

- IMemory@1.0
- IAllocator@1.0

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
6 years agoChange tools/nnapi_test to install (#429)
김용섭/동작제어Lab(SR)/Engineer/삼성전자 [Wed, 4 Apr 2018 08:15:23 +0000 (17:15 +0900)]
Change tools/nnapi_test to install (#429)

This commits enables tools/nnapi_test moved to Product/out/bin on
installed.

Signed-off-by: Yongseop Kim <yons.kim@samsung.com>
6 years agoAdd md5hash check for test files (#418)
이한종/동작제어Lab(SR)/Engineer/삼성전자 [Wed, 4 Apr 2018 08:06:20 +0000 (17:06 +0900)]
Add md5hash check for test files (#418)

To verify cached files are good

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
6 years agoIntroduce 'nnfw::util::kernel' namespace (#414)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Wed, 4 Apr 2018 07:15:01 +0000 (16:15 +0900)]
Introduce 'nnfw::util::kernel' namespace (#414)

This commit introduces 'nnfw::util::kernel' namespace which holds
various helpers for handling convolution kernels.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[nnapi_test] Show details on test failure (#407)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Wed, 4 Apr 2018 06:52:51 +0000 (15:52 +0900)]
[nnapi_test] Show details on test failure (#407)

This commit allows users to check details on test failure via
environment variable (VERBOSE).

Note that this feature is turned off by default.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[NNAPI unittest] Show configurations before run (#417)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Wed, 4 Apr 2018 06:52:03 +0000 (15:52 +0900)]
[NNAPI unittest] Show configurations before run (#417)

This commit revises 'nnapi_unittest_conv_1' to show configurations
before run (to make it easy to analyze issues).

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoIntroduce TfLiteFeatureView (#412)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Wed, 4 Apr 2018 06:42:02 +0000 (15:42 +0900)]
Introduce TfLiteFeatureView (#412)

This commit implements TfLiteFeatureView in NN API Unittest (conv_1).

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[NNAPI Unittest] Fix environment variable setup (#411)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Wed, 4 Apr 2018 06:41:39 +0000 (15:41 +0900)]
[NNAPI Unittest] Fix environment variable setup (#411)

This commit fix IntVar class to set an internal variable correctly from
environments.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoFix bug in run_test.sh (#415)
오형석/동작제어Lab(SR)/Senior Engineer/삼성전자 [Wed, 4 Apr 2018 04:19:12 +0000 (13:19 +0900)]
Fix bug in run_test.sh (#415)

Fix bug when finding test directory

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
6 years agoAdd ActivationLayer to kernel test lab (#409)
박세희/동작제어Lab(SR)/Principal Engineer/삼성전자 [Wed, 4 Apr 2018 04:01:02 +0000 (13:01 +0900)]
Add ActivationLayer to kernel test lab (#409)

This will add ActivationLayer with Relu to convolution kernel test lab

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
6 years ago[nnapi_test] Fix float equality condition (#408)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Wed, 4 Apr 2018 02:03:27 +0000 (11:03 +0900)]
[nnapi_test] Fix float equality condition (#408)

0.0f is not equal to 0.0f in the current equality condition.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoRemove the dependency on hal and hidl from interfaces of neuralnetworks (#397)
장지섭/동작제어Lab(SR)/Engineer/삼성전자 [Wed, 4 Apr 2018 01:35:49 +0000 (10:35 +0900)]
Remove the dependency on hal and hidl from interfaces of neuralnetworks (#397)

This commit removes the dependency on hal and hidl from interfaces of neuralnetworks.

- version 1.0 : IDevice, IPreparedModel, IExecutionCallcak, IPreparedModelCallback and types
- version 1.1 : IDevice and types

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
6 years agoEnable remaining helpers in OperationsUtils (#396)
최형규/동작제어Lab(SR)/Senior Engineer/삼성전자 [Wed, 4 Apr 2018 01:35:24 +0000 (10:35 +0900)]
Enable remaining helpers in OperationsUtils (#396)

- Enable remaining helpers using activation type in OperationsUtils

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
6 years agoEnable googletest for unittesting (#398)
이춘석/동작제어Lab(SR)/Senior Engineer/삼성전자 [Wed, 4 Apr 2018 00:34:13 +0000 (09:34 +0900)]
Enable googletest for unittesting (#398)

0. Support arm-cross, x64-native, arm-native, and tizen-obs build
1. Introduce googletest at top level
2. Add simple test tflite_test.cc : this should be removed
3. Add howto doc

6 years agoSetup NN API without NN Runtime project (#390)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Tue, 3 Apr 2018 23:26:08 +0000 (08:26 +0900)]
Setup NN API without NN Runtime project (#390)

This commit adds a room for NN API implementation without NN Runtime
(for experiments).

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoAdd git to docker image for nnfw (#405)
최형규/동작제어Lab(SR)/Senior Engineer/삼성전자 [Tue, 3 Apr 2018 23:25:01 +0000 (08:25 +0900)]
Add git to docker image for nnfw (#405)

- Add git package to docker image for nnfw

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
6 years agoAdd USE_LOGNN option for make check (#400)
김용섭/동작제어Lab(SR)/Engineer/삼성전자 [Tue, 3 Apr 2018 23:18:24 +0000 (08:18 +0900)]
Add USE_LOGNN option for make check (#400)

Enables having choice for LD_LIBRARY. The default LD_LIBRARY is out/lib
while obj/tools/nnapi_bindings/bindings/logging on USE_LOGNN=1. This is
supported for debugging.

Signed-off-by: Yongseop Kim <yons.kim@samsung.com>
6 years agoUse docker image of nnfw repo in CI (#401)
최형규/동작제어Lab(SR)/Senior Engineer/삼성전자 [Tue, 3 Apr 2018 13:53:57 +0000 (22:53 +0900)]
Use docker image of nnfw repo in CI (#401)

- Use docker image of nnfw repo in CI, i.e. nnfw_docker

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
6 years agoIntroduce nnfw::util::feature namespace (#393)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Tue, 3 Apr 2018 13:51:38 +0000 (22:51 +0900)]
Introduce nnfw::util::feature namespace (#393)

* Introduce nnfw::util::feature namespace

This commit introduces nnfw::util::feature namespace which will contain
various helpers for 3D tensor object.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
* Fix a typo(utils -> util)

* Implement feature::Shape's consturctor in its header

6 years agoIntroduce nnfw::util::env::IntAccessor (#392)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Tue, 3 Apr 2018 13:50:43 +0000 (22:50 +0900)]
Introduce nnfw::util::env::IntAccessor (#392)

This commit introduces nnfw::util::env::IntAccessor which makes it easy
to access environmets (for configuration).

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoIntroduce util::benchmark (#391)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Tue, 3 Apr 2018 13:50:29 +0000 (22:50 +0900)]
Introduce util::benchmark (#391)

This commit extracts benchmark-related helpers (implemented inside
tflite_benchmark) as a shared library.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoUse float-compare on NN API testing (#389)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Tue, 3 Apr 2018 13:49:51 +0000 (22:49 +0900)]
Use float-compare on NN API testing (#389)

* Use float-compare on NN API testing

This commit revises nnapi_test to use float-compare on NN API
implementation testing.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
* Use std::isnan instead of isnan

6 years agoIntroduce nnapi_template (#388)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Tue, 3 Apr 2018 13:49:33 +0000 (22:49 +0900)]
Introduce nnapi_template (#388)

This commit introduces nnapi_template which provides a dummy NN API
implementation in order to make it easy to introduce an experimental NN
API implementation.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoSupport STRIDE configuration (#386)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Tue, 3 Apr 2018 13:49:23 +0000 (22:49 +0900)]
Support STRIDE configuration (#386)

This commit revises nnapi_unittest_conv1 to support STRIDE
configuration.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoManage bias_data lifetime correclty (#385)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Tue, 3 Apr 2018 13:49:11 +0000 (22:49 +0900)]
Manage bias_data lifetime correclty (#385)

T/F Lite Interpreter assumes that buffer passed via
SetTensorParametersReadOnly method lives longer than the interpreter
itself.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoIntroduce simple .tflite model generator for CONV2D (#381)
김정현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Tue, 3 Apr 2018 13:48:46 +0000 (22:48 +0900)]
Introduce simple .tflite model generator for CONV2D (#381)

This commit introduces a simple .tflite model generator.
This first version only supports CONV2D for now.

Usage:
`$ modelgen.py` generates model.json
`$ modelgen.sh model.json` generates model.tflite

You can modify parameters `kernel_shape` and `input_shape` in modelgen.py
to generate different sizes of the kernel and input.

You can execute modelgen.py and modelgen.sh in any directory because
they find where they located at.

Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
6 years agobuild test-suite for test on target (#375)
이춘석/동작제어Lab(SR)/Senior Engineer/삼성전자 [Tue, 3 Apr 2018 07:46:58 +0000 (16:46 +0900)]
build test-suite for test on target (#375)

* build test-suite for test on target

1. test-suite.tar.gz contains tests and Product/out
2. cross-build on CI generates test-suite

6 years agoFix SIGFPE of CpuExecutor (#395)
최형규/동작제어Lab(SR)/Senior Engineer/삼성전자 [Tue, 3 Apr 2018 06:21:57 +0000 (15:21 +0900)]
Fix SIGFPE of CpuExecutor (#395)

Enable following helpers
- getScalarData(const RunTimeOperandInfo& info)
- IsNullInput(const RunTimeOperandInfo *input) {

This resiolves SIGFPE reported at #370

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
6 years agoRename nnapi_unitest_common to nnapi_unittest_common (#384)
서상민/동작제어Lab(SR)/Senior Engineer/삼성전자 [Tue, 3 Apr 2018 05:47:34 +0000 (14:47 +0900)]
Rename nnapi_unitest_common to nnapi_unittest_common (#384)

This patch adds a missing 't' to the lib name.

Signed-off-by: Sangmin Seo <sangmin7.seo@samsung.com>
6 years agoExport nnfw_util's include path (#387)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Tue, 3 Apr 2018 04:44:21 +0000 (13:44 +0900)]
Export nnfw_util's include path (#387)

This commit exports nnfw_util's include path as PUBLIC to make it
easy to use nnfw_util.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoAdd Tizen rootfs for arm cross compilation (#378)
최형규/동작제어Lab(SR)/Senior Engineer/삼성전자 [Tue, 3 Apr 2018 03:56:05 +0000 (12:56 +0900)]
Add Tizen rootfs for arm cross compilation (#378)

- Add Tizen rootfs for arm cross compilation

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
6 years agoFix build break on Ubuntu 14.04 (#383)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Tue, 3 Apr 2018 02:18:36 +0000 (11:18 +0900)]
Fix build break on Ubuntu 14.04 (#383)

This commit fixes build break on Ubuntu 14.04.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoadd the hal interfaces of neuralnetworks@1.1 to android_nn of labs (#371)
장지섭/동작제어Lab(SR)/Engineer/삼성전자 [Tue, 3 Apr 2018 02:13:06 +0000 (11:13 +0900)]
add the hal interfaces of neuralnetworks@1.1 to android_nn of labs (#371)

This commit adds the hal interfaces of the neuralnetworks@1.1 to android_nn of labs.

The interfaces of neuralnetworks have been included in o-mr1-iot-preview-7 android-o-mr1-iot-preview-7 android-p-preview-1.
Ref : https://android.googlesource.com/platform/hardware/interfaces/+/7df64ea2fd8c8e501ac1ba5cb05def96f8a8d49e
Additionally, This is the history log) related to android nn of o-mr1-iot-preview-7 branch.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
6 years agoIntroduce add_nnapi_unittest function (#380)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Mon, 2 Apr 2018 23:37:13 +0000 (08:37 +0900)]
Introduce add_nnapi_unittest function (#380)

This commit introduces add_nnapi_unittest function in 'CMakeLists.txt'
to make it easy to add new unittests.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoFix wrong setting libneuralnetworks.so (#372)
김용섭/동작제어Lab(SR)/Engineer/삼성전자 [Mon, 2 Apr 2018 23:14:43 +0000 (08:14 +0900)]
Fix wrong setting libneuralnetworks.so (#372)

Set right libneuralnetworks.so. To do this, revise some options such as
OPTIONS_LD_LIB_NNAPI and USE_NNAPI.

Signed-off-by: Yongseop Kim <yons.kim@samsung.com>
6 years agoIntroduce NNAPI Unittest through T/F Lite (#374)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Mon, 2 Apr 2018 23:11:58 +0000 (08:11 +0900)]
Introduce NNAPI Unittest through T/F Lite (#374)

This commit introduces a convolution NNAPI unittest which
invokes NN API via T/F Lite interpreter and compare it with
the output of T/F Lite pure interpreter.

This testcase is derived from a convolution example in tflite_examples.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoCompare with CPU and ACL result in kernel conv test (#368)
박세희/동작제어Lab(SR)/Principal Engineer/삼성전자 [Mon, 2 Apr 2018 23:03:38 +0000 (08:03 +0900)]
Compare with CPU and ACL result in kernel conv test (#368)

This will enable convolution test to get expected from CPU and result from ACL and compare the two.
Some changes was done not directly related with tis change but to fix compile and linking.

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
6 years agoinstall libneuralnetworks.so into lib (#369)
이춘석/동작제어Lab(SR)/Senior Engineer/삼성전자 [Mon, 2 Apr 2018 08:59:22 +0000 (17:59 +0900)]
install libneuralnetworks.so into lib (#369)

Signed-off-by: Chunseok Lee <chunseok.lee@samsung.com>
6 years agoAdd make check for run_test.sh (#361)
김용섭/동작제어Lab(SR)/Engineer/삼성전자 [Mon, 2 Apr 2018 08:16:47 +0000 (17:16 +0900)]
Add make check for run_test.sh (#361)

* Add make check for run_test.sh

This make check executes run_test.sh to test scripts in test/framework/

Signed-off-by: Yongseop Kim <yons.kim@samsung.com>
* Apply other comments

- Separate `make install` & `make check`
- Only tests for x86 (NOT cross-build for arm)
- Add LD_LIBRARY_PATH on USE_NNAPI=1

6 years agoAdd compareData for kernel test lab (#362)
박세희/동작제어Lab(SR)/Principal Engineer/삼성전자 [Mon, 2 Apr 2018 04:17:24 +0000 (13:17 +0900)]
Add compareData for kernel test lab (#362)

This will add compareData that compares result and expected of convolution.
Success will do nothing and show error with exit -1 when fails.

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
6 years agoGet rid of cmake find_package(Threads) (#357)
이상규/동작제어Lab(SR)/Principal Engineer/삼성전자 [Mon, 2 Apr 2018 02:53:40 +0000 (11:53 +0900)]
Get rid of cmake find_package(Threads) (#357)

We cannot use find_package(Threads) since some of our build
system use old version cmake. pthread is linked directly now.
So I removed find_package(Threads) and related statements.

Signed-off-by: Sanggyu Lee <sg5.lee@samsung.com>
6 years agoEnable setInputFromMemory and setOutputFromMemory from Execution (#360)
장지섭/동작제어Lab(SR)/Engineer/삼성전자 [Mon, 2 Apr 2018 02:53:17 +0000 (11:53 +0900)]
Enable setInputFromMemory and setOutputFromMemory from Execution (#360)

This commit enables setInputFromMemory and setOutputFromMemory from Execution.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
6 years agoModify output log in simple_model (#359)
장지섭/동작제어Lab(SR)/Engineer/삼성전자 [Mon, 2 Apr 2018 02:53:03 +0000 (11:53 +0900)]
Modify output log in simple_model (#359)

This commit modifies output log in simple_model.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
6 years ago Change test script construction (#354)
오형석/동작제어Lab(SR)/Senior Engineer/삼성전자 [Mon, 2 Apr 2018 02:10:03 +0000 (11:10 +0900)]
 Change test script construction (#354)

* Change test script construction

- Make directory for each test
- Make config.sh file for each test setting

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
6 years agoLabs - kernel unit test - add convFloat32 method (#352)
박세희/동작제어Lab(SR)/Principal Engineer/삼성전자 [Mon, 2 Apr 2018 02:09:13 +0000 (11:09 +0900)]
Labs - kernel unit test - add convFloat32 method (#352)

* Labs - kernel unit test - add convFloat32 method

This will add convFloat32 method from NN runtime to prepare binding ACL convolution

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
* remove empty line

* add space for readability

6 years agodocker arm cross build with no acl/rootfs build (#342)
이춘석/동작제어Lab(SR)/Senior Engineer/삼성전자 [Mon, 2 Apr 2018 02:01:11 +0000 (11:01 +0900)]
docker arm cross build with no acl/rootfs build (#342)

Signed-off-by: Chunseok Lee <chunseok.lee@samsung.com>
6 years agoSeparate Cross build for arm document (#358)
박세희/동작제어Lab(SR)/Principal Engineer/삼성전자 [Mon, 2 Apr 2018 01:54:10 +0000 (10:54 +0900)]
Separate Cross build for arm document (#358)

This will separate cross build for arm section in main readme into docs folder file

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
6 years agoAdd manual conv with excel (#356)
박세희/동작제어Lab(SR)/Principal Engineer/삼성전자 [Mon, 2 Apr 2018 01:50:42 +0000 (10:50 +0900)]
Add manual conv with excel (#356)

This will add and simple 3x3 convolution in excel file.
It uses excel built-in SUMPRODUCT() method.

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
6 years agoFix a failure to set RunTimePoolInfo (#355)
장지섭/동작제어Lab(SR)/Engineer/삼성전자 [Fri, 30 Mar 2018 08:32:40 +0000 (17:32 +0900)]
Fix a failure to set RunTimePoolInfo (#355)

* Fix creating ashmem fail

This commit fixes creating ashmem fail.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
* Fix the fail to set RunTimePoolInfo

This commit fixes the fail to set RunTimePoolInfo.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
6 years agoFix creating ashmem fail (#350)
장지섭/동작제어Lab(SR)/Engineer/삼성전자 [Fri, 30 Mar 2018 08:31:29 +0000 (17:31 +0900)]
Fix creating ashmem fail (#350)

This commit fixes creating ashmem fail.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
6 years agoMake readme file for tflite file tool (#353)
오형석/동작제어Lab(SR)/Senior Engineer/삼성전자 [Fri, 30 Mar 2018 08:11:06 +0000 (17:11 +0900)]
Make readme file for tflite file tool (#353)

Make reaeme file for

- model parser
- model generator

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
6 years agoT/F Lite Conv Example: Use non-squared IFM & Kernel (#337)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Fri, 30 Mar 2018 06:52:48 +0000 (15:52 +0900)]
T/F Lite Conv Example: Use non-squared IFM & Kernel (#337)

This commit revises T/F Lite Conv Example to use non-squred IFM and
Kernel to make it easy to distinguish dimensions.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoIntroduce weights extractor from .tflite (#288)
김정현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Fri, 30 Mar 2018 06:52:41 +0000 (15:52 +0900)]
Introduce weights extractor from .tflite (#288)

This commit introduces weight/bias extractor from .tflite file.
You can execute this script like below:

`$ extract_from_tflite.sh inception.tflite`

Then, you can find *.npy files in the current working directory.
Those *.npy files contain weight or bias values.
The name of each file is set to be the name of each layer.

Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
6 years agoModify add sample (#349)
김수진/동작제어Lab(SR)/Engineer/삼성전자 [Fri, 30 Mar 2018 03:41:21 +0000 (12:41 +0900)]
Modify add sample (#349)

This commit modifies add sample to fix the bug and show printing results.

Signed-off-by: sjsujinkim <sjsujin.kim@samsung.com>
6 years agoUpdate TODO of NeuralNetworks.cpp (#344)
최형규/동작제어Lab(SR)/Senior Engineer/삼성전자 [Fri, 30 Mar 2018 02:24:03 +0000 (11:24 +0900)]
Update TODO of NeuralNetworks.cpp (#344)

- Update TODO comment to use REF-ANN and TODO-NNRT
- Implment some TODO-NNRT

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
6 years agoEnable MUL of CpuExecutor (#345)
최형규/동작제어Lab(SR)/Senior Engineer/삼성전자 [Fri, 30 Mar 2018 02:23:56 +0000 (11:23 +0900)]
Enable MUL of CpuExecutor (#345)

- Enable MUL of CpuExecutor

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
6 years agoEnable the methods of `RunTimePoolInfo` to prepare to use memory (#343)
장지섭/동작제어Lab(SR)/Engineer/삼성전자 [Fri, 30 Mar 2018 02:07:51 +0000 (11:07 +0900)]
Enable the methods of `RunTimePoolInfo` to prepare to use memory (#343)

This commit enables the methods of `RunTimePoolInfo` to prepare to use memory.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
6 years agoEnable StepExecutor::startComputeOnCpu (#341)
최형규/동작제어Lab(SR)/Senior Engineer/삼성전자 [Fri, 30 Mar 2018 01:45:54 +0000 (10:45 +0900)]
Enable StepExecutor::startComputeOnCpu (#341)

- Enable StepExecutor::startComputeOnCpu

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
6 years agoSkip pthread TRY_RUN when cross build (#340)
이춘석/동작제어Lab(SR)/Senior Engineer/삼성전자 [Fri, 30 Mar 2018 01:31:51 +0000 (10:31 +0900)]
Skip pthread TRY_RUN when cross build (#340)

6 years agoEnable Conv2D and FullyConnected operations (#333)
최형규/동작제어Lab(SR)/Senior Engineer/삼성전자 [Fri, 30 Mar 2018 01:26:11 +0000 (10:26 +0900)]
Enable Conv2D and FullyConnected operations (#333)

- Introduce Conv2D and FullyConnected operations
- Enable OperationType::CONV_2D and OperationType::FULLY_CONNECTED
  of CpuExecutor

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
6 years agoFix NN_RUNTIME build option (#336)
박세희/동작제어Lab(SR)/Principal Engineer/삼성전자 [Fri, 30 Mar 2018 01:26:02 +0000 (10:26 +0900)]
Fix NN_RUNTIME build option (#336)

This will move BUILD_NN_RUNTIME option into src of cmake as src has separate util project

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
6 years agoFix link fail for pthread on obs (#338)
이춘석/동작제어Lab(SR)/Senior Engineer/삼성전자 [Fri, 30 Mar 2018 01:08:00 +0000 (10:08 +0900)]
Fix link fail for pthread on obs (#338)

Signed-off-by: Chunseok Lee <chunseok.lee@samsung.com>
6 years agoRename experiments to labs (#296)
박세희/동작제어Lab(SR)/Principal Engineer/삼성전자 [Fri, 30 Mar 2018 00:40:32 +0000 (09:40 +0900)]
Rename experiments to labs (#296)

As external and experiments both start with ex, it makes more typing.
This will change experiments folder name to labs to work more efficiently.

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
6 years agoFix name of target in nn/runtime/CMakeLists.txt
Hyung-Kyu Choi [Fri, 30 Mar 2018 00:01:10 +0000 (09:01 +0900)]
Fix name of target in nn/runtime/CMakeLists.txt

- Fix name of target in nn/runtime/CMakeLists.txt

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
6 years agoEnable three operation of CpuExecutor
Hyung-Kyu Choi [Thu, 29 Mar 2018 15:00:53 +0000 (00:00 +0900)]
Enable three operation of CpuExecutor

- Introduce Concatenation operation
- Enable OperationType::CONCATENATION, OperationType::SOFTMAX
  and OperationType::MAX_POOL_2D of CpuExecutor

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
6 years agoAdd target external_acl for docker build (#325)
이춘석/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 29 Mar 2018 23:55:45 +0000 (08:55 +0900)]
Add target external_acl for docker build (#325)

To skip acl build on docker env, `make external_acl` will copy shared libs
to lib folder.

Signed-off-by: Chunseok Lee <chunseok.lee@samsung.com>
6 years agoFix compilation errors in StepExecutor::startComputeOnCpu
Sanggyu Lee [Thu, 29 Mar 2018 10:34:55 +0000 (19:34 +0900)]
Fix compilation errors in StepExecutor::startComputeOnCpu

- Link pthread for NNRuntime test executables
- Add using statement for Status
- IExecutionCallback to ExecutionCallback

Signed-off-by: Sanggyu Lee <sg5.lee@samsung.com>
6 years agoEnable Pooling of CpuExecutor
Hyung-Kyu Choi [Thu, 29 Mar 2018 08:52:26 +0000 (17:52 +0900)]
Enable Pooling of CpuExecutor

- Enable Poolinig of CpuExecutor
- Enable OperationType::AVERAGE_POOL_2D of CpuExecutor

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
6 years agoCopy `Status.cpp` from libhidl of Android
jiseob.jang [Thu, 29 Mar 2018 10:38:05 +0000 (19:38 +0900)]
Copy `Status.cpp` from libhidl of Android

This commit copies `Status.cpp` from libhidl of Android.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
6 years agoT/F Lite Conv Example: Use NN API (if possible)
Jonghyun Park [Thu, 29 Mar 2018 09:17:54 +0000 (18:17 +0900)]
T/F Lite Conv Example: Use NN API (if possible)

This commit revises T/F Lite Conv Example to use NN API (if possible).

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoDo not build ACL static libraries (#306)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 29 Mar 2018 09:40:31 +0000 (18:40 +0900)]
Do not build ACL static libraries (#306)

* Do not build ACL static libraries

This commit updates acl.cmake not to build static libraries in order to
reduce build time.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoAdd arm ubuntu cross build script (#312)
이춘석/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 29 Mar 2018 08:58:01 +0000 (17:58 +0900)]
Add arm ubuntu cross build script (#312)

* Add arm ubuntu cross build script

build step
1. prepare rootfs for arm ubuntu
2. run docker/docker_build_cross_arm_ubuntu.sh

TODO
Cache ACL build artifacts

Signed-off-by: Chunseok Lee <chunseok.lee@samsung.com>
* Add install target

Signed-off-by: Chunseok Lee <chunseok.lee@samsung.com>
* apply comment and extract long command string

Signed-off-by: Chunseok Lee <chunseok.lee@samsung.com>
6 years agoIntroduce 'tflite_conv_example' (#317)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 29 Mar 2018 08:43:50 +0000 (17:43 +0900)]
Introduce 'tflite_conv_example' (#317)

This commit introduce 'tflite_conv_example' which creates and runs a simple
NN model with one convolution with T/F Lite interpreter.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoEnable SimpleMath of CpuExecutor
Hyung-Kyu Choi [Thu, 29 Mar 2018 08:07:50 +0000 (17:07 +0900)]
Enable SimpleMath of CpuExecutor

- Enable SimpleMath of CpuExecutor
- Enable OperationType::ADD of CpuExecutor

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
6 years agoChange comment
sjsujinkim [Thu, 29 Mar 2018 08:14:22 +0000 (17:14 +0900)]
Change comment

6 years agoAdd TODO comment into ExecutionBuilder::startCompute
sjsujinkim [Thu, 29 Mar 2018 08:06:48 +0000 (17:06 +0900)]
Add TODO comment into ExecutionBuilder::startCompute

This commit adds TODO comment into ExecutionBuilder::startCompute for future plan.

Signed-off-by: sjsujinkim <sjsujin.kim@samsung.com>
6 years agoRemove dummy return in Execution::create()
sjsujinkim [Thu, 29 Mar 2018 07:39:01 +0000 (16:39 +0900)]
Remove dummy return in Execution::create()

This commit removes dummy return which causes 'NeuralNetworksExecution_setInput passed a nullptr' in Execution::create().

Signed-off-by: sjsujinkim <sjsujin.kim@samsung.com>
6 years agoImplement Memory::create()
jiseob.jang [Thu, 29 Mar 2018 07:23:12 +0000 (16:23 +0900)]
Implement Memory::create()

This commit implements Memory::create().

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
6 years agoIntroduce CPU operation of NN runtime
Hyung-Kyu Choi [Thu, 29 Mar 2018 07:33:12 +0000 (16:33 +0900)]
Introduce CPU operation of NN runtime

- Introduce CPU operation of NN runtime
- Also introduce eigen and gemmlowp in depend/external

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
6 years agoRemove dummy return in CompilationBuilder::createExecution
sjsujinkim [Thu, 29 Mar 2018 07:02:04 +0000 (16:02 +0900)]
Remove dummy return in CompilationBuilder::createExecution

This commit removes dummy return which causes 'NeuralNetworksExecution_setInput passed a nullptr' in CompilationBuilder::createExecution.

Signed-off-by: sjsujinkim <sjsujin.kim@samsung.com>
6 years agoAdd std::endl before logging by LOG
sjsujinkim [Thu, 29 Mar 2018 06:46:19 +0000 (15:46 +0900)]
Add std::endl before logging by LOG

Currently, we can see the log logging by LOG only in one line. It is very hard to read.
This commit adds std::endl before logging by LOG helper for easy to read.

Signed-off-by: sjsujinkim <sjsujin.kim@samsung.com>