platform/core/ml/nnfw.git
4 years agoUpdate Makefile.template for Android (#7919)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Tue, 8 Oct 2019 05:06:39 +0000 (14:06 +0900)]
Update Makefile.template for Android (#7919)

Pass and set additional CMake variables for Android build.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
4 years agoIntroduce Dockerfile based on Ubuntu 18.04 (#7973)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Tue, 8 Oct 2019 04:56:38 +0000 (13:56 +0900)]
Introduce Dockerfile based on Ubuntu 18.04 (#7973)

This is an identical file with `infra/docker/Dockerfile` except for
base Ubuntu version. This will be used for Android build which requires
higher version of CMake.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
4 years ago[loco] Rename pad.test.cpp file (#7952)
채성우/On-Device Lab(SR)/Engineer/삼성전자 [Tue, 8 Oct 2019 03:17:34 +0000 (12:17 +0900)]
[loco] Rename pad.test.cpp file (#7952)

This commit renames pad.test.cpp file to Padding2D.test.cpp.

Signed-off-by: seongwoo <sw4670.chae@samsung.com>
4 years ago[neurun] Make some functions members of `BaseLoader` class (#7966)
Сергей Баранников/AI Tools Lab /SRR/Engineer/삼성전자 [Tue, 8 Oct 2019 02:27:58 +0000 (05:27 +0300)]
[neurun] Make some functions members of `BaseLoader` class (#7966)

* Move standalone functions `convertActivation`, `tensorTypeToDataType` and `lopadOperationIO` inside `BaseLoader` class.
* Rewrite `convertActivation` to use `switch` instead of `static_cast`.
* Improve some error messages a little.

Signed-off-by: Sergei Barannikov <s.barannikov@samsung.com>
4 years ago[res] Add testcases for merging concat (#7961)
남궁석/On-Device Lab(SR)/Engineer/삼성전자 [Tue, 8 Oct 2019 01:56:11 +0000 (10:56 +0900)]
[res] Add testcases for merging concat (#7961)

This commit will add testcases for `MergeConcat` optimization

Signed-off-by: Seok NamKoong <sk.namkoong@samsung.com>
4 years ago[exo-tflite] Introduce locoex::FusedActFunc converter (#7964)
남궁석/On-Device Lab(SR)/Engineer/삼성전자 [Tue, 8 Oct 2019 01:55:12 +0000 (10:55 +0900)]
[exo-tflite] Introduce locoex::FusedActFunc converter (#7964)

This commit will introduce `locoex::FusedActFunc` converter,
to return `tflite::ActivationFunctionType`

Signed-off-by: Seok NamKoong <sk.namkoong@samsung.com>
4 years ago[moco-tf] ShapeInf for TFConcatV2 (#7947)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Tue, 8 Oct 2019 01:24:29 +0000 (10:24 +0900)]
[moco-tf] ShapeInf for TFConcatV2 (#7947)

* [moco-tf] ShapeInf for TFConcatV2

This will update shape inference to be done in TFShapeInferenceRule for TFConcatV2 node and not use ConcatData annotation

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
* apply comments

* simplify assert check

4 years ago[exo-tflite] exporting tflite CONV_2D op by using TFLConv2d (#7941)
윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 [Tue, 8 Oct 2019 01:10:46 +0000 (10:10 +0900)]
[exo-tflite] exporting tflite CONV_2D op by using TFLConv2d (#7941)

This code enables tf2tflite to export tflite CONV_2D op by using TFLConv2d. (when knob is on)

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
4 years ago[mir2loco] Fix Pad/Window/Stride initialization (#7968)
Сергей Баранников/AI Tools Lab /SRR/Engineer/삼성전자 [Mon, 7 Oct 2019 17:24:31 +0000 (20:24 +0300)]
[mir2loco] Fix Pad/Window/Stride initialization (#7968)

The order of height / width was messed up.

Signed-off-by: Sergei Barannikov <s.barannikov@samsung.com>
4 years ago[mir_tflite] Change the type of `_tensorMap` to `vector`. (#7967)
Сергей Баранников/AI Tools Lab /SRR/Engineer/삼성전자 [Mon, 7 Oct 2019 15:46:21 +0000 (18:46 +0300)]
[mir_tflite] Change the type of `_tensorMap` to `vector`. (#7967)

`vector` is more efficient and less space consuming.

Signed-off-by: Sergei Barannikov <s.barannikov@samsung.com>
4 years ago[moco_tf] Remove FixShapeTransform.test.cpp (#7955)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 7 Oct 2019 10:30:28 +0000 (19:30 +0900)]
[moco_tf] Remove FixShapeTransform.test.cpp (#7955)

This will remove FixShapeTransform.test.cpp file
- FixShapeTransform will be replaced by TFShapeInferenceRule

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
4 years agoMake to support SpaceToBatchND op for acl neon (#7950)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Mon, 7 Oct 2019 10:17:21 +0000 (19:17 +0900)]
Make to support SpaceToBatchND op for acl neon (#7950)

This commit make to support SpaceToBatchND op for acl neon.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
4 years ago[neurun] Introduce BaseLoader (#7914)
Сергей Баранников/AI Tools Lab /SRR/Engineer/삼성전자 [Mon, 7 Oct 2019 10:16:44 +0000 (13:16 +0300)]
[neurun] Introduce BaseLoader (#7914)

Rename `TFLiteLoader` class to `BaseLoader` and move it from `tflite/tflite_loader.cc` to `base_loader/base_loader.h`.

Signed-off-by: Sergei Barannikov <s.barannikov@samsung.com>
4 years ago[android] Update build_android_ndk.sh (#7946)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Mon, 7 Oct 2019 10:14:32 +0000 (19:14 +0900)]
[android] Update build_android_ndk.sh (#7946)

Remove unused arguments for this script.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
4 years ago[mir_tflite] Remove _modelRaw variable (#7956)
Сергей Баранников/AI Tools Lab /SRR/Engineer/삼성전자 [Mon, 7 Oct 2019 10:05:08 +0000 (13:05 +0300)]
[mir_tflite] Remove _modelRaw variable (#7956)

Replace private `_modelRaw` variable with local-to-function `model_buffer`.

Signed-off-by: Sergei Barannikov <s.barannikov@samsung.com>
4 years ago[moco-tf] Empty lines for TFShapeInferenceHelper.h (#7948)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 7 Oct 2019 07:17:50 +0000 (16:17 +0900)]
[moco-tf] Empty lines for TFShapeInferenceHelper.h (#7948)

This will add some empty lines for readability in TFShapeInferenceHelper.h

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
4 years agoFix `./nnfw configure` command (#7939)
이성재/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 7 Oct 2019 06:10:58 +0000 (15:10 +0900)]
Fix `./nnfw configure` command (#7939)

- Added INSTALL_PATH creation to satisfy prerequisites for the
  `./nnfw install` command.

Signed-off-by: Sung-Jae Lee <sj925.lee@samsung.com>
4 years ago[exo-tflite] Rewriting a test using exo::test::TestGraph (#7924)
윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 7 Oct 2019 05:45:23 +0000 (14:45 +0900)]
[exo-tflite] Rewriting a test using exo::test::TestGraph (#7924)

Test was re-written using exo::test::TestGraph and was simplified.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
4 years agoMake to support SpaceToBatchND op for acl cl (#7933)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Mon, 7 Oct 2019 05:34:03 +0000 (14:34 +0900)]
Make to support SpaceToBatchND op for acl cl (#7933)

This commit make to support SpaceToBatchND op for acl cl.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
4 years agoPad Operation in tflite_loader (#7932)
이춘석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Mon, 7 Oct 2019 03:53:41 +0000 (12:53 +0900)]
Pad Operation in tflite_loader (#7932)

Pad operaions is now supported by tflite_loader

Signed-off-by: Chunseok Lee <chunseok.lee@samsung.com>
4 years agoFix validate check in Conv2d (#7937)
Alexander Efimov/AI Tools Lab/./Samsung Electronics [Mon, 7 Oct 2019 01:55:20 +0000 (04:55 +0300)]
Fix validate check in Conv2d (#7937)

Do not accept conv2d operation with non one dilations

Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
4 years ago[exo-tflite] remove unused header (#7923)
윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 7 Oct 2019 01:53:56 +0000 (10:53 +0900)]
[exo-tflite] remove unused header (#7923)

This removes unused header in `TFLShapeInferenceRule.cpp`.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
4 years ago[res] make explain.sh excutable (#7917)
윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 7 Oct 2019 01:51:43 +0000 (10:51 +0900)]
[res] make explain.sh excutable (#7917)

exeplain.sh now can be run (by `chmod +x explain.sh`)

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
4 years ago[moco] All IRs (#7908)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 7 Oct 2019 00:12:09 +0000 (09:12 +0900)]
[moco] All IRs (#7908)

* [moco] All IRs

This will add rest of IRs of moco for TFDialect

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
* fix def

4 years ago[exo-tflite] Introducing Pass dir and Passes.h (#7909)
윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 [Sun, 6 Oct 2019 23:54:16 +0000 (08:54 +0900)]
[exo-tflite] Introducing Pass dir and Passes.h (#7909)

This introduces Pass dir, which is for all optimization pass for TFL nodes, and Passes.h, which is a aggregation of passes in Pass dir.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
4 years ago[exo-tflite] Remove body of CanonicalNodeConverter.cpp (#7921)
윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 [Sun, 6 Oct 2019 23:53:04 +0000 (08:53 +0900)]
[exo-tflite] Remove body of CanonicalNodeConverter.cpp (#7921)

`Run` is now included inside `*.h` so removed from `*.cpp` file.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
4 years ago[exo-tflite] Code to export TFLConv2D (#7926)
윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 [Sun, 6 Oct 2019 23:49:57 +0000 (08:49 +0900)]
[exo-tflite] Code to export TFLConv2D (#7926)

Now OperationExporter has code to export TFLConv2D.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
4 years ago[exo-tflite] Complete node summary for TFLAvergePool2D & TFLMaxPool2D (#7928)
윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 [Sun, 6 Oct 2019 23:46:17 +0000 (08:46 +0900)]
[exo-tflite] Complete node summary for TFLAvergePool2D & TFLMaxPool2D (#7928)

Complete node summary for TFLAvergePool2D & TFLMaxPool2D was added.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
4 years ago[exo-tflite] adding an assert to check rank of ifm in TFLShapeInferenceRule (#7922)
윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 [Sun, 6 Oct 2019 23:41:49 +0000 (08:41 +0900)]
[exo-tflite] adding an assert to check rank of ifm in TFLShapeInferenceRule (#7922)

This adds an `assert` to check rank of ifm in TFLShapeInferenceRule.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
4 years ago[mir_tflite] Use object-based API for subgraphs and tensors (#7936)
Сергей Баранников/AI Tools Lab /SRR/Engineer/삼성전자 [Fri, 4 Oct 2019 18:09:39 +0000 (21:09 +0300)]
[mir_tflite] Use object-based API for subgraphs and tensors (#7936)

Object-based API is more convenient.

Signed-off-by: Sergei Barannikov <s.barannikov@samsung.com>
4 years ago[mir_tflite] Use object-based API for operators (#7934)
Сергей Баранников/AI Tools Lab /SRR/Engineer/삼성전자 [Fri, 4 Oct 2019 14:32:40 +0000 (17:32 +0300)]
[mir_tflite] Use object-based API for operators (#7934)

Object-based API is more convenient.

Signed-off-by: Sergei Barannikov <s.barannikov@samsung.com>
4 years ago[res] Adding manifest for NET_0008 and NET_0009 (#7916)
윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 [Fri, 4 Oct 2019 08:30:43 +0000 (17:30 +0900)]
[res] Adding manifest for NET_0008 and NET_0009 (#7916)

Summary for NET_0008 and NET_0009 was added.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
4 years ago[exo-tflite] Remove "// TODO TFLNop" (#7925)
윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 [Fri, 4 Oct 2019 08:30:02 +0000 (17:30 +0900)]
[exo-tflite] Remove "// TODO TFLNop" (#7925)

Since we don't have `TFLNop`, related comments were removed.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
4 years ago[res] Add simple Pad test case (#7893)
채성우/On-Device Lab(SR)/Engineer/삼성전자 [Fri, 4 Oct 2019 08:25:50 +0000 (17:25 +0900)]
[res] Add simple Pad test case (#7893)

* [res] Add simple Pad test case

This commit adds simple pad test case.

Signed-off-by: seongwoo <sw4670.chae@samsung.com>
* make manifest.

4 years ago[logo] simplifying FilterEncode-FilterDecode (#7875)
윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 [Fri, 4 Oct 2019 08:20:13 +0000 (17:20 +0900)]
[logo] simplifying FilterEncode-FilterDecode  (#7875)

* [logo] simplifying FilterEncode-FilterDecode to Transpose (or to Forward)

This commit simplifying FilterEncode-FilterDecode to Transpose (or to Forward)

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
* fix wrong const size

4 years ago[nnfw-build] Revise generate test setting (#7905)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 4 Oct 2019 08:03:17 +0000 (17:03 +0900)]
[nnfw-build] Revise generate test setting (#7905)

- Remove GENERATE_NNAPI_TESTS in makefile
- Use cmake option to disable generate test
  - Default: enable
  - For tizen: disable as default for gbs/obs, enable on tizen cross build script

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
4 years ago[neurun] Schedule branch by branch instead of node (#6965)
Дилшоджон Пошшоев/AI Tools Lab /SRR/Engineer/삼성전자 [Fri, 4 Oct 2019 07:01:51 +0000 (10:01 +0300)]
[neurun] Schedule branch by branch instead of node (#6965)

* [neurun] Schedule branch by branch instead of node

Related issue: 6963
Schedule whole branch (that can be seen as a subgraph) recursively
before moving to next node

Signed-off-by: Poshshoev Dilshodzhon <d.poshshoev@samsung.com>
* Fix CI failure

Signed-off-by: Poshshoev Dilshodzhon <d.poshshoev@samsung.com>
* Address offline review

Signed-off-by: Poshshoev Dilshodzhon <d.poshshoev@samsung.com>
* Fix review feedbacks

Signed-off-by: Poshshoev Dilshodzhon <d.poshshoev@samsung.com>
* Address feedbacks: rename scheduleRecursively

Signed-off-by: Poshshoev Dilshodzhon <d.poshshoev@samsung.com>
* Fix documentation typo

Signed-off-by: Poshshoev Dilshodzhon <d.poshshoev@samsung.com>
4 years ago[nnfw-gbs] Remove outdated code in nnfw.spec (#7906)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 4 Oct 2019 01:36:08 +0000 (10:36 +0900)]
[nnfw-gbs] Remove outdated code in nnfw.spec (#7906)

Remove pacl related code
Packaging *.so file only and remove useless exclude
Remove install libbackend_acl_common.a

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
4 years ago[mir-tflite-importer] Hide class TFLiteImporter definition (#7913)
Гусев Дмитрий Викторович/AI Tools Lab /SRR/Engineer/삼성전자 [Wed, 2 Oct 2019 17:46:52 +0000 (20:46 +0300)]
[mir-tflite-importer] Hide class TFLiteImporter definition (#7913)

Class moved to cpp in order to simplify interface header.

Signed-off-by: Dmitry Gusev <d.gusev@partner.samsung.com>
4 years ago[mir-onnx-importer] Hide class OnnxImporterImpl definition (#7912)
Гусев Дмитрий Викторович/AI Tools Lab /SRR/Engineer/삼성전자 [Wed, 2 Oct 2019 17:43:43 +0000 (20:43 +0300)]
[mir-onnx-importer] Hide class OnnxImporterImpl definition (#7912)

Class moved to cpp in order to simplify interface header.

Signed-off-by: Dmitry Gusev <d.gusev@partner.samsung.com>
4 years ago[mir-caffe2-importer] Hide class Caffe2Importer definition (#7911)
Гусев Дмитрий Викторович/AI Tools Lab /SRR/Engineer/삼성전자 [Wed, 2 Oct 2019 17:42:58 +0000 (20:42 +0300)]
[mir-caffe2-importer] Hide class Caffe2Importer definition (#7911)

Class moved to cpp in order to simplify interface header.

Signed-off-by: Dmitry Gusev <d.gusev@partner.samsung.com>
4 years ago[mir-caffe-importer] Hide class CaffeImporter definition (#7910)
Гусев Дмитрий Викторович/AI Tools Lab /SRR/Engineer/삼성전자 [Wed, 2 Oct 2019 17:42:22 +0000 (20:42 +0300)]
[mir-caffe-importer] Hide class CaffeImporter definition (#7910)

In order to simplify interface header, class moved to cpp.

Signed-off-by: Dmitry Gusev <d.gusev@partner.samsung.com>
4 years ago[nnapi-test] Introduce TestNeuralNetworksWrapper (#7903)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 2 Oct 2019 06:49:35 +0000 (15:49 +0900)]
[nnapi-test] Introduce TestNeuralNetworksWrapper (#7903)

Port TestNeuralNetworksWrapper.h/cpp from upstream android nn runtime's NNAPI test

Fix
- Comment out 'include NeuralNetworksWrapperExtensions.h' and related namespace
- Use boost::optional instead of std::optional

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
4 years ago[moco] Introduce TensorName and VariadicArityNode (#7899)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Wed, 2 Oct 2019 05:51:43 +0000 (14:51 +0900)]
[moco] Introduce TensorName and VariadicArityNode (#7899)

This will introduce two helper TensorName and VariadicArityNode used for TFDialect IRs

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
4 years agoApply optimized cpu kernel of MaxPoolFloat32 (#7886)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Wed, 2 Oct 2019 05:35:42 +0000 (14:35 +0900)]
Apply optimized cpu kernel of MaxPoolFloat32 (#7886)

This commit applies optimized cpu kernel of MaxPoolFloat32.
  - Introduce optimized cpu kernel of MaxPool for float
  - Apply that kernel for cpu backend of neurun

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
4 years ago[nnfw-api] rename api related files (#7895)
이상규/On-Device Lab(SR)/Principal Engineer/삼성전자 [Wed, 2 Oct 2019 05:01:52 +0000 (14:01 +0900)]
[nnfw-api] rename api related files (#7895)

- nnfw_dev.cc is renamed to nnfw_api.cc.
  - nnfw_dev.cc looks like the implementation for `nnfw_dev.h`. (i.e. APIs for developers like custom op)
  - However, it is a binding from C APIs to C++ implementation for WHOLE APIs.
- nnfw_api.cc and nnfw_api.hpp are C++ implementation.
  - nnfw_api.cc is already used for a binding implementation the above.
  - Thus, they are renamed to nnfw_api_internal.*.
- nnfw_api.hpp is renamed to nnfw_api_internal.h.
  - It was the only file that uses the suffix `*.hpp`.
- wrapper directory is removed to make structure simple.

Signed-off-by: Sanggyu Lee <sg5.lee@samsung.com>
4 years ago[android] Disable STRICT_BUILD (#7900)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Wed, 2 Oct 2019 04:29:35 +0000 (13:29 +0900)]
[android] Disable STRICT_BUILD (#7900)

Disable STRICT_BUILD to suppress warnings from ARMComputeEx.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
4 years ago[moco] Introduce Conv2D series IR (#7891)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Wed, 2 Oct 2019 03:38:18 +0000 (12:38 +0900)]
[moco] Introduce Conv2D series IR (#7891)

This will introduce IR for Conv2D, Conv2DBackpropInput and DepthwiseConv2dNative node

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
4 years ago[moco] Introduce IR for Add AvgPool BiasAdd (#7890)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Wed, 2 Oct 2019 03:38:00 +0000 (12:38 +0900)]
[moco] Introduce IR for Add AvgPool BiasAdd (#7890)

This will introduce IR for Add, AvgPool and BiasAdd node

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
4 years ago[android] Disable building unsupported libraries (#7898)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Wed, 2 Oct 2019 03:28:05 +0000 (12:28 +0900)]
[android] Disable building unsupported libraries (#7898)

Disable building libraries that are not supported due to dependency on
Boost library.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
4 years agoSegregate interface of tflite_loader (#7668)
Сергей Баранников/AI Tools Lab /SRR/Engineer/삼성전자 [Wed, 2 Oct 2019 02:29:02 +0000 (05:29 +0300)]
Segregate interface of tflite_loader (#7668)

* Segregate interface of tflite_loader

Split `tflite_loader` component into two parts -- interface and implementation.
Put the loader into `neurun` namespace.
Remove a couple of unused functions that triggered compiler warnings.

Signed-off-by: Sergei Barannikov <s.barannikov@samsung.com>
4 years ago[moco] Introduce TFNodeVisitor (#7887)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Wed, 2 Oct 2019 01:01:53 +0000 (10:01 +0900)]
[moco] Introduce TFNodeVisitor (#7887)

This will introduce TFNodeVisitor and revise TFNode to support visitor pattern

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
4 years ago[exo-tflite] add TensorTransposeConverter into the list of pass (#7877)
윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 [Tue, 1 Oct 2019 22:06:58 +0000 (07:06 +0900)]
[exo-tflite] add TensorTransposeConverter into the list of pass (#7877)

This adds TensorTransposeConverter into the list of pass.
Please turns on the knob to convert TensorTranspose to TFLTransport.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
4 years ago[mir] Fix TensorVariant constructor used in broadcasting (#7889)
Павел Ильютченко/AI Tools Lab /SRR/Engineer/삼성전자 [Tue, 1 Oct 2019 17:04:12 +0000 (20:04 +0300)]
[mir] Fix TensorVariant constructor used in broadcasting (#7889)

* Fix TensorType creation with old shape

Signed-off-by: Pavel Iliutchenko <p.iliutchenk@samsung.com>
4 years agoChange all calls to MIR importers in [nnc] (#7879)
Гусев Дмитрий Викторович/AI Tools Lab /SRR/Engineer/삼성전자 [Tue, 1 Oct 2019 12:15:42 +0000 (15:15 +0300)]
Change all calls to MIR importers in [nnc] (#7879)

According with interface changes, we now use loadModel(...) functions.

Signed-off-by: Dmitry Gusev <d.gusev@partner.samsung.com>
4 years ago[moco-tf] ShapeInf for Add AvgPool BiasAdd (#7885)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Tue, 1 Oct 2019 10:36:13 +0000 (19:36 +0900)]
[moco-tf] ShapeInf for Add AvgPool BiasAdd (#7885)

This will enable shape inference for Add AvgPool and BiasAdd node

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
4 years ago[moco-tf] Use TFShapeInferenceHelper fox FixShape (#7884)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Tue, 1 Oct 2019 10:35:54 +0000 (19:35 +0900)]
[moco-tf] Use TFShapeInferenceHelper fox FixShape (#7884)

This will make FixShapeTransform to use TFShapeInferenceHelper methods

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
4 years ago[nnfw-cmake] Remove runtime variable (#7881)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Tue, 1 Oct 2019 10:26:37 +0000 (19:26 +0900)]
[nnfw-cmake] Remove runtime variable (#7881)

Remove unused runtime name variable
Move set LIB_NEURUN variable

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
4 years ago[moco-tf] Refactor Conv2DCanonicalizer (#7874)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Tue, 1 Oct 2019 09:47:32 +0000 (18:47 +0900)]
[moco-tf] Refactor Conv2DCanonicalizer (#7874)

This will update Conv2DCanonicalizer to do shape, pad inference and NOT to use annotations

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
4 years ago[moco-tf] Refactor AvgPoolCanonicalizer (#7872)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Tue, 1 Oct 2019 09:47:11 +0000 (18:47 +0900)]
[moco-tf] Refactor AvgPoolCanonicalizer (#7872)

This will update AvgPoolCanonicalizer to do shape, pad inference and NOT to use annotations

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
4 years ago[moco] Introduce TFNode and related (#7870)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Tue, 1 Oct 2019 09:42:21 +0000 (18:42 +0900)]
[moco] Introduce TFNode and related (#7870)

This will introduce TFNode base class and related codes

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
4 years ago[moco] Introduce requires.cmake (#7880)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Tue, 1 Oct 2019 09:41:49 +0000 (18:41 +0900)]
[moco] Introduce requires.cmake (#7880)

This will introduce moco requires.cmake file

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
4 years ago[nnfw-cmake] Replace fp16 source package config (#7840)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Tue, 1 Oct 2019 09:24:52 +0000 (18:24 +0900)]
[nnfw-cmake] Replace fp16 source package config (#7840)

Move fp16 source package config to common directory

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
4 years ago[neurun] move api out of frontend (#7873)
이상규/On-Device Lab(SR)/Principal Engineer/삼성전자 [Tue, 1 Oct 2019 09:20:37 +0000 (18:20 +0900)]
[neurun] move api out of frontend (#7873)

- api is now under `neurun`, instead of `neurun/frontend`.
- add dependency for nnfw-header in custom op kernels and apps.

Signed-off-by: Sanggyu Lee <sg5.lee@samsung.com>
4 years ago[moco-tf] broadcast_shape to helper (#7844)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Tue, 1 Oct 2019 09:12:25 +0000 (18:12 +0900)]
[moco-tf] broadcast_shape to helper (#7844)

* [moco-tf] broadcast_shape to helper

This will copy broadcast_shape method and related codes to helper file

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
* add todo comment

4 years ago[moco-tf] Introduce ShapeInferenceAlgorithm (#7871)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Tue, 1 Oct 2019 08:18:49 +0000 (17:18 +0900)]
[moco-tf] Introduce ShapeInferenceAlgorithm (#7871)

This will introduce ShapeInferenceAlgorithm to provide shape inferece by type of TFNode

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
4 years agoApply optimized cpu kernel for AvgPoolFloat32 (#7834)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Tue, 1 Oct 2019 07:35:56 +0000 (16:35 +0900)]
Apply optimized cpu kernel for AvgPoolFloat32 (#7834)

This commit applies optimized cpu kernel for AvgPoolFloat32.
  - Introduce introduce optimized cpu kernel of AvgPool2D op
  - Apply that kernel for AvgPoolFloat32

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
4 years ago[res] Summary for NET_0025 (#7867)
박천교/On-Device Lab(SR)/Engineer/삼성전자 [Tue, 1 Oct 2019 07:14:06 +0000 (16:14 +0900)]
[res] Summary for NET_0025 (#7867)

This commit adds summary for NET_0025, CBR network test case.

Signed-off-by: Cheongyo Bahk <ch.bahk@samsung.com>
4 years ago[tf2tflite] Test NET_0025 (#7868)
박천교/On-Device Lab(SR)/Engineer/삼성전자 [Tue, 1 Oct 2019 07:13:34 +0000 (16:13 +0900)]
[tf2tflite] Test NET_0025 (#7868)

This commit registers NET_0025 unit test, CBR network, to tf2tflite

Signed-off-by: Cheongyo Bahk <ch.bahk@samsung.com>
4 years ago[moco-tf] PlaneShape for shape inference (#7866)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Tue, 1 Oct 2019 07:10:42 +0000 (16:10 +0900)]
[moco-tf] PlaneShape for shape inference (#7866)

This will introduce PlaneShape, PlaneInference and related codes for plane shape inference for Pool and Conv2D series nodes

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
4 years ago[moco-tf] window_of for Conv2D (#7864)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Tue, 1 Oct 2019 07:10:18 +0000 (16:10 +0900)]
[moco-tf] window_of for Conv2D (#7864)

This will introduce window_of method used for Conv2D type nodes

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
4 years ago[logo] traversing using active_nodes instead of all_nodes (#7865)
윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 [Tue, 1 Oct 2019 07:09:59 +0000 (16:09 +0900)]
[logo] traversing using active_nodes instead of all_nodes (#7865)

Using all_nodes makes simplifying orphant subgraph and cause error.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
4 years ago[moco] Introduce lang sub project and TFDialect (#7863)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Tue, 1 Oct 2019 07:08:44 +0000 (16:08 +0900)]
[moco] Introduce lang sub project and TFDialect (#7863)

This will introduce moco lang sub project with TFDialect class

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
4 years ago[pacl] Additional NNAPI implementation for update NNAPI (#7860)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Tue, 1 Oct 2019 03:06:11 +0000 (12:06 +0900)]
[pacl] Additional NNAPI implementation for update NNAPI (#7860)

- PACL's NNAPI implementation for updated NNAPI generated test
- Update skiplist for updated validation check

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
4 years ago[nnfw-cmake] Rename NNFW_OVERLAY_DIR (#7848)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Tue, 1 Oct 2019 02:01:31 +0000 (11:01 +0900)]
[nnfw-cmake] Rename NNFW_OVERLAY_DIR (#7848)

Rename NNFW_OVERLAY_DIR to NNAS_OVERLAY_DIR  to share cmake package config with nnfw

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
4 years ago[nnfw-cmake] Replace nonius package config (#7839)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Tue, 1 Oct 2019 01:56:38 +0000 (10:56 +0900)]
[nnfw-cmake] Replace nonius package config (#7839)

Move nonius and source package config to common directory

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
4 years ago[exo-tflite] Make S32 tensor to be exported (#7827)
윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 [Tue, 1 Oct 2019 01:45:05 +0000 (10:45 +0900)]
[exo-tflite] Make S32 tensor to be exported (#7827)

* [exo-exporter] Make S32 tensor to be exported

Previously only FLOAT32 tensor could be exported. This commit enables S32 tensor to be exported.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
* throw exception when not-supported dtype is found

4 years ago[moco] Initial readme (#7813)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Tue, 1 Oct 2019 01:17:07 +0000 (10:17 +0900)]
[moco] Initial readme (#7813)

* [moco] Initial readme

This will introduce readme for moco project and moco-lang sub project

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
* change folder to lang

* update moco

4 years ago[nncc-cmake] Introduce NNAS_OVERLAY_DIR (#7846)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Tue, 1 Oct 2019 00:53:36 +0000 (09:53 +0900)]
[nncc-cmake] Introduce NNAS_OVERLAY_DIR (#7846)

Introduce NNAS_OVERLAY_DIR to share cmake package config with nnfw

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
4 years ago[exo-tflite] code to export TFLTranspose to tflite file (#7806)
윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 30 Sep 2019 23:21:59 +0000 (08:21 +0900)]
[exo-tflite] code to export TFLTranspose to tflite file (#7806)

Code to export TFLTranspose to tflite file was added into OperationExporter.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
4 years ago[exo-tflite] shape & type inference for TFLConv2D (#7835)
윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 30 Sep 2019 23:21:46 +0000 (08:21 +0900)]
[exo-tflite] shape & type inference for TFLConv2D (#7835)

This adds shape inference and type inference for TFLConv2D.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
4 years ago[exo-tfltie] converting loco::Conv2D to locoex::TFLConv2D (#7845)
윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 30 Sep 2019 23:21:33 +0000 (08:21 +0900)]
[exo-tfltie] converting loco::Conv2D to locoex::TFLConv2D (#7845)

This adds a Conv2DConverter that converts loco::Conv2D to locoex::TFLConv2D.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
4 years ago[moco-tf] Revose ResolveReshapeWildcardDim (#7843)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 30 Sep 2019 22:21:32 +0000 (07:21 +0900)]
[moco-tf] Revose ResolveReshapeWildcardDim (#7843)

This will revise ResolveReshapeWildcardDim to use NodeShape instead of ShapeInferenceData

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
4 years ago[moco-tf] Revise ResolveConstantShape (#7842)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 30 Sep 2019 22:21:06 +0000 (07:21 +0900)]
[moco-tf] Revise ResolveConstantShape (#7842)

This will revise ResolveConstantShape to use NodeShape instead of ShapeInferenceData

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
4 years ago[moco-tf] Revise FuseBinaryIntoPreceding (#7841)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 30 Sep 2019 22:14:55 +0000 (07:14 +0900)]
[moco-tf] Revise FuseBinaryIntoPreceding (#7841)

This will revise FuseBinaryIntoPreceding to use NodeShape instead of ShapeInferenceData

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
4 years ago[mir2loco] Support Broadcast on Elementwise operations (#7665)
Павел Ильютченко/AI Tools Lab /SRR/Engineer/삼성전자 [Mon, 30 Sep 2019 15:34:17 +0000 (18:34 +0300)]
[mir2loco] Support Broadcast on Elementwise operations (#7665)

* Supported new elemetwise operations
* Implemented TensorBroadcast creation
* Fixed all functions for broadcasting

Signed-off-by: Pavel Iliutchenko <p.iliutchenk@samsung.com>
4 years agoExpand [mir-caffe-importer] interface (#7850)
Гусев Дмитрий Викторович/AI Tools Lab /SRR/Engineer/삼성전자 [Mon, 30 Sep 2019 15:10:40 +0000 (18:10 +0300)]
Expand [mir-caffe-importer] interface (#7850)

Added new interface function loadModel in caffe importer

Signed-off-by: Dmitry Gusev <d.gusev@partner.samsung.com>
4 years agoExpand [mir-caffe2-importer] interface (#7855)
Гусев Дмитрий Викторович/AI Tools Lab /SRR/Engineer/삼성전자 [Mon, 30 Sep 2019 15:08:48 +0000 (18:08 +0300)]
Expand [mir-caffe2-importer] interface (#7855)

A new function loadModel was added.

Signed-off-by: Dmitry Gusev <d.gusev@partner.samsung.com>
4 years agoExpand [mir-onnx-importer] interface (#7856)
Гусев Дмитрий Викторович/AI Tools Lab /SRR/Engineer/삼성전자 [Mon, 30 Sep 2019 15:06:40 +0000 (18:06 +0300)]
Expand [mir-onnx-importer] interface (#7856)

A new function loadModel was added.

Signed-off-by: Dmitry Gusev <d.gusev@partner.samsung.com>
4 years agoImporter interface was expanded. (#7857)
Гусев Дмитрий Викторович/AI Tools Lab /SRR/Engineer/삼성전자 [Mon, 30 Sep 2019 15:05:19 +0000 (18:05 +0300)]
Importer interface was expanded. (#7857)

A new function loadModel was added.

Signed-off-by: Dmitry Gusev <d.gusev@partner.samsung.com>
4 years ago[mir] Introduce TensorType (#7854)
Сергей Баранников/AI Tools Lab /SRR/Engineer/삼성전자 [Mon, 30 Sep 2019 14:59:14 +0000 (17:59 +0300)]
[mir] Introduce TensorType (#7854)

* Add `TensorType` class which combines tensor element type and shape.
* Use it in `TensorVariant` and `Operation::Output`.

Signed-off-by: Sergei Barannikov <s.barannikov@samsung.com>
4 years ago[nnapi] Update NeuralNetworks.Wrapper.h (#7829)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Mon, 30 Sep 2019 11:04:00 +0000 (20:04 +0900)]
[nnapi] Update NeuralNetworks.Wrapper.h (#7829)

Use NeuralNetworks.Wrapper.h in android-10 nn runtime
Fix to use boost::optional instead of std::optional (c++17 feature)

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
4 years ago[moco-tf] TFShapeInferenceRule V2 (#7825)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 30 Sep 2019 10:00:24 +0000 (19:00 +0900)]
[moco-tf] TFShapeInferenceRule V2 (#7825)

This will revise TFShapeInferenceRule to support V2 interface

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
4 years ago[moco-tf] Fix build error for TFShapeInferenceHelper path (#7837)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 30 Sep 2019 09:36:20 +0000 (18:36 +0900)]
[moco-tf] Fix build error for TFShapeInferenceHelper path (#7837)

This will fix build error for recent TFShapeInferenceHelper path change

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
4 years ago[exo-tflite] converting loco::TensorTranspose to locoex::TFLTranspose (#7824)
윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 30 Sep 2019 09:07:15 +0000 (18:07 +0900)]
[exo-tflite] converting loco::TensorTranspose to locoex::TFLTranspose (#7824)

* [exo-tflite] converter to convert loco::TensorTranspose to locoex::TFLTranspose

A converter to convert loco::TensorTranspose to locoex::TFLTranspose is introduced.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
* adding more validation check + using std::is_permutation(..)

4 years ago[moco-tf] Revise TFNodeSummaryBuilder for TFConst (#7826)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 30 Sep 2019 09:02:35 +0000 (18:02 +0900)]
[moco-tf] Revise TFNodeSummaryBuilder for TFConst (#7826)

This will remove shape information for TFConst as shape is shown in loco

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
4 years ago[moco-tf] Convert TF strides and ksize (#7812)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 30 Sep 2019 08:59:48 +0000 (17:59 +0900)]
[moco-tf] Convert TF strides and ksize (#7812)

* [moco-tf] Convert TF strides and ksize

This will introduce two methods to convert TensorFlow Strides and KSize vector to loco Stride and Window in TFShapeInferenceHelper

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
* change folder to src

* recover changes

4 years ago[nnfw-cmake] Replace NNPACK and related package config (#7798)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Mon, 30 Sep 2019 08:33:24 +0000 (17:33 +0900)]
[nnfw-cmake] Replace NNPACK and related package config (#7798)

Move NNPACK and related source package config to common directory

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
4 years ago[lib-tflite] Remove tflite version definition depdency code (#7807)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Mon, 30 Sep 2019 08:23:17 +0000 (17:23 +0900)]
[lib-tflite] Remove tflite version definition depdency code (#7807)

- Remove TFLITE_MAJOR_VER and TFLITE_MINOR_VER setting in nnfw.spec and cmake script
- Remove TFLITE_MAJOR_VER and TFLITE_MINOR_VER dependency code in tflite extension library

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
4 years ago[exo-tflite] helper funtion to create filter (#7828)
윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 30 Sep 2019 08:07:00 +0000 (17:07 +0900)]
[exo-tflite] helper funtion to create filter (#7828)

* [exo-tflite] helper fultion to create filter

This adds helper functions to easily create FilterEncode and FilterDecode of two filter layout.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
* remove blank