platform/core/ml/nnfw.git
5 years agoMerge nncc repo branch 'master' into master
Hyeongseok Oh [Mon, 22 Jul 2019 01:03:34 +0000 (10:03 +0900)]
Merge nncc repo branch 'master' into master

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoUpdate .clang-format (#4361) nncc_backup
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Sun, 21 Jul 2019 23:43:18 +0000 (08:43 +0900)]
Update .clang-format (#4361)

This commit updates .clang-format based on internal policy.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years agoRemove legacy ConstantInitializer (#5718)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Fri, 19 Jul 2019 09:00:46 +0000 (18:00 +0900)]
Remove legacy ConstantInitializer (#5718)

This commit removes legacy ConstantInitializer.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years agoSupport Mean op for acl_neon backend (#5707)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Fri, 19 Jul 2019 08:20:18 +0000 (17:20 +0900)]
Support Mean op for acl_neon backend (#5707)

This commit Supports Mean op for acl_neon backend.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years ago[dotdump] Show Backend ID for each Subgraph (#5716)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Fri, 19 Jul 2019 07:52:14 +0000 (16:52 +0900)]
[dotdump] Show Backend ID for each Subgraph (#5716)

This commit makes it to show Backend ID for each Subgraph. `fillcolor`
member is introduced but not used yet.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
5 years agoAdd performance test for scheduler and profiler (#5675)
Дилшоджон Умронхонович Пошшоев/AI Tools Lab /SRR/Engineer/삼성전자 [Fri, 19 Jul 2019 07:06:25 +0000 (16:06 +0900)]
Add performance test for scheduler and profiler (#5675)

* Add performance test for scheduler and profiler

Add a script to test performance of scheduler and profiler.
Since each model it compiles and executes 9 times, it takes
much time to finish.
Related issue: 5660

Signed-off-by: Dilshodzhon Poshshoev <d.poshshoev@samsung.com>
* Fix comment of PROFILING_RUN_CNT

Signed-off-by: Dilshodzhon Poshshoev <d.poshshoev@samsung.com>
* Move exec_time.json to log dir, not remove

Signed-off-by: Dilshodzhon Poshshoev <d.poshshoev@samsung.com>
* Add some more fixes

Signed-off-by: Dilshodzhon Poshshoev <d.poshshoev@samsung.com>
5 years agoApply refactored ConstantInitializers (#5713)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Fri, 19 Jul 2019 06:40:42 +0000 (15:40 +0900)]
Apply refactored ConstantInitializers (#5713)

This commit applies refactored ConstantInitialzers.
  - Introduce ConstantInitializer into each backend.
  - Replace legacy ConstantInitializer with refactored ConstantInitializer.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years agoSupport SquaredDifference operation for acl_neon backend (#5704)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Fri, 19 Jul 2019 06:02:53 +0000 (15:02 +0900)]
Support SquaredDifference operation for acl_neon backend (#5704)

This commit supports SquaredDifference operation for acl_neon backend.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years ago[neurun] Redo exec::IFunction::runSync to abstract (#5697)
Дилшоджон Умронхонович Пошшоев/AI Tools Lab /SRR/Engineer/삼성전자 [Fri, 19 Jul 2019 04:40:46 +0000 (13:40 +0900)]
[neurun] Redo exec::IFunction::runSync to abstract (#5697)

If its new derived class is created and forgot to override
profiling will work incorrectly. So, making it abstract
garantees that it will be overridden

Signed-off-by: Dilshodzhon Poshshoev <d.poshshoev@samsung.com>
5 years agoSupport SUB operation for acl_neon backend (#5703)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Fri, 19 Jul 2019 04:36:08 +0000 (13:36 +0900)]
Support SUB operation for acl_neon backend (#5703)

This commit supports SUB operation for acl_neon backend.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years agoGather info in Execution class setInput & setOutput (#5701)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 19 Jul 2019 04:35:35 +0000 (13:35 +0900)]
Gather info in Execution class setInput & setOutput (#5701)

Fill _io_desc field in setInput/setOutput method
Check length correctness (setInput/setOutput in IExecutor  family will be removed)

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years ago[neurun] Save mean of exec times during profiling (#5698)
Дилшоджон Умронхонович Пошшоев/AI Tools Lab /SRR/Engineer/삼성전자 [Fri, 19 Jul 2019 04:30:07 +0000 (13:30 +0900)]
[neurun] Save mean of exec times during profiling (#5698)

Since just one run/measurement isn't robust, user may
want to run profiling several times. There fore instead
of rewriting existing measurements, save the mean

Signed-off-by: Dilshodzhon Poshshoev <d.poshshoev@samsung.com>
5 years ago[moco/tf] Record Graph-Level Input/Output Shape (#4357)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 19 Jul 2019 04:22:30 +0000 (13:22 +0900)]
[moco/tf] Record Graph-Level Input/Output Shape (#4357)

moco.tf frontend now records graph-level input/output shape.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years agoIntroduce ConstantInitializer into cpu backend (#5694)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Fri, 19 Jul 2019 04:19:05 +0000 (13:19 +0900)]
Introduce ConstantInitializer into cpu backend (#5694)

This commit introduces ConstantInitializer into cpu backend.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years agoSupport RSQRT operation for acl_neon backend (#5705)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Fri, 19 Jul 2019 04:05:31 +0000 (13:05 +0900)]
Support RSQRT operation for acl_neon backend (#5705)

This commit supports RSQRT operation for acl_neon backend.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years agoRelocate CMakeLists.txt (#4358)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 19 Jul 2019 03:28:25 +0000 (12:28 +0900)]
Relocate CMakeLists.txt (#4358)

* Relocate CMakeLists.txt

Now, CMakeLists.txt in in infra/nncc directory.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
* Fix nncc_find_resource

5 years agoRelocate documents in docs (#5683)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 19 Jul 2019 03:27:51 +0000 (12:27 +0900)]
Relocate documents in docs (#5683)

* Relocate documents in docs

Relocate documents in docs into docs/nnfw to
- Avoid conflict when repo merging
- Avoid confusion when document merging after repo merging

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
* Fix Readme and move doxygen config into infra

* Fix link to 2018_high_level_design.md

5 years agoRevise planTensors in Linear (#5689)
김용섭/On-Device Lab(SR)/Engineer/삼성전자 [Fri, 19 Jul 2019 02:19:50 +0000 (11:19 +0900)]
Revise planTensors in Linear (#5689)

* Revise planTensors in Linear

- Introduce tensor_builder_map instead of iterTensorBuilders
- Replace the type of constants from std::vector<model::OperandIndex>
to model::OperandIndexSequence constants
- Add model::OperandIndexMap<uint32_t> def_map
- Append the step for disposing and validation

Signed-off-by: Yongseop Kim <yons.kim@samsung.com>
* Avoid cases where insertion of unordered_map could happen

5 years ago[locomotiv] Session for subgraph (#4348)
박천교/On-Device Lab(SR)/Engineer/삼성전자 [Fri, 19 Jul 2019 01:50:35 +0000 (10:50 +0900)]
[locomotiv] Session for subgraph (#4348)

* [locomotiv] Session for subgraph

This commit supports locomotiv Session to run inference on subgraph
only, by setting user defined custom outputs. Compatibility to existing
'full graph' Session is preserved.

Signed-off-by: Cheongyo Bahk <ch.bahk@samsung.com>
* Review fix: get output by node

* Review fix: efficient ctor call

* Add warning

5 years ago[res/TensorflowTests] Add Rsqrt_000 (#4359)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Fri, 19 Jul 2019 01:26:26 +0000 (10:26 +0900)]
[res/TensorflowTests] Add Rsqrt_000 (#4359)

This will add basic TensorFlow Rsqrt node test material

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years agoUse compiler for compiler modules (#4349)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Fri, 19 Jul 2019 00:46:29 +0000 (09:46 +0900)]
Use compiler for compiler modules (#4349)

* Use compiler for compiler modules

This will change to use compiler for previous contrib in CMakeLists.txt file

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

5 years agoDerive both INETensor and ICLTensor from common base IACLTensor (#5706)
Сергей Баранников/AI Tools Lab /SRR/Engineer/삼성전자 [Fri, 19 Jul 2019 00:43:53 +0000 (03:43 +0300)]
Derive both INETensor and ICLTensor from common base IACLTensor (#5706)

This is to reduce code duplication (almost all code from derived classes has been moved to base) and simplify their usages through base class.

Signed-off-by: Sergei Barannikov <s.barannikov@samsung.com>
5 years ago[shape_inference] Implemented shape inference for convolutions (#5667)
Ivan Vagin/AI Tools Lab /SRR/Engineer/삼성전자 [Fri, 19 Jul 2019 00:38:41 +0000 (03:38 +0300)]
[shape_inference] Implemented shape inference for convolutions (#5667)

* Implemented shape inference for conv 2d
* Implemented shape inference for depthwise conv 2d

Signed-off-by: Ivan Vagin <ivan.vagin@samsung.com>
5 years ago[angkor] fix readme to use compiler (#4353)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Thu, 18 Jul 2019 10:39:55 +0000 (19:39 +0900)]
[angkor] fix readme to use compiler (#4353)

This will fix readme to use compiler from old contrib

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[caffegen] fix readme (#4352)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Thu, 18 Jul 2019 10:38:30 +0000 (19:38 +0900)]
[caffegen] fix readme (#4352)

This will fix readme with folder to use compiler from previous contrib
And fix sample prototxt file path to current existing file

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[moco/tf] tidy FixShapeTransform logging (#4347)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Thu, 18 Jul 2019 10:36:10 +0000 (19:36 +0900)]
[moco/tf] tidy FixShapeTransform logging (#4347)

This will make FixShapeTransform logging to use stream out of TensorShape, FilterShape and FeatureShape.
Also some tidy to match like other functions.

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[stdex] Fix readme to use compiler (#4351)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Thu, 18 Jul 2019 10:35:35 +0000 (19:35 +0900)]
[stdex] Fix readme to use compiler (#4351)

This will fix readme folder name to compiler from previous contrib

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[docs] fix folder name to compiler (#4350)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Thu, 18 Jul 2019 10:35:25 +0000 (19:35 +0900)]
[docs] fix folder name to compiler (#4350)

This will fix folder name to compiler for previous contrib in contribution guide

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years agoFix coverage report command (#5688)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 18 Jul 2019 10:29:39 +0000 (19:29 +0900)]
Fix coverage report command (#5688)

Fix coverage report command because libs and include are moved into runtimes

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoFix inclusion guard for Subgraphs (#5696)
이상규/On-Device Lab(SR)/Principal Engineer/삼성전자 [Thu, 18 Jul 2019 09:29:01 +0000 (18:29 +0900)]
Fix inclusion guard for Subgraphs (#5696)

SubgraphContext was renamed. Thus, inclusion guard is renamed.

Signed-off-by: Sanggyu Lee <sg5.lee@samsung.com>
5 years agoRefine implementation of Subgraphs (#5691)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Thu, 18 Jul 2019 09:28:27 +0000 (18:28 +0900)]
Refine implementation of Subgraphs (#5691)

Refine implementation of Subgraphs as suggested in #5658.

- Rename `findOperation` to `getOperation`
- Introduce a common base function for `getOperation` and
  `containsOperation`

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
5 years agoIntroduce ConstantInitializer into acl neon backend (#5693)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Thu, 18 Jul 2019 08:32:59 +0000 (17:32 +0900)]
Introduce ConstantInitializer into acl neon backend (#5693)

This commit introduces ConstantInitializer into acl neon backend.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years agoIntroduce ConstantInitializer into acl cl backend (#5692)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Thu, 18 Jul 2019 08:32:44 +0000 (17:32 +0900)]
Introduce ConstantInitializer into acl cl backend (#5692)

This commit introduces ConstantInitializer into acl cl backend.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years ago[encodump] Use 'compiler' directory for documentation (#4346)
박천교/On-Device Lab(SR)/Engineer/삼성전자 [Thu, 18 Jul 2019 08:09:24 +0000 (17:09 +0900)]
[encodump] Use 'compiler' directory for documentation (#4346)

* [encodump] Use 'compiler' directory for documentation

This commit fixes encoduemp documentation to use recently changed
'compiler' directory. It also updates sample code to valid one.

Signed-off-by: Cheongyo Bahk <ch.bahk@samsung.com>
* Fix to 'path/to/encodump'

5 years agoIgnore nncc-related directories in format-check (#5686)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 18 Jul 2019 08:05:02 +0000 (17:05 +0900)]
Ignore nncc-related directories in format-check (#5686)

Ignore nncc-related directories
- clang-format style mismatch
- nncc don't have format for python yet
- Exec file permission in infra/nncc

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoIntroduce IODescription struct (#5678)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 18 Jul 2019 07:30:48 +0000 (16:30 +0900)]
Introduce IODescription struct (#5678)

Introduce IODescription, InputDesc, and OutputDesc struct to gather input and output buffer information in execution instance
Introduce IODescription field in Execution class

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years ago[shape_inference] Implemented shape inference for max pooling (#5654)
Ivan Vagin/AI Tools Lab /SRR/Engineer/삼성전자 [Thu, 18 Jul 2019 07:19:38 +0000 (10:19 +0300)]
[shape_inference] Implemented shape inference for max pooling (#5654)

* [neurun] Made ShapeInference to consume shapes instead of nodes

Made ShapeInference to consume shapes instead of nodes

Signed-off-by: Ivan Vagin <ivan.vagin@samsung.com>
* [shape_inference] Implemented shape inference for max pooling

Implemented shape inference for max pooling

Signed-off-by: Ivan Vagin <ivan.vagin@samsung.com>
5 years ago[dotdump] Show operation color (#5687)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Thu, 18 Jul 2019 07:17:03 +0000 (16:17 +0900)]
[dotdump] Show operation color (#5687)

- Show operation's color according to the assigned backend
- Simplify color scheme selection

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
5 years agoCopyright checker use 'compiler' directory (#4345)
박천교/On-Device Lab(SR)/Engineer/삼성전자 [Thu, 18 Jul 2019 07:13:52 +0000 (16:13 +0900)]
Copyright checker use 'compiler' directory (#4345)

Copyright checker now use 'compiler' directory instead of 'contrib'

Signed-off-by: Cheongyo Bahk <ch.bahk@samsung.com>
5 years agoIntroduce IConstantInitializer (#5677)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Thu, 18 Jul 2019 06:54:32 +0000 (15:54 +0900)]
Introduce IConstantInitializer (#5677)

Introduce IConstantInitializer into backend to initialize constant for each operation.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years agoRename contrib as compiler (#4342)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 18 Jul 2019 05:58:51 +0000 (14:58 +0900)]
Rename contrib as compiler (#4342)

* Rename contrib as compiler

This commit renames the top-level contrib directory as "compiler".

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
* Fix CMakeLists.txt

5 years ago[locomotiv] Node execution for DepthwiseFilterEncode (#4294)
박천교/On-Device Lab(SR)/Engineer/삼성전자 [Thu, 18 Jul 2019 05:36:33 +0000 (14:36 +0900)]
[locomotiv] Node execution for DepthwiseFilterEncode (#4294)

* [locomotiv] Node execution for DepthwiseFilterEncode

This commit supports node execution for DepthwiseFilterEncode and adds
related tests.

Signed-off-by: Cheongyo Bahk <ch.bahk@samsung.com>
* Additional docstring stating tensor mapping layout

5 years ago[moco/tf] move dump tensorshape to loghelper (#4337)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Thu, 18 Jul 2019 05:14:42 +0000 (14:14 +0900)]
[moco/tf] move dump tensorshape to loghelper (#4337)

This will relocate stream output of TensorShape to LogHelper module

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[locomotiv] Support DepthwiseConv2D (#4338)
박천교/On-Device Lab(SR)/Engineer/삼성전자 [Thu, 18 Jul 2019 05:03:16 +0000 (14:03 +0900)]
[locomotiv] Support DepthwiseConv2D (#4338)

This commit supports node execution for DepthwiseConv2D. It also
includes related test for valid padding case.

Signed-off-by: Cheongyo Bahk <ch.bahk@samsung.com>
5 years ago[testcase] Custom op test case (#4320)
윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 [Thu, 18 Jul 2019 05:01:04 +0000 (14:01 +0900)]
[testcase] Custom op test case (#4320)

This is a test case discussed in https://github.sec.samsung.net/STAR/nnfw/issues/5607.
This test case will be used to check the first integration of custom op features of nncc and nnfw.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
5 years agoIntroduce TensorFlow Squeeze_000 test (#4341)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 18 Jul 2019 05:00:20 +0000 (14:00 +0900)]
Introduce TensorFlow Squeeze_000 test (#4341)

This commit introduces Squeeze_000 test which includes one Placeholder
and one Squeeze nodes.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[locoex/customop] (#4319)
윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 [Thu, 18 Jul 2019 04:55:16 +0000 (13:55 +0900)]
[locoex/customop] (#4319)

Rewritter for changed name (`COp...`) and dir name.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
5 years agoRelocate doc directory (#4340)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 18 Jul 2019 04:51:35 +0000 (13:51 +0900)]
Relocate doc directory (#4340)

Relocate doc directory to docs/nncc
Update linked path

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years ago[locoex/customop] setter / getter for attributes (#4305)
윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 [Thu, 18 Jul 2019 04:50:57 +0000 (13:50 +0900)]
[locoex/customop] setter / getter for attributes (#4305)

* [locoex/customop] setter / getter for Tensorflow attributes

This commit adds setter / getter of Tensorflow attributes of custom op.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
* remove unused header to avoid link error

* adding a test

* used range-based for loop

* making sure int case and float case were called once

5 years ago[moco/tf] Introduce TFNodeSummaryBuilderBase (#4335)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 18 Jul 2019 04:48:14 +0000 (13:48 +0900)]
[moco/tf] Introduce TFNodeSummaryBuilderBase (#4335)

This commit introduces TFNodeSummaryBuilderBase which provides a default
pretty printer for all TF nodes.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years agoAdd Squared Difference for nnapi_delegate (#5685)
이춘석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 18 Jul 2019 04:40:49 +0000 (13:40 +0900)]
Add Squared Difference for nnapi_delegate (#5685)

- Add tflite::BuiltinOperator_SQUARED_DIFFERENCE into nnapi_delegate.cpp

Signed-off-by: Chunseok Lee <chunseok.lee@samsung.com>
5 years agoRename SubgraphContext (#5679)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Thu, 18 Jul 2019 04:40:07 +0000 (13:40 +0900)]
Rename SubgraphContext (#5679)

Rename `SubgraphContext` to `Subgraphs` so it follows the naming rule
like `Operations` and `Operands`. Variable name `subg_ctx` is also
replaced with `subgraphs`.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
5 years ago[moco/tf] FuseBinaryIntoPreceding (#4285)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Thu, 18 Jul 2019 03:02:30 +0000 (12:02 +0900)]
[moco/tf] FuseBinaryIntoPreceding (#4285)

* [moco/tf] FuseBinaryIntoPreceding

This will implement FuseBinaryIntoPreceding transformation that fuses TFAdd and TFMul into preceding nodes

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
* fix comment and check shape

* fix method name

* skip fuse if mul rank not 1

* update comment

* fuse only add rank is 1

5 years ago[moco/tf] Apply TFNodeSummaryBuilder (#4336)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Thu, 18 Jul 2019 02:58:17 +0000 (11:58 +0900)]
[moco/tf] Apply TFNodeSummaryBuilder (#4336)

This will apply TFNodeSummaryBuilder so that TF dialects are shown in graph dump

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years agoRelocate include directory (#5684)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 18 Jul 2019 01:37:08 +0000 (10:37 +0900)]
Relocate include directory (#5684)

Relocated include directory to runtimes/include

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years ago[loco] Shaped Graph Input/Output (#4325)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 18 Jul 2019 01:35:30 +0000 (10:35 +0900)]
[loco] Shaped Graph Input/Output (#4325)

This commit extends GraphInput & GraphOutput with the field and methods
related with shape.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years agoIntroduce EigenSource package for TensorFlow 1.12. (#4328)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 18 Jul 2019 01:33:00 +0000 (10:33 +0900)]
Introduce EigenSource package for TensorFlow 1.12. (#4328)

This commit introduces "EigenSource-fd6845384b86" for TensorFlow 1.12.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[loco] Introduce DepthwiseConv2D (#4322)
박천교/On-Device Lab(SR)/Engineer/삼성전자 [Thu, 18 Jul 2019 01:30:56 +0000 (10:30 +0900)]
[loco] Introduce DepthwiseConv2D (#4322)

This commit introduce DepthwiseConv2D which represents depthwise
2D convolutional operation.

Signed-off-by: Cheongyo Bahk <ch.bahk@samsung.com>
5 years ago[moco/tf] fix TFNodeSummaryBuilder TFRsqrt (#4334)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Thu, 18 Jul 2019 01:24:47 +0000 (10:24 +0900)]
[moco/tf] fix TFNodeSummaryBuilder TFRsqrt (#4334)

This will add TFRsqrt for TFNodeSummaryBuilder that was recently added

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[moco/tf] TF Formatted Graph support (#4310)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Thu, 18 Jul 2019 00:49:30 +0000 (09:49 +0900)]
[moco/tf] TF Formatted Graph support (#4310)

* [moco/tf] TF Formatted Graph support

This will introduce TF node summary builder and related classes to dump valid TF dialect names in graph dump

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

* remove not ready node

5 years ago[moco/tf] Log helper (#4323)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Thu, 18 Jul 2019 00:04:32 +0000 (09:04 +0900)]
[moco/tf] Log helper (#4323)

* [moco/tf] Log helper

This will add helper functions to dump Feature or Filter to stream

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
* use loco namespace

5 years agoChnage DotDumper implementation (#5661)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Wed, 17 Jul 2019 10:34:51 +0000 (19:34 +0900)]
Chnage DotDumper implementation (#5661)

This commit changes `DotDumper`'s dumping procedure so we can change
attributes of `Node` after creation.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
5 years ago[moco/tf] Remove Knob in Const Importer unittest (#4316)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 17 Jul 2019 09:58:02 +0000 (18:58 +0900)]
[moco/tf] Remove Knob in Const Importer unittest (#4316)

This commit removes all the use of "Knob" in Const Importer unittest.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[shape_inference] Implemened shape inference for fully connected node (#5671)
Ivan Vagin/AI Tools Lab /SRR/Engineer/삼성전자 [Wed, 17 Jul 2019 09:29:33 +0000 (12:29 +0300)]
[shape_inference] Implemened shape inference for fully connected node (#5671)

Implemened shape inference for fully connected node

Signed-off-by: Ivan Vagin <ivan.vagin@samsung.com>
5 years ago[xray-mux] Build as a shared library (#5674)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 17 Jul 2019 07:57:48 +0000 (16:57 +0900)]
[xray-mux] Build as a shared library (#5674)

It turns out that "xprobe" cannot access "pipe" implementation in "mux"
if it is built as a static library.

Let's fix this issue by building "xray-mux" as a shared library.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[moco/tf] more logs in fix shape for const (#4315)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Wed, 17 Jul 2019 07:56:29 +0000 (16:56 +0900)]
[moco/tf] more logs in fix shape for const (#4315)

* [moco/tf] more logs in fix shape for const

This will log Const node shape information in shape inference

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

* include header

5 years ago[loco] Introduce CanonicalNodeDef interface (#4302)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 17 Jul 2019 07:49:38 +0000 (16:49 +0900)]
[loco] Introduce CanonicalNodeDef interface (#4302)

This commit introduces CanonicalNodeDef interfaces which takes multiple
Mixins all at once.

Compared with existing CanonicalNodeImpl, CanonicalNodeDef emits uniform
declarations that begin with "CanonicalNodeDef<OPCODE, ...>", which makes
it easy to read the code.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years agoUse execution instance on frontend (#5664)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 17 Jul 2019 06:48:34 +0000 (15:48 +0900)]
Use execution instance on frontend (#5664)

Use execution instance on nnapi, tflite loader, nnfw api

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years ago[neurun] Made concat axis int32_t type (#5670)
Ivan Vagin/AI Tools Lab /SRR/Engineer/삼성전자 [Wed, 17 Jul 2019 06:08:56 +0000 (09:08 +0300)]
[neurun] Made concat axis int32_t type (#5670)

Made concat axis int32_t type instead of OperandIndex

Signed-off-by: Ivan Vagin <ivan.vagin@samsung.com>
5 years agoFix pointless string warning in operation.py (#5672)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 17 Jul 2019 05:39:26 +0000 (14:39 +0900)]
Fix pointless string warning in operation.py (#5672)

Pylint warning: pointless-string-statement
Change to comment

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoRefactor SubgraphContext (#5658)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Wed, 17 Jul 2019 05:13:52 +0000 (14:13 +0900)]
Refactor SubgraphContext (#5658)

- `SubgraphContext` inherits `ObjectManager`
- Rename method `append` to `emplace`
- Rename method `hasNode` to `containsOperation`
- Rename method `findNode` to `findOperation`

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
5 years ago[moco/tf] Introduce TFRsqrt IR (#4317)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Wed, 17 Jul 2019 04:58:55 +0000 (13:58 +0900)]
[moco/tf] Introduce TFRsqrt IR (#4317)

This will introduce TFRsqrt IR and related codes

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years agoAdd gtest to prepare multiple execution instance run (#5568)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 17 Jul 2019 04:56:29 +0000 (13:56 +0900)]
Add gtest to prepare multiple execution instance run (#5568)

* Test to prepare multiple execution instance run

Introduce gtest to prepare multiple execution instance using one executor
Move interpreter gtest into exec to match with core directory structure

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
* Use expected value array

5 years ago[moco/tf] Remove Knob in Conv2D importer test (#4303)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 17 Jul 2019 04:06:48 +0000 (13:06 +0900)]
[moco/tf] Remove Knob in Conv2D importer test (#4303)

This commit removes Knob in Conv2D importer test. Each unittest run
now tests both loco.TF and loco.Canonical importers at once.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[exo/tflite] Use Visitor in Operation Exporter (#4300)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 17 Jul 2019 03:49:55 +0000 (12:49 +0900)]
[exo/tflite] Use Visitor in Operation Exporter (#4300)

This commit revises the implementation of Operation Exporter using loco
visitor interface.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[exo/tflite] Visitor-based Type Inference (#4296)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 17 Jul 2019 03:48:46 +0000 (12:48 +0900)]
[exo/tflite] Visitor-based Type Inference (#4296)

* [exo/tflite] Visitor-based Type Inference

This commit revises the implemenation of TypeInference module using loco
visitor interface.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
* Fix subobject-linkage warning

* Explain why there is type context update

5 years ago[exo/tflite] Visitor-based Shape Inference (#4299)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 17 Jul 2019 03:11:00 +0000 (12:11 +0900)]
[exo/tflite] Visitor-based Shape Inference (#4299)

* [exo/tflite] Visitor-based Shape Inference

This commit revises the implementation of ShapeInference using loco
visitor interface.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
* Fix subobject-linkage warning

5 years agoRelocate contrib and libs (#5663)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 17 Jul 2019 02:37:01 +0000 (11:37 +0900)]
Relocate contrib and libs  (#5663)

* Relocate contrib and libs

Move contrib and libs into runtimes
Update CMakeLists.txt
Fix typo in CMakeLists.txt

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
* Update .gitignore and remove generated files

5 years ago[moco/tf] ResolveFBN for only active nodes (#4311)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Wed, 17 Jul 2019 01:45:32 +0000 (10:45 +0900)]
[moco/tf] ResolveFBN for only active nodes (#4311)

This will change ResolveFusedBatchNorm transformation to iterate only active nodes

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[moco/tf] Canonicalize Const (#4312)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Wed, 17 Jul 2019 01:44:52 +0000 (10:44 +0900)]
[moco/tf] Canonicalize Const (#4312)

This will add canonicalization for Const node

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years agoRelocate CMake extensions (#4308)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 17 Jul 2019 01:36:37 +0000 (10:36 +0900)]
Relocate CMake extensions (#4308)

This commit relocates top-level cmake directory into infra/nncc, and
updates relevant top-level CMakeLists.txt

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years agoRelocate nncc commands (#4307)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 17 Jul 2019 01:35:25 +0000 (10:35 +0900)]
Relocate nncc commands (#4307)

All the nncc commands are now in infra/nncc/command.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years agoAdd comments for notifying Observers (#5668)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Wed, 17 Jul 2019 01:33:23 +0000 (10:33 +0900)]
Add comments for notifying Observers (#5668)

Using only 0th operation of the subgraph is a workaround.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
5 years ago[model parser] Fix operation.py (#5626)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 17 Jul 2019 01:07:07 +0000 (10:07 +0900)]
[model parser] Fix operation.py (#5626)

Change to instance method in _OperationComputeMethod class
Not working now because static method don't have "__name__" field
Change operation comment

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoRelocate nncc configurations (#4248)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 17 Jul 2019 00:00:30 +0000 (09:00 +0900)]
Relocate nncc configurations (#4248)

This commit introduces "infra/nncc/config" directory, and move all the
.configuration files into this directory.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[moco-tf] Setting basic data of constgen in test (#4304)
윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 [Wed, 17 Jul 2019 00:00:14 +0000 (09:00 +0900)]
[moco-tf] Setting basic data of constgen in test (#4304)

After creating `constgen` in `optimizer.test.cpp`, `dtype` and `size` are now set to proper values.
Some transforms (which is being written) needs dtype and values and this commit enables these transforms to run OK.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
5 years agoRemove accidently commited file (#5659)
Сергей Баранников/AI Tools Lab /SRR/Engineer/삼성전자 [Tue, 16 Jul 2019 11:35:46 +0000 (14:35 +0300)]
Remove accidently commited file (#5659)

Remove `format.patch` accidently commited recently.

Signed-off-by: Sergei Barannikov <s.barannikov@samsung.com>
5 years agoMove command and dockerfile (#5662)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Tue, 16 Jul 2019 11:23:24 +0000 (20:23 +0900)]
Move command and dockerfile (#5662)

Move command to infra/nnfw/command
Move dockerfile to infra/nnfw/docker

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoIntroduce Execution class (#5655)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Tue, 16 Jul 2019 11:20:05 +0000 (20:20 +0900)]
Introduce Execution class (#5655)

Introduce Execution class to support execution instance
Execution object will gather input/output info and prepare executor's run

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years ago[neurun] Use noWaitingJobs in ParallelExecutor and fix wait in its executeImpl (...
Дилшоджон Умронхонович Пошшоев/AI Tools Lab /SRR/Engineer/삼성전자 [Tue, 16 Jul 2019 10:41:55 +0000 (19:41 +0900)]
[neurun] Use noWaitingJobs in ParallelExecutor and fix wait in its executeImpl (#5657)

Waiting just for `!_ready_jobs.empty()` is wrong, because when wait returns false
and unlocks the lock, some other thread may finish the waiting jobs and
`_ready_jobs` may never been inserted

Signed-off-by: Dilshodzhon Poshshoev <d.poshshoev@samsung.com>
5 years ago[res] TF_SMALL_NET_0010 (#4301)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Tue, 16 Jul 2019 10:34:23 +0000 (19:34 +0900)]
[res] TF_SMALL_NET_0010 (#4301)

This will add TF_SMALL_NET_0010 test that has "BiasAdd" + "Add" network

This is to test fusion of Add into BiasAdd

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[neurun] Schedule ops in holes/gaps of a backends (#5557)
Дилшоджон Умронхонович Пошшоев/AI Tools Lab /SRR/Engineer/삼성전자 [Tue, 16 Jul 2019 10:23:04 +0000 (19:23 +0900)]
[neurun] Schedule ops in holes/gaps of a backends (#5557)

So far scheduler assumed a backend is occupied totally and there is no
gaps/holes between two tasks. This change adds this support.
Also, this change adds the concideration of occupation of cpu bywq! permutation

Signed-off-by: Poshshoev Dilshodzhon <d.poshshoev@samsung.com>
5 years ago[neurun] Fix linear interpolation in ExecTime::getOperationExecTime (#5614)
Дилшоджон Умронхонович Пошшоев/AI Tools Lab /SRR/Engineer/삼성전자 [Tue, 16 Jul 2019 10:13:44 +0000 (19:13 +0900)]
[neurun] Fix linear interpolation in ExecTime::getOperationExecTime (#5614)

In some cases ops with smaller inputs is executed slower than the one
with larger inputs, more likely because of a backend's load difference.
In such cases result of lin-interpolation is negative, which is wrong

Signed-off-by: Dilshodzhon Poshshoev <d.poshshoev@samsung.com>
5 years agoMove cmake directory (#5648)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Tue, 16 Jul 2019 09:21:47 +0000 (18:21 +0900)]
Move cmake directory (#5648)

* Move cmake directory

Move cmake script directory to infra/nnfw/cmake
Move root CMakeLists.txt to infra/nnfw

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
* Define NNFW_SOURCE_ROOT and use

5 years agoEnable acl layout test again (#5650)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Tue, 16 Jul 2019 08:10:06 +0000 (17:10 +0900)]
Enable acl layout test again (#5650)

* Enable acl layout test again

This commit enables acl layout test again.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
* Apply layout for padding data of PadLayer

This commit applies layout for padding data of PadLayer.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years agoUpdate install-githooks command (#5647)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Tue, 16 Jul 2019 08:09:53 +0000 (17:09 +0900)]
Update install-githooks command (#5647)

- Use NNFW_PROJECT_PATH instead of relative path
- Check pre-push hook existance and update with backup or remove

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years ago[locomotiv] Prevent input/output index overflow (#4286)
박천교/On-Device Lab(SR)/Engineer/삼성전자 [Tue, 16 Jul 2019 07:24:31 +0000 (16:24 +0900)]
[locomotiv] Prevent input/output index overflow (#4286)

This commit make assertion on input and output index to be less than
their size.

Signed-off-by: Cheongyo Bahk <ch.bahk@samsung.com>
5 years ago[res/test] TF_SMALL_NET_0009 (#4287)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Tue, 16 Jul 2019 07:23:50 +0000 (16:23 +0900)]
[res/test] TF_SMALL_NET_0009 (#4287)

This network is Conv2D + BiasAdd + Add to check fusion of BiasAdd + Add to BiasAdd

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[locoex/customop] Adding COpCall node (#4290)
윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 [Tue, 16 Jul 2019 07:06:07 +0000 (16:06 +0900)]
[locoex/customop] Adding COpCall node (#4290)

COpCall node (previously merged as Call node) is added with some methods.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
5 years ago[moco/tf] Test BiasAdd Importer without Knob (#4265)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Tue, 16 Jul 2019 06:24:30 +0000 (15:24 +0900)]
[moco/tf] Test BiasAdd Importer without Knob (#4265)

This commit removes Knob from BiasAdd test implementation.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>