platform/core/ml/nnfw.git
5 years agoIntroduce Subgraph as Node (#4373)
김용섭/On-Device Lab(SR)/Engineer/삼성전자 [Thu, 7 Feb 2019 07:46:00 +0000 (16:46 +0900)]
Introduce Subgraph as Node (#4373)

* Introduce Subgraph as Node

Introduce Subgraph as Node. This Subgraph would be handled as extrordinay
Node so that running such as group could be possible.

Signed-off-by: Yongseop Kim <yons.kim@samsung.com>
* Remove unnecessary header

* Change addOperation name and index of Element of Subgraph

5 years agoSet default value of HOST_OS (#4384)
이성재/On-Device Lab(SR)/Principal Engineer/삼성전자 [Thu, 7 Feb 2019 06:04:20 +0000 (15:04 +0900)]
Set default value of HOST_OS (#4384)

- Set default value of HOST_OS in platform identification script.
- For using cmake directly without make.

Signed-off-by: Sung-Jae Lee <sj925.lee@samsung.com>
5 years agoAdd CUSTOM(Abs) op to nnapi_delegate (#4379)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Thu, 7 Feb 2019 05:46:18 +0000 (14:46 +0900)]
Add CUSTOM(Abs) op to nnapi_delegate (#4379)

This commit adds CUSTOM(Abs) op to nnapi_delegate.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years agoArrange GTests in tizen skip lists in order (#4093)
Prasanna R/SNAP /SRI-Bangalore/Engineer/삼성전자 [Fri, 1 Feb 2019 06:14:35 +0000 (11:44 +0530)]
Arrange GTests in tizen skip lists in order (#4093)

This patch arranges the same for better organizing and tracking

Signed-off-by: prasannar <prasanna.r@samsung.com>
5 years ago[neurun] Use 'UNUSED_RELEASE' macro for unused variable (#4362)
김수진/On-Device Lab(SR)/Engineer/삼성전자 [Fri, 1 Feb 2019 04:13:44 +0000 (13:13 +0900)]
[neurun] Use 'UNUSED_RELEASE' macro for unused variable (#4362)

* [neurun] Move and use 'NO_USE' macro

This commit moves and use `NO_USE` macro instead of the casting with `(void)`.

Signed-off-by: sjsujinkim <sjsujin.kim@samsung.com>
* change macro name

5 years agoBlock cpu kernel build on gbs build (#4355)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 1 Feb 2019 01:56:32 +0000 (10:56 +0900)]
Block cpu kernel build on gbs build (#4355)

Block cpu kernel build on gbs build because of build fail
Remove this if ready

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoEnable DepthwiseConv2D in neurun (#4319)
이춘석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 31 Jan 2019 22:22:45 +0000 (07:22 +0900)]
Enable DepthwiseConv2D in neurun (#4319)

* Enable DepthwiseConv2D in neurun

- Enable implicit-padding depthwise conv2d in neurun

Signed-off-by: Chunseok Lee <chunseok.lee@samsung.com>
* enable explicit padding

- enable explicit padding

* Fix incorrect comment

* Fix incorrect year on License Statement

* fix format by checker

5 years ago[neurun] Add more comment on cpu::TensorBuilder (#4365)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Thu, 31 Jan 2019 04:16:38 +0000 (13:16 +0900)]
[neurun] Add more comment on cpu::TensorBuilder (#4365)

Add supplementary explation for the reason why `allocate` does nothing.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
5 years agoFix logging runtime bug (#4368)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 31 Jan 2019 03:40:12 +0000 (12:40 +0900)]
Fix logging runtime bug (#4368)

Fix logging runtime bug: print address after console logging

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoRemove unnecessary kernels from ARMComputeEX (#4325)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Thu, 31 Jan 2019 01:36:48 +0000 (10:36 +0900)]
Remove unnecessary kernels from ARMComputeEX (#4325)

This commit removes unnecessary kernels from ARMComputeEX

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years agoSupport NHWC to DepthToSpaceKernel (#4363)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Thu, 31 Jan 2019 00:51:54 +0000 (09:51 +0900)]
Support NHWC to DepthToSpaceKernel (#4363)

* Support NHWC to DepthToSpaceKernel

This commit supports NHWC to DepthToSpaceKernel.

* Change a preprocessor argument of kernel for DepthToSpace

This commit changes a preprocessor argument of kernel for DepthToSpace to prevent misunderstandings.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years ago[neurun] Introduce operand::IndexMap (#4364)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Thu, 31 Jan 2019 00:49:57 +0000 (09:49 +0900)]
[neurun] Introduce operand::IndexMap (#4364)

* [neurun] Introduce operand::IndexMap

Introduce `operand::IndexMap` which is an alias of `unordered_map` with
key as `operand::Index`.

* Update ifdef guard format

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
5 years ago[neurun] Remove asserts for SoftMax validation to support tensors (#4361)
김수진/On-Device Lab(SR)/Engineer/삼성전자 [Wed, 30 Jan 2019 08:05:54 +0000 (17:05 +0900)]
[neurun] Remove asserts for SoftMax validation to support tensors (#4361)

Removed asserts for `SoftMax` in `PACL` to support tensors.
These asserts copied from `PACL` before changing.

This commit removes asserts for `SoftMax validation` to support tensors on `neurun` too.
And removes test skip list related `SoftMax`.

Signed-off-by: sjsujinkim <sjsujin.kim@samsung.com>
5 years ago[neurun] Support explicit padding and activation for MaxPool2D (#4327)
김수진/On-Device Lab(SR)/Engineer/삼성전자 [Wed, 30 Jan 2019 08:04:49 +0000 (17:04 +0900)]
[neurun] Support explicit padding and activation for MaxPool2D (#4327)

We can pass all of generated `MaxPool2D` tests.

This commit supports explicit padding and activation for `MaxPool2D` to pass related tests.

Signed-off-by: sjsujinkim <sjsujin.kim@samsung.com>
5 years ago[neurun] Fix reshape bug (Apply #4254) (#4333)
김수진/On-Device Lab(SR)/Engineer/삼성전자 [Wed, 30 Jan 2019 05:31:35 +0000 (14:31 +0900)]
[neurun] Fix reshape bug (Apply #4254) (#4333)

* [neurun] Fix reshape bug (Apply #4254)

Related : #2147, #4254

In #4254, It's set `apply_dim_correction` of `input`/`output` shapes to `false in `PACL`.
This commit applies #4254 to `neurun` and remove related skip test list.

Signed-off-by: sjsujinkim <sjsujin.kim@samsung.com>
* Revise CLTensor constructor

5 years ago[neurun] Remove test skip list that can be passed (#4359)
김수진/On-Device Lab(SR)/Engineer/삼성전자 [Wed, 30 Jan 2019 00:51:03 +0000 (09:51 +0900)]
[neurun] Remove test skip list that can be passed (#4359)

This commit removes tests skip list that can be passed after some PR are merged.

Signed-off-by: sjsujinkim <sjsujin.kim@samsung.com>
5 years agoBuild neurun only should be possible (#4357)
이상규/On-Device Lab(SR)/Principal Engineer/삼성전자 [Wed, 30 Jan 2019 00:50:05 +0000 (09:50 +0900)]
Build neurun only should be possible (#4357)

Building `nnfw` for ubuntu with `-DBUILD_NEURUN=1 -DBUILD_PURE_ARM_COMPUTE=0`
builds both of neurun and pacl. It should build neurun only as user's input parameters.

Signed-off-by: Sanggyu Lee <sg5.lee@samsung.com>
5 years agoRemove non-const getter in Plan (#4351)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 30 Jan 2019 00:48:27 +0000 (09:48 +0900)]
Remove non-const getter in Plan (#4351)

Remove non-const getter in Plan
Use operand context and operation sequence directly for each compile phase
Generate plan after compile finished

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoRename GENERATE_FILES to GENERATE_NNAPI_TESTS (#4356)
이상규/On-Device Lab(SR)/Principal Engineer/삼성전자 [Tue, 29 Jan 2019 09:37:18 +0000 (18:37 +0900)]
Rename GENERATE_FILES to GENERATE_NNAPI_TESTS (#4356)

To skip generating nnapi tests, `GENERATE_FILES=0` has been used.
This patch changes the flag's name to more specific one since
`GENERATE_FILES` are too general.

Signed-off-by: Sanggyu Lee <sg5.lee@samsung.com>
5 years ago[neurun] Support Quant8 for Concat (#4352)
김수진/On-Device Lab(SR)/Engineer/삼성전자 [Tue, 29 Jan 2019 09:31:32 +0000 (18:31 +0900)]
[neurun] Support Quant8 for Concat (#4352)

This commit supports `quant8` data type for `Concat` on `acl_cl` backend and remove skip related test list.

Signed-off-by: sjsujinkim <sjsujin.kim@samsung.com>
5 years ago[neurun] Support other types for ConstantInitializer (#4349)
김수진/On-Device Lab(SR)/Engineer/삼성전자 [Tue, 29 Jan 2019 09:30:10 +0000 (18:30 +0900)]
[neurun] Support other types for ConstantInitializer (#4349)

Some tests such as `GeneratedTest.conv_quant8` have failed cause of not supporting other types for `ConstantInitializer`.

This commit supports other types for `ConstantInitializer` and remove skip list `conv_quant8xxx`.

Signed-off-by: sjsujinkim <sjsujin.kim@samsung.com>
5 years agoSupport multiple indices upto 4D output ranks in Gather (#4339)
윤지영/On-Device Lab(SR)/Engineer/삼성전자 [Tue, 29 Jan 2019 07:19:04 +0000 (16:19 +0900)]
Support multiple indices upto 4D output ranks in Gather (#4339)

This commit supports below test cases:
2D input + 2D indices => 3D output
2D input + 3D indices => 4D output
3D input + 2D indices => 4D output

Signed-off-by: Jiyoung Yun <jy910.yun@samsung.com>
5 years agoUse shared pointer for operands and opertions in Plan (#4350)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Tue, 29 Jan 2019 03:27:42 +0000 (12:27 +0900)]
Use shared pointer for operands and opertions in Plan (#4350)

Use shared pointer for operands and opertions in Plan
Define new contructor to set operands and operations
Remove setCompile method and friend class

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoRemove plan getter in Compiler (#4347)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Mon, 28 Jan 2019 23:52:30 +0000 (08:52 +0900)]
Remove plan getter in Compiler (#4347)

Remove plan getter in Compiler
Prepare remove non-const model getter in Plan
Fix plain initialize in Compiler to return nullptr when release() is called before compile()

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoupdate `.gitignore` (#4337)
이성재/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 28 Jan 2019 23:45:03 +0000 (08:45 +0900)]
update `.gitignore` (#4337)

- update `.gitignore` to support `gnu-global` tool

Signed-off-by: Sung-Jae Lee <sj925.lee@samsung.com>
5 years ago[PACL] Support ABS_EX op (#4334)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Mon, 28 Jan 2019 10:01:06 +0000 (19:01 +0900)]
[PACL] Support ABS_EX op (#4334)

This commit supports ABS_EX operation for PACL.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years ago[neurun] Support explicit padding and activation for Conv2D (#4330)
김수진/On-Device Lab(SR)/Engineer/삼성전자 [Mon, 28 Jan 2019 07:56:02 +0000 (16:56 +0900)]
[neurun] Support explicit padding and activation for Conv2D (#4330)

we can pass all of generated `Conv2D` tests(except `quant8` tests).

This commit supports explicit padding and activation for `Conv2D` to pass related tests.

Signed-off-by: sjsujinkim <sjsujin.kim@samsung.com>
5 years agoRemove NOT_COMPILED state in compiler (#4332)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Mon, 28 Jan 2019 07:55:16 +0000 (16:55 +0900)]
Remove NOT_COMPILED state in compiler (#4332)

* Remove NOT_COMPILED state in compiler

Remove NOT_COMPILED in compiler's state
Make isCompiled flag to check compile result

* Rename to set compiled

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoReplace CLNormalizationLayerEX with CLNormalizationLayer (#4324)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Mon, 28 Jan 2019 07:52:28 +0000 (16:52 +0900)]
Replace CLNormalizationLayerEX with CLNormalizationLayer (#4324)

This commit replaces CLNormalizationLayerEx of ARMComputeEx with CLNormalizationLayer of ARMCompute.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years agofix bug (#4331)
이성재/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 28 Jan 2019 06:49:45 +0000 (15:49 +0900)]
fix bug (#4331)

- fix bug in case statement.
- change confusing(or maybe buggy) code to clear one.

Signed-off-by: Sung-Jae Lee <sj925.lee@samsung.com>
5 years agoSupport Gather in all input ranks (#4312)
윤지영/On-Device Lab(SR)/Engineer/삼성전자 [Mon, 28 Jan 2019 05:14:15 +0000 (14:14 +0900)]
Support Gather in all input ranks (#4312)

This commit supports Gather operation in all input ranks.
But it only supports 1D rank in indices.

Signed-off-by: Jiyoung Yun <jy910.yun@samsung.com>
5 years ago[neurun] Remove unnecessary header of operand (#4308)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Mon, 28 Jan 2019 01:10:52 +0000 (10:10 +0900)]
[neurun] Remove unnecessary header of operand (#4308)

Remove unnecessary header of `operand::Object` and added header
inclusion from the files that are depend on `operand::LowerInfo`.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
5 years agoReplace CLStridedSliceEx with CLStridedSlice (#4315)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Mon, 28 Jan 2019 01:05:32 +0000 (10:05 +0900)]
Replace CLStridedSliceEx with CLStridedSlice (#4315)

* Replace CLStridedSliceEx with CLStridedSlice

This commit replaces CLStridedSliceEx of ARMComputeEx with CLStridedSlice of ARMCompute.

* Fix wrong initialization of std::vector

This commit fixes initialization of std::vector when compiling StridedSlice operation.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years ago[neurun] Fix `TensorInfo::total_size` (#4321)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Mon, 28 Jan 2019 00:40:58 +0000 (09:40 +0900)]
[neurun] Fix `TensorInfo::total_size` (#4321)

Fix calculation of total size for a tensor to use actual element size.
Before it assumed the element size of 4.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
5 years agoMove compute from frontend to internal (#4310)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Mon, 28 Jan 2019 00:40:21 +0000 (09:40 +0900)]
Move compute from frontend to internal (#4310)

Move compute phase from frontend to Executor class
Remove not used methods in ANeuralNetworksExecution and Executor

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years ago[neurun] Fix to set wrong length for PermuteSource/Sink (#4300)
김수진/On-Device Lab(SR)/Engineer/삼성전자 [Mon, 28 Jan 2019 00:39:43 +0000 (09:39 +0900)]
[neurun] Fix to set wrong length for PermuteSource/Sink (#4300)

* [neurun] Fix setting wrong length for PermuteSource/Sink

Rleated : #2147

I've tried to run the generated tests `GeneratedTests.avg_pool_quant8_1~4`,since merged all related PRs.
But the tests are failed with wrong matching.

I figured out the reason of problem is from setting wrong length for `PermuteSource/Sink` by debugging.

This commit fixes setting wrong length for `PermuteSource/Sink` and removes skip lists for that tests.

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

5 years ago[neurun] Change reshape kernel from `CLReshapeLayer` to `GenericReshapeLayer` (#4314)
김수진/On-Device Lab(SR)/Engineer/삼성전자 [Mon, 28 Jan 2019 00:39:19 +0000 (09:39 +0900)]
[neurun] Change reshape kernel from `CLReshapeLayer` to `GenericReshapeLayer` (#4314)

Related : #2147

In #1353,

`GenericReshapeLayer` was introduced to remove height/width restriction, and `PACL` uses that now.
This commit changes reshape kernel from `CLReshapeLayer` to `GenericReshapeLayer`.

Signed-off-by: sjsujinkim <sjsujin.kim@samsung.com>
5 years agoAvoid redefinition of macro functions (#4320)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Fri, 25 Jan 2019 06:46:58 +0000 (15:46 +0900)]
Avoid redefinition of macro functions (#4320)

Avoid redefinition of CAST_CL and CAST_NE that generates warning.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
5 years agoFix concat for not rank 4 (#4317)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 25 Jan 2019 06:24:33 +0000 (15:24 +0900)]
Fix concat for not rank 4 (#4317)

Now concat operation rank is not 4 can run using cpu implementation

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years ago[neurun] Move Model class to `model` (#4303)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Fri, 25 Jan 2019 00:40:39 +0000 (09:40 +0900)]
[neurun] Move Model class to `model` (#4303)

Move Model class to `model` from `graph` since `Model` represents pure
neural network primitive elements.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
5 years agoUpdate the description of Gather (#4277)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Thu, 24 Jan 2019 03:33:56 +0000 (12:33 +0900)]
Update the description of Gather (#4277)

This commit updates the description of the types that CLGather and CLGatherKerenl support.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years agoIntroduce BUILD_UBEN option (#4309)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 24 Jan 2019 00:00:56 +0000 (09:00 +0900)]
Introduce BUILD_UBEN option (#4309)

* Introduce BUILD_UBEN option

This commit introduces BUILD_UBEN option to fix Tizen build break.

* Set default value

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[PACL] Replace CLReduceOperation with CLReduceMean. (#4304)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Wed, 23 Jan 2019 23:44:24 +0000 (08:44 +0900)]
[PACL] Replace CLReduceOperation with CLReduceMean. (#4304)

This commit replaces CLReduceOperation with CLReduceMean in case of mean operation.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years ago[PACL] Replace CLLogicalNot with CLBitwiseNot (#4299)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Wed, 23 Jan 2019 23:44:12 +0000 (08:44 +0900)]
[PACL] Replace CLLogicalNot with CLBitwiseNot (#4299)

This commit replaces CLLogicalNot of ARMComputeEx with CLBitwiseNot of ARMCompute

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years agoMove input and output setting into Executor class (#4293)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 23 Jan 2019 23:39:33 +0000 (08:39 +0900)]
Move input and output setting into Executor class (#4293)

* Move input and output setting into Executor class

Move source (input setting) and sink (output setting) into Executor class

* Fix source list name to same as directory name

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years ago[neurun] Extract sizeOfDataType as a function (#4307)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Wed, 23 Jan 2019 23:39:13 +0000 (08:39 +0900)]
[neurun] Extract sizeOfDataType as a function (#4307)

Extract sizeOfDataType as a function which were implemented in class
`Object`.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
5 years agoIntroduce uben (#4301)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 23 Jan 2019 10:24:14 +0000 (19:24 +0900)]
Introduce uben (#4301)

* Introduce uben

This commit introduces uben (Micro BENchmark) suite based on nonius
benchmark framework.

Initial version includes convolution 3x3 (with unit stride) benchmark
over ARM Compute CL Direct/GEMM/Winograd kernels.

* Fix a bug in ker_info method

* Use CLWinogradConvolutionLayer correctly

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[PACL] Replace CLPixelWiseDivision with CLArithmeticDivision (#4302)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Wed, 23 Jan 2019 07:35:21 +0000 (16:35 +0900)]
[PACL] Replace CLPixelWiseDivision with CLArithmeticDivision (#4302)

This commit replaces CLPixelWiseDivision of ARMComputeEx with CLArithmeticDivision of ARMCompute.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years ago[neurun] Support activation for AvgPool2D (#4297)
김수진/On-Device Lab(SR)/Engineer/삼성전자 [Wed, 23 Jan 2019 05:04:05 +0000 (14:04 +0900)]
[neurun] Support activation for AvgPool2D (#4297)

Related : #2147

This commit supports unimplemented activation for AvgPool2D.

Signed-off-by: sjsujinkim <sjsujin.kim@samsung.com>
5 years ago[PACL] Add the declaration of asTensorInfo (#4298)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Wed, 23 Jan 2019 04:59:15 +0000 (13:59 +0900)]
[PACL] Add the declaration of asTensorInfo (#4298)

This commit adds the declaration of asTensorInfo.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years ago[neurun] Support explicit padding for AvgPool2D (#4278)
김수진/On-Device Lab(SR)/Engineer/삼성전자 [Tue, 22 Jan 2019 09:59:13 +0000 (18:59 +0900)]
[neurun] Support explicit padding for AvgPool2D (#4278)

* [neurun] Support explicit padding for AvgPool2D

Related : #2147

This commit supports explicit padding for `AvgPool2D`.

- Merge `Implicit` and `Explicit` `Node` compared to `PACL`
- Remove related test skip list

Signed-off-by: sjsujinkim <sjsujin.kim@samsung.com>
* move explicit_padding to param, add TODO comment

5 years agoMove source and sink in wrapper (#4290)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Tue, 22 Jan 2019 06:28:22 +0000 (15:28 +0900)]
Move source and sink in wrapper (#4290)

* Move source and sink in wrapper

Move source and sink setting and call in wrapper into Executor class

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
* Remove header include

5 years ago[PACL] Replace CLBatchToSpaceND with CLBatchToSpaceLayer (#4283)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Tue, 22 Jan 2019 04:14:12 +0000 (13:14 +0900)]
[PACL] Replace CLBatchToSpaceND with CLBatchToSpaceLayer (#4283)

This commit replaces CLBatchToSpaceND of ARMComputeEx with CLBatchToSpaceLayer of ARMCompute

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years agoProvide Q8 sup and comments correction for Arg operation (#4268)
Shubham Gupta/SNAP /SRI-Bangalore/Engineer/삼성전자 [Tue, 22 Jan 2019 03:50:40 +0000 (09:20 +0530)]
Provide Q8 sup and comments correction for Arg operation (#4268)

1. Provide Q8 sup
2. comments correction

Signed-off-by: shubham <shub98.gupta@samsung.com>
5 years ago[neurun] Support Relu1, Relu6 activation (#4287)
김수진/On-Device Lab(SR)/Engineer/삼성전자 [Tue, 22 Jan 2019 02:37:02 +0000 (11:37 +0900)]
[neurun] Support Relu1, Relu6 activation (#4287)

I've tried to pass `GeneratedTests.avg_pool_float_4`
However I met the missmatching in result.
I figured out it is the problem of `activation` Relu6.

This commit supports `Relu1` and `Relu6` activation in `ActivationBuilder`.

Signed-off-by: sjsujinkim <sjsujin.kim@samsung.com>
5 years ago[neurun] Move kernels into backends (#4126)
Дилшоджон Умронхонович Пошшоев/AI Tools Lab /SRR/Engineer/삼성전자 [Tue, 22 Jan 2019 02:21:13 +0000 (05:21 +0300)]
[neurun] Move kernels into backends (#4126)

* [neurun] Move kernels into backends

Kernels are part of backends, so they should be in subdir of their own
backends

* [neurun] Change namespaces of kernels to include backends

Exchange namespaces of backends and kernels in kernels

* [neurun] Add "backend" namespace to kernels

Add "backend" namespace to kernels

Signed-off-by: Poshshoev Dilshodzhon <d.poshshoev@samsung.com>
5 years ago[PACL] Add an overloading function of asTensorInfo (#4284)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Tue, 22 Jan 2019 01:57:17 +0000 (10:57 +0900)]
[PACL] Add an overloading function of asTensorInfo (#4284)

This commit addes an overloading function of asTensorInfo that can be set arm_compute::DataType optionally.

 Some kernels of ARMCompute require data type that does not exist in nnapi spec. However, the PACL currently
sets the data type of ARMCompute to a mapped data type of nnapi. There is a need for a function to optionally set
the data type of ARMCompute.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years ago[neurun] Move State member to Compiler from Plan (#4286)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Tue, 22 Jan 2019 01:46:07 +0000 (10:46 +0900)]
[neurun] Move State member to Compiler from Plan (#4286)

Move State member variable to Compiler from Plan.
Plan is just part of compilation so it would be more proper.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
5 years agoIntroduce executor class (#4281)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Tue, 22 Jan 2019 01:38:08 +0000 (10:38 +0900)]
Introduce executor class (#4281)

Introduce executor class to control execution phase on runtime internal

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoUpdate frontend execution API (#4282)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Tue, 22 Jan 2019 01:37:21 +0000 (10:37 +0900)]
Update frontend execution API (#4282)

- Free execution object
- Return bad state when setInput & setOutput using memory object (NYI)

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoRemove Passing gtests from skiplist (#4269)
Shubham Gupta/SNAP /SRI-Bangalore/Engineer/삼성전자 [Mon, 21 Jan 2019 10:06:30 +0000 (15:36 +0530)]
Remove Passing gtests from skiplist (#4269)

After integration of ACL v18.11, some gtests are
passing which were earlier failing.
This patch will remove all passing gtests from
skiplist.

Signed-off-by: shubham <shub98.gupta@samsung.com>
5 years agoChanges in CLPermuteExKernel.cpp (#4273)
Shubham Gupta/SNAP /SRI-Bangalore/Engineer/삼성전자 [Mon, 21 Jan 2019 10:06:17 +0000 (15:36 +0530)]
Changes in CLPermuteExKernel.cpp (#4273)

1. move calc shape func of validation in inside of
if condition since it is getting used only when that if
condition is true.
2. remove tensorshape local func since misc/shapecalc/utils has
same function which can be directly used.

Signed-off-by: shubham <shub98.gupta@samsung.com>
5 years agoUpdate validation check on frontend execution (#4267)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Mon, 21 Jan 2019 08:16:28 +0000 (17:16 +0900)]
Update validation check on frontend execution (#4267)

* Update validation check on frontend execution

Update validation check on NNAPI frontend execution's input & output setting
- Check length
- Check shape
- Print error message

Abstract to access model
- Operand index of input & output
- Type & shape compare

* Fix bug

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoUpdate broken link in `howoto` document. (#4280)
이성재/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 21 Jan 2019 07:03:39 +0000 (16:03 +0900)]
Update broken link in `howoto` document. (#4280)

- Updated link to Dockerfile which broken by directory restructuring.

Signed-off-by: Sung-Jae Lee <sj925.lee@samsung.com>
5 years agoRemove CLArithmeticSubtractionEx from ArmComputeEx (#4275)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Mon, 21 Jan 2019 04:40:31 +0000 (13:40 +0900)]
Remove CLArithmeticSubtractionEx from ArmComputeEx (#4275)

This commit removes CLArithmeticSubtractionEx from ArmComputeEx.
  - remove CLArithmeticSubtractionEx
  - replace CLArithmeticSubtractionEx with CLArithmeticSubtraction since CLArithmeticSubtraction supports the broadcast.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years agoUpdate broken links to model repository in `howto.md`. (#4274)
이성재/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 21 Jan 2019 03:49:32 +0000 (12:49 +0900)]
Update broken links to model repository in `howto.md`. (#4274)

- Update broken model zoo links as `tflite` leaves contrib.

Signed-off-by: Sung-Jae Lee <sj925.lee@samsung.com>
5 years ago[neurun] Remove skip list for TrivialTest.AddThree (#4266)
김수진/On-Device Lab(SR)/Engineer/삼성전자 [Fri, 18 Jan 2019 06:20:02 +0000 (15:20 +0900)]
[neurun] Remove skip list for TrivialTest.AddThree (#4266)

Related : #4211

This commit removes skip list for `TrivialTest.AddThree`, since #4263 and #4257 are merged.

Signed-off-by: sjsujinkim <sjsujin.kim@samsung.com>
5 years ago[neurun] Support to initialize 2D constant (#4257)
김수진/On-Device Lab(SR)/Engineer/삼성전자 [Fri, 18 Jan 2019 03:22:06 +0000 (12:22 +0900)]
[neurun] Support to initialize 2D constant (#4257)

* [neurun] Support to initialize 2D constant

Until now, `ConstantInitializer` in `neurun` has supported only for `FullyConnected`.
This commit supports to initialize 2D constant for all other operations.

* Change some comment

Signed-off-by: sjsujinkim <sjsujin.kim@samsung.com>
5 years agoMove type converter (#4253)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 18 Jan 2019 03:20:24 +0000 (12:20 +0900)]
Move type converter (#4253)

* Move type converter

Move type converter from graph to util
It makes more independent internal code with NNAPI

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
* Fix test and remove deprecated include

* Fix comment

* Divide function declaration and definition

5 years agoUse config manager for logging (#4261)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 18 Jan 2019 00:53:06 +0000 (09:53 +0900)]
Use config manager for logging (#4261)

Use config manager for neurun logging enable/disable

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoCorrection in comment in Pad kernel (#4262)
Shubham Gupta/SNAP /SRI-Bangalore/Engineer/삼성전자 [Fri, 18 Jan 2019 00:51:29 +0000 (06:21 +0530)]
Correction in comment in Pad kernel (#4262)

this patch will correct the comment which tells
what the pad kernel does.

Signed-off-by: shubham <shub98.gupta@samsung.com>
5 years agoRenaming ArgMinMax to ArgOperation (#4238)
Shubham Gupta/SNAP /SRI-Bangalore/Engineer/삼성전자 [Fri, 18 Jan 2019 00:51:16 +0000 (06:21 +0530)]
Renaming ArgMinMax to ArgOperation (#4238)

In order to have genericity so that any arg op
can be added, this patch will rename occurances
of ArgMinMax to ArgOperation.
Also, this patch will correct few of the comments.

Signed-off-by: shubham <shub98.gupta@samsung.com>
5 years ago[neurun] Fix when `Graph::lower` is called twice (#4263)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Fri, 18 Jan 2019 00:46:44 +0000 (09:46 +0900)]
[neurun] Fix when `Graph::lower` is called twice (#4263)

This commit fixes to handle `Graph::lower` is called multiple times.

Fix #4258

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
5 years ago[neurun] Remove skip list for TrivialTest.AddTwo (#4260)
김수진/On-Device Lab(SR)/Engineer/삼성전자 [Thu, 17 Jan 2019 22:24:44 +0000 (07:24 +0900)]
[neurun] Remove skip list for TrivialTest.AddTwo (#4260)

Related : #4211

This commit removes skip lit for `TrivialTest.AddTwo`, since #4249 is merged.

Signed-off-by: sjsujinkim <sjsujin.kim@samsung.com>
5 years agoRemove dependence of data format(NHWC) of PACL from kernels of PAD (#4014)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Thu, 17 Jan 2019 09:40:46 +0000 (18:40 +0900)]
Remove dependence of data format(NHWC) of PACL from kernels of PAD (#4014)

This commit removes dependece of data format(NHWC) of PACL runtime from kernels of PAD.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years agoAdd Broadcast support for PReLU in PACL (#4072)
Prasanna R/SNAP /SRI-Bangalore/Engineer/삼성전자 [Thu, 17 Jan 2019 09:37:52 +0000 (15:07 +0530)]
Add Broadcast support for PReLU in PACL (#4072)

This patch adds broadcast support for PReLU in PACL.

Signed-off-by: prasannar <prasanna.r@samsung.com>
5 years agoOptimisation in Permute kernel (#4202)
Shubham Gupta/SNAP /SRI-Bangalore/Engineer/삼성전자 [Thu, 17 Jan 2019 09:32:48 +0000 (15:02 +0530)]
Optimisation in Permute kernel (#4202)

Since many of the assignment operations are present
in kernel which can be easily avoided and hence can
lead to some optmisation.
This patch will remove the unnecessary assignemnt operations.

Signed-off-by: shubham <shub98.gupta@samsung.com>
5 years ago[neurun] Support other types in PermuteSource/PermuteSink (#4249)
김수진/On-Device Lab(SR)/Engineer/삼성전자 [Thu, 17 Jan 2019 08:12:50 +0000 (17:12 +0900)]
[neurun] Support other types in PermuteSource/PermuteSink (#4249)

* [neurun] Support other types in PermuteSource/PermuteSink

This commit supports other types in `PermuteSource`/`PermuteSink`.
These would make some mismatching TCs to match such as `TrivialTest.AddTwo`.

* Remove TODO

* Remove casting value already casted

* Remove unnecessary casting

Signed-off-by: sjsujinkim <sjsujin.kim@samsung.com>
5 years agoUpdate enabled validation test list (#4256)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 17 Jan 2019 05:45:25 +0000 (14:45 +0900)]
Update enabled validation test list (#4256)

Update enabled validation tests by supporting ADD operation on armv7l acl-cl backend

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoSupport LogcalNot in runtime and nnapi_delegate (#4048)
Дилшоджон Умронхонович Пошшоев/AI Tools Lab /SRR/Engineer/삼성전자 [Thu, 17 Jan 2019 05:44:07 +0000 (08:44 +0300)]
Support LogcalNot in runtime and nnapi_delegate (#4048)

* Support LogcalNot in runtime and nnapi_delegate

Add support of LogcalNot in PACL runtime and nnapi_delegate

Signed-off-by: Poshshoev Dilshodzhon <d.poshshoev@samsung.com>
* Add logical_not to _kernel_program_map and remove from skip list

Add logical_not to _kernel_program_map and remove from skip list

Signed-off-by: Poshshoev Dilshodzhon <d.poshshoev@samsung.com>
5 years ago[PACL] Fix reshape bug. (#4254)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Thu, 17 Jan 2019 03:53:19 +0000 (12:53 +0900)]
[PACL] Fix reshape bug. (#4254)

This commit fixes reshape bug that reshape does not support non 4-D input and 4-D output in PACL.
  - Fix GenericReshapeLayer bug
  - Set the apply_dim_correction input shape of GenericFullyConnectedLayer to `false`

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years agoFix NNAPI validation check for compilation preference (#4255)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 17 Jan 2019 03:36:08 +0000 (12:36 +0900)]
Fix NNAPI validation check for compilation preference (#4255)

Fix NNAPI frontend validation check for compilation preference
- Bad state: try to set after finish is called
- Bad preference value

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years ago[PACL] Support TransposeConv for GPU (#4223)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Thu, 17 Jan 2019 01:06:59 +0000 (10:06 +0900)]
[PACL] Support TransposeConv for GPU (#4223)

This commit supports TransposeConv operation for GPU.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years agoBring CLDeconvolutionLayer from ACL into libARMComputeEx (#4250)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Wed, 16 Jan 2019 09:45:35 +0000 (18:45 +0900)]
Bring CLDeconvolutionLayer from ACL into libARMComputeEx (#4250)

This commit brings CLDeconvolutionLayer in order to fix a bug computing wrong the output's dimension value.
  - Bring CLDeconvolutionLayer
  - Bring a function that computes the output's dimension value

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years agoRemove unused num_elem variable from Arg CL Host file (#4234)
Shubham Gupta/SNAP /SRI-Bangalore/Engineer/삼성전자 [Wed, 16 Jan 2019 06:57:39 +0000 (12:27 +0530)]
Remove unused num_elem variable from Arg CL Host file (#4234)

This patch will remove unused num_elem variable from
CLArgMinMaxKernel.cpp

Signed-off-by: shubham <shub98.gupta@samsung.com>
5 years agoTest packaging for x64 build (#4247)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Tue, 15 Jan 2019 09:35:54 +0000 (18:35 +0900)]
Test packaging for x64 build (#4247)

Test packaging for x64 build. It's to prepare neurun x64 test

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoMore strict acl extention lib debug build option (#4241)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Tue, 15 Jan 2019 09:10:43 +0000 (18:10 +0900)]
More strict acl extention lib debug build option (#4241)

More strict acl extention lib debug build option: unused-parameter and unused-function check

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years ago[neurun] Remove skip list and add framework test for ADD op (#4216)
김수진/On-Device Lab(SR)/Engineer/삼성전자 [Tue, 15 Jan 2019 06:58:47 +0000 (15:58 +0900)]
[neurun] Remove skip list and add framework test for ADD op (#4216)

* [neurun] Remove skip list and add framework test for ADD op

This commit removes skip lit and add framework test for ADD op.

Signed-off-by: sjsujinkim <sjsujin.kim@samsung.com>
* add GeneratedTests.add_broadcast_4D_2D_after_nops_float_nnfw, remove framework tests

5 years ago[neurun] Fix broadcast bug for ADD op and remove skip list (#4243)
김수진/On-Device Lab(SR)/Engineer/삼성전자 [Tue, 15 Jan 2019 04:38:36 +0000 (13:38 +0900)]
[neurun] Fix broadcast bug for ADD op and remove skip list (#4243)

This commit fixes broadcast bug for ADD op and remove skip list `TrivialTest.BroadcastAddTwo`.

Signed-off-by: sjsujinkim <sjsujin.kim@samsung.com>
5 years agoFramework test list for neurun cpu and acl (#4244)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Tue, 15 Jan 2019 03:41:35 +0000 (12:41 +0900)]
Framework test list for neurun cpu and acl (#4244)

Add framework test list for neurun armv7l cpu and acl cl
Add framework test list for neurun x86-64 cpu
Workaround test packaging on makefile for CI test

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years ago[neurun] Correct wrong assumptions for Reshape and Concat (#4210)
김수진/On-Device Lab(SR)/Engineer/삼성전자 [Tue, 15 Jan 2019 03:07:47 +0000 (12:07 +0900)]
[neurun] Correct wrong assumptions for Reshape and Concat (#4210)

* [neurun] Correct wrong assumptions for Reshape and Concat

This commit corrects wrong assumptions for `Reshape` and `Concat` (refer to belows)

- Reshape : https://developer.android.com/ndk/reference/group/neural-networks#group___neural_networks_1ggaabbe492c60331b13038e39d4207940e0a535e7e99383ee49456c8671843b93a59
- Concat : https://developer.android.com/ndk/reference/group/neural-networks#group___neural_networks_1ggaabbe492c60331b13038e39d4207940e0a44cbea825c4b224dd3ea757e9b1f65ed

Signed-off-by: sjsujinkim <sjsujin.kim@samsung.com>
* Correct concat count check

* Change concat input range

5 years agoFix nnapi delegate (#4240)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Tue, 15 Jan 2019 01:05:49 +0000 (10:05 +0900)]
Fix nnapi delegate (#4240)

Fix nnapi delegate bug for gbs build
Fix switch-case indent

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoUse more strict compile option for tflite library (#4196)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Tue, 15 Jan 2019 00:18:18 +0000 (09:18 +0900)]
Use more strict compile option for tflite library (#4196)

Use more strict compile option for tflite library
Remove use of size_t as possible

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoFix infering wrong padding in TransposeConv (#4237)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Tue, 15 Jan 2019 00:17:45 +0000 (09:17 +0900)]
Fix infering wrong padding in TransposeConv (#4237)

This commit fixes infering wrong padding in TransposeConv.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years agoRemove deprecated test for transpose convolution (#4235)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Mon, 14 Jan 2019 11:07:17 +0000 (20:07 +0900)]
Remove deprecated test for transpose convolution (#4235)

Remove deprecated test: int32 transpose convolution

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoTranspose Convolution fix (#4137)
Vishal Keshav/SNAP /SRI-Bangalore/Engineer/삼성전자 [Mon, 14 Jan 2019 11:04:56 +0000 (16:34 +0530)]
Transpose Convolution fix (#4137)

Fixed the incorrect filter index
Pad change reverted

Signed-off-by: Vishal Keshav <vishal.k1@samsung.com>
5 years agoUpdate NNAPI extend spec not supporting int32 tensor operation (#4229)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Mon, 14 Jan 2019 10:56:11 +0000 (19:56 +0900)]
Update NNAPI extend spec not supporting int32 tensor operation (#4229)

Change int32 tensor to quantized int tensor for ANEURALNETWORKS_TRANSPOSE_CONV_EX

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoFix build error by unused variable on CLLogicalNotKernel.cpp (#4233)
이춘석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Mon, 14 Jan 2019 10:53:33 +0000 (19:53 +0900)]
Fix build error by unused variable on CLLogicalNotKernel.cpp (#4233)

- Fix build error by unused variable on CLLogicalNotKernel.cpp

Signed-off-by: Chunseok Lee <chunseok.lee@samsung.com>
5 years agoFix permute vaildation check bug (#4226)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Mon, 14 Jan 2019 10:39:59 +0000 (19:39 +0900)]
Fix permute vaildation check bug (#4226)

Fix permute validation check to check validate rank only

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoAdd CL Kernel of LogicalNot (#3636)
Дилшоджон Умронхонович Пошшоев/AI Tools Lab /SRR/Engineer/삼성전자 [Mon, 14 Jan 2019 10:11:01 +0000 (13:11 +0300)]
Add CL Kernel of LogicalNot (#3636)

This commit adds implementation of LogicalNot in CL kernel
Related issues: #3596

Signed-off-by: Poshshoev Dilshodzhon <d.poshshoev@samsung.com>