platform/core/ml/nnfw.git
5 years agoRemove calcOffset methods using Coordinate4D (#5416)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Fri, 14 Jun 2019 08:05:45 +0000 (17:05 +0900)]
Remove calcOffset methods using Coordinate4D (#5416)

This commit removes calcOffset methods using Coordinate4D from classes of backend tensor

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years ago[Interp] DepthwiseConv and Reshape kernel skeleton (#5415)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 14 Jun 2019 07:29:16 +0000 (16:29 +0900)]
[Interp] DepthwiseConv and Reshape kernel skeleton (#5415)

- DepthwiseConv kernel skeleton for mobilenet
- Reshape kernel skeleton for inception v3 2018

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoApply Coordinates for PermuteLayer (#5399)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Fri, 14 Jun 2019 00:55:14 +0000 (09:55 +0900)]
Apply Coordinates for PermuteLayer (#5399)

This commit applies Coordinates for PermuteLayer.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years agoApply Coordinates for sinking and sourcing (#5398)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Fri, 14 Jun 2019 00:53:14 +0000 (09:53 +0900)]
Apply Coordinates for sinking and sourcing (#5398)

This commit applies Coordinates for sinking and sourcing.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years agoUse Coordinates in SubTensorInfo (#5395)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 14 Jun 2019 00:46:38 +0000 (09:46 +0900)]
Use Coordinates in SubTensorInfo (#5395)

Use Coordinates instead of Coordinate4D in SubTensorAnalyzer and SubTensorInfo

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoAdded profiling infrastructure to Executors (#5365)
Андрей Шедько/AI Tools Lab /SRR/Engineer/삼성전자 [Fri, 14 Jun 2019 00:46:17 +0000 (03:46 +0300)]
Added profiling infrastructure to Executors (#5365)

* Added profiling infrastructure to Executors

Profiling is done via wrapper function.
TODO: figure out how to wait for result in parallel executor.
Linear executor is not profiled, because LinearExecutor uses IFunctions
directly instead of subgraphs

Signed-off-by: Andrei Shedko <a.shedko@samsung.com>
* Added Observer for Profiling results

Added Observer for Profiling results

Signed-off-by: Andrei Shedko <a.shedko@samsung.com>
* Code review fixes for profiling

ExextionObserver added for Dataflow Executor.
Removed ProfilingWrapper as not needed.

Signed-off-by: Andrei Shedko <a.shedko@samsung.com>
5 years agoAdd transpose conv gtest (#5391)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 13 Jun 2019 22:07:55 +0000 (07:07 +0900)]
Add transpose conv gtest (#5391)

* Add transpose conv gtest

Add transpose conv gtest
- stride: 2
- same padding

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

5 years ago[MemoryManager] Introduce MemoryManager class for each backend (#5392)
김용섭/On-Device Lab(SR)/Engineer/삼성전자 [Thu, 13 Jun 2019 09:09:34 +0000 (18:09 +0900)]
[MemoryManager] Introduce MemoryManager class for each backend (#5392)

* [MemoryManager] Introduce MemoryManager class for each backend

- IMemoryManager: Interface class which has two apis - allocate() and
deallocate()
- cpu::MemoryManager and acl_common::AclMemoryManager - impl classes for
each backend

Signed-off-by: Yongseop Kim <yons.kim@samsung.com>
* Change parameter

5 years agoIntroduce xdata library (#5387)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 13 Jun 2019 08:56:50 +0000 (17:56 +0900)]
Introduce xdata library (#5387)

* Introduce xdata library

This commit introduces xdata library which provides (XRay) data classes
for profiling.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
* Remove commented build script

5 years agoApply Coordinates for ConstantInitializer (#5397)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Thu, 13 Jun 2019 04:34:46 +0000 (13:34 +0900)]
Apply Coordinates for ConstantInitializer (#5397)

This commit applies Coordinates for ConstantInitializer.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years agoApply Coordinates for feature::nchw::View (#5400)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Thu, 13 Jun 2019 04:01:28 +0000 (13:01 +0900)]
Apply Coordinates for feature::nchw::View (#5400)

This commit applies Coordinates for feature::nchw::View.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years agoIntroduce coordinate converter (#5394)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 13 Jun 2019 00:40:05 +0000 (09:40 +0900)]
Introduce coordinate converter (#5394)

Introduce coordinate converter from neurun coordinate to acl coordinate

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoFix coordinate size expanding bug (#5393)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 12 Jun 2019 08:27:11 +0000 (17:27 +0900)]
Fix coordinate size expanding bug (#5393)

Fix coordinate size expanding using index when set coordinate

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years ago[neurun] Accept Visitors by lvalue reference (#5385)
Сергей Баранников/AI Tools Lab /SRR/Engineer/삼성전자 [Wed, 12 Jun 2019 04:16:11 +0000 (07:16 +0300)]
[neurun] Accept Visitors by lvalue reference (#5385)

* Change `Operation::accept` to accept `OperationVisitor` by lvalue reference instead of rvalue reference.
Parameters with rvalue reference types are assumed to be "moved-from". This was not the case.
* Remove redundant `virtual` keyword since the methods are declared `override`.

Signed-off-by: Sergei Barannikov <s.barannikov@samsung.com>
5 years agoAdd interpreter unittest for coverage (#5376)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 12 Jun 2019 02:06:26 +0000 (11:06 +0900)]
Add interpreter unittest for coverage (#5376)

- Rename skiplist file for interpreter
- Update skiplist
- Add interpreter unittest for coverage

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoDo cross build automatically when ROOTFS_DIR is present. (#5380)
이성재/On-Device Lab(SR)/Principal Engineer/삼성전자 [Wed, 12 Jun 2019 01:52:35 +0000 (10:52 +0900)]
Do cross build automatically when ROOTFS_DIR is present. (#5380)

* Do cross build automatically when ROOTFS_DIR is present.

* In Makefile, set CROSS_BUILD flag automatically when ROOTFS_DIR is given and exist.

Signed-off-by: Sung-Jae Lee <sj925.lee@samsung.com>
* Improve the use case scenario and document.

* condition check was supplemented.
* update related document (This time, only arm related parts.)

Signed-off-by: Sung-Jae Lee <sj925.lee@samsung.com>
5 years agoRemove createParallelExecutor code (#5382)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Wed, 12 Jun 2019 01:00:10 +0000 (10:00 +0900)]
Remove createParallelExecutor code (#5382)

Remove createParallelExecutor code which is no longer used.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
5 years agoIntroduce calcOffset method with param Coordinates into Tensor classes (#5372)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Wed, 12 Jun 2019 00:40:21 +0000 (09:40 +0900)]
Introduce calcOffset method with param Coordinates into Tensor classes (#5372)

This commit introduces calcOffset with param Coordinates into Tensor classes.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years ago[Interp] Introduce softmax operation in interpreter (#5370)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Tue, 11 Jun 2019 22:27:37 +0000 (07:27 +0900)]
[Interp] Introduce softmax operation in interpreter (#5370)

* [Interp] Introduce softmax operation in interpreter

Introduce softmax operation for float32 type input & output in interpreter

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
* Fix based on review

- Use dynamic_cast
- Move internal function to anonymous namespace
- Remove return

5 years agoUnify Dataflow/ParallelExecutor creation (#5381)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Tue, 11 Jun 2019 10:16:14 +0000 (19:16 +0900)]
Unify Dataflow/ParallelExecutor creation (#5381)

Creation procedures of Dataflow/Parallel Executor are identical except
constructor call, we can unify them.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
5 years agoFix transpose conv padding calculation bug (#5371)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Tue, 11 Jun 2019 00:29:26 +0000 (09:29 +0900)]
Fix transpose conv padding calculation bug (#5371)

Fix padding calculation parameter seting bug in transpose conv

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years ago[Interp] Introduce concat operation in interpreter (#5356)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Mon, 10 Jun 2019 10:58:08 +0000 (19:58 +0900)]
[Interp] Introduce concat operation in interpreter (#5356)

Introduce concat operation for float32 type in interpreter

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoEnhance DataflowExecutor dependency resolution (#5352)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Mon, 10 Jun 2019 09:30:30 +0000 (18:30 +0900)]
Enhance DataflowExecutor dependency resolution (#5352)

Enhance inefficent dependency resolution to count-based resolution for
DataflowExecutor and ParallelExecutor.

Resolve #5223

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
5 years agoChange ACL_DEFAULT_LAYOUT configuration to ACL_LAYOUT (#5324)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Mon, 10 Jun 2019 09:00:20 +0000 (18:00 +0900)]
Change ACL_DEFAULT_LAYOUT configuration to ACL_LAYOUT (#5324)

This commit changes ACL_DEFAULT_LAYOUT configuration to ACL_LAYOUT.
This configuration will force the layout of node for ACL to change.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years agoRemove lower info dependency in SubTensorAnalyzer (#5369)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Mon, 10 Jun 2019 08:57:54 +0000 (17:57 +0900)]
Remove lower info dependency in SubTensorAnalyzer (#5369)

Remove operand lower info dependency in SubTensorAnalyzer

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoScheduler for HE (#5182)
Андрей Шедько/AI Tools Lab /SRR/Engineer/삼성전자 [Mon, 10 Jun 2019 08:57:42 +0000 (11:57 +0300)]
Scheduler for HE (#5182)

* Scheduler part of POC refactored

Added inital support for scheduling

Signed-off-by: Andrei Shedko <a.shedko@samsung.com>
* Code review fixes

Renamed makeRankForScheduler, added asserts,
Added some comments

Signed-off-by: Andrei Shedko <a.shedko@samsung.com>
* More review fixes

Use Backend * instead of string for _backend_avail_time

Signed-off-by: Andrei Shedko <a.shedko@samsung.com>
* Decouple scheduler from warm-up

Assumes linear dependence on size and uses lower address bits of the
backend pointer to differentiate between backends

Signed-off-by: Andrei Shedko <a.shedko@samsung.com>
* Rebased changes unto fresh master, fixed typos

Rebased changes unto fresh master, fixed typos

Signed-off-by: Andrei Shedko <a.shedko@samsung.com>
* Scheduler conforms to ISheduler interface

Changed Scheduler to conform to ISheduler interface

Signed-off-by: Andrei Shedko <a.shedko@samsung.com>
* Moved getOperationsFlattenedIOSize to Scheduler

Moved getOperationsFlattenedIOSize to Scheduler

Signed-off-by: Andrei Shedko <a.shedko@samsung.com>
5 years ago[kbenchmark] Add Config parser (#5354)
윤지영/On-Device Lab(SR)/Staff Engineer/삼성전자 [Mon, 10 Jun 2019 01:26:09 +0000 (10:26 +0900)]
[kbenchmark] Add Config parser (#5354)

This patch parses the given configuration file.
Each layer is tested in a given set of kernel benchmark tests.

Signed-off-by: Jiyoung Yun <jy910.yun@samsung.com>
5 years agoIntroduce Coordinates (#5345)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Mon, 10 Jun 2019 01:25:44 +0000 (10:25 +0900)]
Introduce Coordinates (#5345)

This commit introduces Coordinates that is not dependent on a specific layout.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years ago[ACL backends] Fuse activation layers into convolutional layers (#5350)
Сергей Баранников/AI Tools Lab /SRR/Engineer/삼성전자 [Mon, 10 Jun 2019 01:22:57 +0000 (04:22 +0300)]
[ACL backends] Fuse activation layers into convolutional layers (#5350)

* [ACL backends] Fuse activation layers into convolutional layers

Previously, convolutions with built-in activations were translated into two separate layers for ACL backends. Now activations are fused into the convolutional layers by exploiting corresponding feature of the backends.

Signed-off-by: Sergei Barannikov <s.barannikov@samsung.com>
* Workaround ACL bug.

5 years ago[ACL CL backend] Support `Unpack` operation in ACL CL backend (#5349)
Сергей Баранников/AI Tools Lab /SRR/Engineer/삼성전자 [Mon, 10 Jun 2019 01:19:05 +0000 (04:19 +0300)]
[ACL CL backend] Support `Unpack` operation in ACL CL backend (#5349)

* [backend] Support `Unpack` operation in ACL CL backend

Added support of `Unpack` operation in ACL CL backend through `Unstack` layer.

Signed-off-by: Sergei Barannikov <s.barannikov@samsung.com>
* * Remove redundant `static_cast`
* Move checking code to `OperationValidator`

* * Implement `Dumper` method for `UnpackNode` class

5 years ago[Interp] Introduce fully connected operation in interepreter (#5358)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 7 Jun 2019 06:15:51 +0000 (15:15 +0900)]
[Interp] Introduce fully connected operation in interepreter (#5358)

Introduce fully connected operation for float in interpreter

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoResolve param value for softmax at frontend (#5348)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 7 Jun 2019 06:03:45 +0000 (15:03 +0900)]
Resolve param value for softmax at frontend (#5348)

* Resolve param value for softmax at frontend

Remove index param in softmax node and resolve value at frontend
Rename param name scale to beta (generally used)

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
* Remove unused variable in tflite loader

5 years ago[Interp] Introduce average pool operation in interpreter (#5357)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 5 Jun 2019 10:17:49 +0000 (19:17 +0900)]
[Interp] Introduce average pool operation in interpreter (#5357)

Introduce average pool operation for float type in interpreter

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoRename Executor.cc to LinearExecutor.cc (#5353)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Wed, 5 Jun 2019 10:16:52 +0000 (19:16 +0900)]
Rename Executor.cc to LinearExecutor.cc (#5353)

When the class name was renamed to LinearExecutor, the source file was
not renamed.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
5 years agoTFLite Loader [4/4] (#5288)
Павел Ильютченко/AI Tools Lab /SRR/Engineer/삼성전자 [Wed, 5 Jun 2019 10:16:31 +0000 (13:16 +0300)]
TFLite Loader [4/4] (#5288)

* Core implementation without operations

* Core structure of tflite loader without operations

Signed-off-by: Pavel Iliutchenko <p.iliutchenk@samsung.com>
* Full implementation of tflite loader

Signed-off-by: Pavel Iliutchenko <p.iliutchenk@samsung.com>
* Fix cmake and outdated headers from neurun

Signed-off-by: Pavel Iliutchenko <p.iliutchenk@samsung.com>
* TFLite loader tool implementation (test tool which load tflite models)

Signed-off-by: Pavel Iliutchenko <p.iliutchenk@samsung.com>
* Fix copyright years, ifndef name and name of tflite loader test tool

Signed-off-by: Pavel Iliutchenko <p.iliutchenk@samsung.com>
* Remove NNAPI usage from test tool

Signed-off-by: Pavel Iliutchenko <p.iliutchenk@samsung.com>
5 years ago[kbenchmark] Loads kernel benchmark library and adds some draft conv test kernels...
윤지영/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 5 Jun 2019 05:04:59 +0000 (14:04 +0900)]
[kbenchmark] Loads kernel benchmark library and adds some draft conv test kernels (#5346)

This patch loads kernel benchmark library using dynamic loader.
It also adds the draft test conv kernel for armcl and armne.

Signed-off-by: Jiyoung Yun <jy910.yun@samsung.com>
5 years ago[Interp] Kernel skeleton for inception (#5335)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 5 Jun 2019 05:04:46 +0000 (14:04 +0900)]
[Interp] Kernel skeleton for inception (#5335)

Interpreter kernel skeleton to support inception
License and kernel registration structure only

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoAdd comment and condition for optional input (#5344)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 5 Jun 2019 05:04:21 +0000 (14:04 +0900)]
Add comment and condition for optional input (#5344)

- Add comment about optional input handling
- Add condition to handle omitted optional input if shape is unspecified in model build phase

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years ago[ACL backends] Reuse asPadStrideInfo (#5351)
Сергей Баранников/AI Tools Lab /SRR/Engineer/삼성전자 [Wed, 5 Jun 2019 04:01:53 +0000 (07:01 +0300)]
[ACL backends] Reuse asPadStrideInfo (#5351)

Replaced uses of `asPadStringInfo` with `acl_common::asPadStrideInfo` to reduce code duplication.

Signed-off-by: Sergei Barannikov <s.barannikov@samsung.com>
5 years ago[kbenchmark] Add argument parser (#5336)
윤지영/On-Device Lab(SR)/Staff Engineer/삼성전자 [Tue, 4 Jun 2019 04:57:13 +0000 (13:57 +0900)]
[kbenchmark] Add argument parser (#5336)

This patch adds argument parsers for kbenchmark tool.

Signed-off-by: Jiyoung Yun <jy910.yun@samsung.com>
5 years agoFix neurun build bug by LSTM (#5342)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Tue, 4 Jun 2019 01:26:39 +0000 (10:26 +0900)]
Fix neurun build bug by LSTM (#5342)

Fix neurun build bug by supporting LSTM acl_cl backend

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoSupport LSTM operation (#5293)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Tue, 4 Jun 2019 00:45:08 +0000 (09:45 +0900)]
Support LSTM operation (#5293)

* Enable optional input

This commit enables optional input.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
* Support LSTM opertion

This commit supports LSTM operation by using acl cl.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years agoCreate kbenchmark in tools directory (#5333)
윤지영/On-Device Lab(SR)/Staff Engineer/삼성전자 [Mon, 3 Jun 2019 08:22:03 +0000 (17:22 +0900)]
Create kbenchmark in tools directory (#5333)

This patch creates kbenchmark directory.
It is an initial commit for kbenchmark.

Signed-off-by: Jiyoung Yun <jy910.yun@samsung.com>
5 years agoFull implementation of TFLite Loader (operations support) (#5287)
Павел Ильютченко/AI Tools Lab /SRR/Engineer/삼성전자 [Mon, 3 Jun 2019 08:14:59 +0000 (11:14 +0300)]
Full implementation of TFLite Loader (operations support) (#5287)

* Initial implementation of tflite loader

* Contain header of loader and stab impl
* Fix some format in loader

Signed-off-by: Pavel Iliutchenko <p.iliutchenk@samsung.com>
* Core implementation without operations

Signed-off-by: Pavel Iliutchenko <p.iliutchenk@samsung.com>
* Full implementation of tflite loader

Signed-off-by: Pavel Iliutchenko <p.iliutchenk@samsung.com>
* Fix EOF

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoDisable PermutationEliminationPass (#5321)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Mon, 3 Jun 2019 05:16:00 +0000 (14:16 +0900)]
Disable PermutationEliminationPass (#5321)

This commit disables PermutationEliminationPass because it no longer works.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years ago[neurun] Avoid using `new` in favor of make_unique (#5331)
Сергей Баранников/AI Tools Lab /SRR/Engineer/삼성전자 [Mon, 3 Jun 2019 02:01:22 +0000 (05:01 +0300)]
[neurun] Avoid using `new` in favor of make_unique (#5331)

`make_unique` is a preferred way of constructing objects compared to direct construction via `new`.

Signed-off-by: Sergei Barannikov <s.barannikov@samsung.com>
5 years ago[Interp] Introduce conv operation (#5329)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 31 May 2019 08:39:08 +0000 (17:39 +0900)]
[Interp] Introduce conv operation (#5329)

Introduce conv operation for float32 type in interpreter

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoParallelExecutor inherits DataflowExecutor (#5280)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Fri, 31 May 2019 06:52:42 +0000 (15:52 +0900)]
ParallelExecutor inherits DataflowExecutor (#5280)

As ParallelExecutor is based on DataflowExecutor, some part of
DataflowExecutor code(ctor and notify) can be reused.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
5 years agoUse make_unique instead of allocating memory directly (#5267)
Сергей Баранников/AI Tools Lab /SRR/Engineer/삼성전자 [Fri, 31 May 2019 06:31:06 +0000 (09:31 +0300)]
Use make_unique instead of allocating memory directly (#5267)

Refactor neurun::backend::cpu::Allocator class to manage memory with unique_ptr instead of bare pointer.

Signed-off-by: Sergei Barannikov <s.barannikov@samsung.com>
5 years agoExecTime records for NYI ops should always read "not implemented" (#5309)
Андрей Шедько/AI Tools Lab /SRR/Engineer/삼성전자 [Fri, 31 May 2019 06:29:25 +0000 (09:29 +0300)]
ExecTime records for NYI ops should always read "not implemented" (#5309)

* ExecTime records for NYI ops should always read "not implemented"

Added a guard against recods for ops with incomplete implementation

Signed-off-by: Andrei Shedko <a.shedko@samsung.com>
* Fix small typo in comment

Fix small typo in comment

Signed-off-by: Andrei Shedko <a.shedko@samsung.com>
5 years agoFix DotDumper bug when dumper level 1 (#5320)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Fri, 31 May 2019 05:50:01 +0000 (14:50 +0900)]
Fix DotDumper bug when dumper level 1 (#5320)

Constant operands were incorrectly shown. This commit fixes it.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
5 years agoCore implementation of TFLite Loader [2/4] (#5286)
Павел Ильютченко/AI Tools Lab /SRR/Engineer/삼성전자 [Fri, 31 May 2019 04:22:36 +0000 (07:22 +0300)]
Core implementation of TFLite Loader [2/4] (#5286)

* Initial implementation of tflite loader

* PR contain header of loader and stab impl
* Fix some format in loader

Signed-off-by: Pavel Iliutchenko <p.iliutchenk@samsung.com>
* Core implementation without operations

Signed-off-by: Pavel Iliutchenko <p.iliutchenk@samsung.com>
* Add exceptions on not supported params in tflite::Tensor

Signed-off-by: Pavel Iliutchenko <p.iliutchenk@samsung.com>
5 years agoImplement per-operation backend assignment (#5311)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Fri, 31 May 2019 04:22:26 +0000 (13:22 +0900)]
Implement per-operation backend assignment (#5311)

Implement per-operation backend assignment on ManualScheduler.
This also introduces `string_helpers.h`.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
5 years ago[Interp] Generated test for interpreter (#5303)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 31 May 2019 01:21:10 +0000 (10:21 +0900)]
[Interp] Generated test for interpreter (#5303)

* [Interp] Generated test for interpreter

Add generated test for interpreter in x86-64 test script

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

5 years agoUse user setting gcov tool for coverage report (#5315)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 31 May 2019 00:54:02 +0000 (09:54 +0900)]
Use user setting gcov tool for coverage report (#5315)

Use user setting gcov tool (arm cross builttool) to match gnu tool version

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoRemove operand's layout from LowerInfo (#5322)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Fri, 31 May 2019 00:53:22 +0000 (09:53 +0900)]
Remove operand's layout from LowerInfo (#5322)

This commit removes operand's layout from LowerInfo.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years ago[neurun] Introduce Unpack operation (#5327)
Сергей Баранников/AI Tools Lab /SRR/Engineer/삼성전자 [Fri, 31 May 2019 00:52:58 +0000 (03:52 +0300)]
[neurun] Introduce Unpack operation (#5327)

* Add `Unpack` operation to the neurun core
* Implement `ANEURALNETWORKS_UNPACK_EX` interface.

Signed-off-by: Sergei Barannikov <s.barannikov@samsung.com>
5 years agoFix pacl build fail (#5325)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 30 May 2019 08:57:44 +0000 (17:57 +0900)]
Fix pacl build fail (#5325)

Fix pacl build fail by tflite loader

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoInitial implementation of tflite loader (#5285)
Павел Ильютченко/AI Tools Lab /SRR/Engineer/삼성전자 [Thu, 30 May 2019 06:33:52 +0000 (09:33 +0300)]
Initial implementation of tflite loader (#5285)

* Initial implementation of tflite loader

* PR contain header of loader and stab impl

Signed-off-by: Pavel Iliutchenko <p.iliutchenk@samsung.com>
* Fix some format in loader

Signed-off-by: Pavel Iliutchenko <p.iliutchenk@samsung.com>
* Disable tflite loader building for tizen build

Signed-off-by: Pavel Iliutchenko <p.iliutchenk@samsung.com>
* CMake fixes: using library links, -Werror

Signed-off-by: Pavel Iliutchenko <p.iliutchenk@samsung.com>
* Fix dangerous namespace to tflite_loader

Signed-off-by: Pavel Iliutchenko <p.iliutchenk@samsung.com>
* Fix some comment issues and ifndef name

Signed-off-by: Pavel Iliutchenko <p.iliutchenk@samsung.com>
5 years agoResolve param value for l2 pool at frontend (#5304)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 30 May 2019 04:20:25 +0000 (13:20 +0900)]
Resolve param value for l2 pool at frontend (#5304)

- Remove index param in l2pool2d node and resolve value at frontend
- Use resolved constant param value at acl_cl backend

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoReplace BackendSet with PermuteFactorSet (#5307)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Thu, 30 May 2019 03:47:03 +0000 (12:47 +0900)]
Replace BackendSet with PermuteFactorSet (#5307)

This commit replaces BackendSet with PermuteFactorSet.
  - replace BackendSet with PermuteFactorSet in operand::LowerInfo
  - Add the layout as a factor separating sub-graphs

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years agoRemove unused variable and method in Plan (#5317)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Thu, 30 May 2019 03:24:57 +0000 (12:24 +0900)]
Remove unused variable and method in Plan (#5317)

`_compiled` is no longer used as related code are moved to an earlier
stage.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
5 years ago[xray] A lightweight message passing interface (#5305)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 30 May 2019 03:24:23 +0000 (12:24 +0900)]
[xray] A lightweight message passing interface (#5305)

This commit introduces xray which implements a lightweight message
passing channel (based on weak symbol) for event trace.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years agoHoisted some throw "NYI" statements to stage generation (#5312)
Андрей Шедько/AI Tools Lab /SRR/Engineer/삼성전자 [Thu, 30 May 2019 01:47:23 +0000 (04:47 +0300)]
Hoisted some throw "NYI" statements to stage generation (#5312)

Hoisted some throw "NYI" statements to stage generation

Signed-off-by: Andrei Shedko <a.shedko@samsung.com>
5 years agoResolve param value for depthwise conv at frontend (#5302)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 30 May 2019 00:24:01 +0000 (09:24 +0900)]
Resolve param value for depthwise conv at frontend (#5302)

- Remove index param in depthwise conv node and resolve value at frontend
- Use resolved constant param value at each backend

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoFix ManualScheduler (#5306)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Wed, 29 May 2019 09:27:00 +0000 (18:27 +0900)]
Fix ManualScheduler (#5306)

`OP_BCKEND_XXXNode` did not work, this commit fixes it.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
5 years agoIntroduce IScheduler (#5296)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Wed, 29 May 2019 07:34:47 +0000 (16:34 +0900)]
Introduce IScheduler (#5296)

* Introduce IScheduler

Introduce IScheduler to support various kind of schedulers. It has
just one `schedule` function that returns a `BackendResolver`, but it
could be changed later as needed.

Legacy scheduling procedure is now implemented in `ManualScheduler`.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
* Fix comments

5 years agoIntroduce custom set (#5300)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Wed, 29 May 2019 07:27:29 +0000 (16:27 +0900)]
Introduce custom set (#5300)

This commit introduces custom set of permutation factors into operand's LowerInfo.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
5 years agoFix coverage test bug in ExecTime (#5289)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 29 May 2019 05:37:11 +0000 (14:37 +0900)]
Fix coverage test bug in ExecTime (#5289)

* Fix coverage test bug in ExecTime

Fix coverage test bug by g++ optimization level (-O) in ExecTime::updateOperationExecTime's map [] operator

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
* Use emplace instead of insert

5 years agoFront-pad 4dShapes instead of back-pad (#5299)
Андрей Шедько/AI Tools Lab /SRR/Engineer/삼성전자 [Wed, 29 May 2019 04:33:19 +0000 (07:33 +0300)]
Front-pad 4dShapes instead of back-pad (#5299)

Front-pad 4dShapes instead of back-pad

Signed-off-by: Andrei Shedko <a.shedko@samsung.com>
5 years ago[Interpreter] Use cker for interpreter add operation (#5276)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 29 May 2019 01:22:14 +0000 (10:22 +0900)]
[Interpreter] Use cker for interpreter add operation (#5276)

* Use cker for interpreter add operation

- Use cker for interpreter add operation
- Introduce util header for type transfer
- Support more activations: RELU, RELU1, RELU6
- Support more types: float32

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
* Rename functions

5 years agoIntroduce layout parameter to asFeature and asKernel (#5295)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 29 May 2019 01:22:01 +0000 (10:22 +0900)]
Introduce layout parameter to asFeature and asKernel (#5295)

Introduce layout parameter but allow NHWC only (because NCHW is not used yet)
Fix axis mapping comment

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoResolve param value for average pool at frontend (#5298)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Tue, 28 May 2019 22:10:37 +0000 (07:10 +0900)]
Resolve param value for average pool at frontend (#5298)

- Change stride and kernel width/height index param in avgpool2d node to constant value
- Resolve param values at frontend and use resolved value at each backend

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoResolve stride value for tanspose conv at frontend (#5294)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Tue, 28 May 2019 10:07:48 +0000 (19:07 +0900)]
Resolve stride value for tanspose conv at frontend (#5294)

- Remove stride index param in transposeconv node and resolve value at frontend
- Use resolved constant stride value at acl_cl backend

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoResolve param value for maxpool at frontend (#5292)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Tue, 28 May 2019 07:52:44 +0000 (16:52 +0900)]
Resolve param value for maxpool at frontend (#5292)

- Remove stride and kernel size index param in maxpool node
- Resolve param values for maxpool at frontend
- Use resolved constant param at each backend

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoRename files of nnapi wrapper classes (#5291)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Tue, 28 May 2019 06:27:14 +0000 (15:27 +0900)]
Rename files of nnapi wrapper classes (#5291)

Rename header and source files that were misleading.

- `compilation` to `ANeuralNetworksCompilation`
- `event` to `ANeuralNetworksEvent`
- `execution` to `ANeuralNetworksExecution`
- `memory` to `ANeuralNetworksMemory`

In the same manner with #5284

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
5 years agoModify util function in OperationFactory (#5290)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Tue, 28 May 2019 04:25:17 +0000 (13:25 +0900)]
Modify util function in OperationFactory (#5290)

* Modify util function in OperationFactory

- Rename util function for struct param setting: set{Struct_name} to make{Struct_name}
- Use explicit static casting for uint32_t from int32_t in makeStride function

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
* Rename makeExplicitPadding

5 years agoRename nnapi wrapper `model.h` (#5284)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Tue, 28 May 2019 00:42:34 +0000 (09:42 +0900)]
Rename nnapi wrapper `model.h` (#5284)

Rename nnapi wrapper `model.h` to `ANeuralNetworksModel.h`.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
5 years agoResolve stride value for convolution at frontend (#5282)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Mon, 27 May 2019 23:26:57 +0000 (08:26 +0900)]
Resolve stride value for convolution at frontend (#5282)

Remove stride index param in con2d node
Resolve stride value for conv2d at frontend
Use resolved constant stride value at each backend

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoRevise BackendResolver to be per operation (#5262)
이한종/On-Device Lab(SR)/Engineer/삼성전자 [Mon, 27 May 2019 23:26:48 +0000 (08:26 +0900)]
Revise BackendResolver to be per operation (#5262)

Revise BackendResolver to be per operation, not the type of operation

Part of #5115

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
5 years agoIntroduce the layout into TensorBuilder (#5233)
장지섭/On-Device Lab(SR)/Engineer/삼성전자 [Mon, 27 May 2019 07:35:45 +0000 (16:35 +0900)]
Introduce the layout into TensorBuilder (#5233)

* Introduce the layout into TensorBuilder

This commit introduces the layout into TensorBuilder.
  - Introduce layout into TensorBuilder
  - Remove setting the layout with hard-coding from TensorBuilder

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
* Update TensorBuilder.h

5 years ago[tflitefile_tool] Fix depthwise typo in config_saver (#5281)
윤지영/On-Device Lab(SR)/Staff Engineer/삼성전자 [Mon, 27 May 2019 06:05:31 +0000 (15:05 +0900)]
[tflitefile_tool] Fix depthwise typo in config_saver (#5281)

This patch fixes the depthwise typo in config_saver

Signed-off-by: Jiyoung Yun <jy910.yun@samsung.com>
5 years agoOverload cpp14::make_unique to support arrays (#5268)
Сергей Баранников/AI Tools Lab /SRR/Engineer/삼성전자 [Mon, 27 May 2019 04:05:43 +0000 (07:05 +0300)]
Overload cpp14::make_unique to support arrays (#5268)

* Overload cpp14::make_unique to support arrays

Extend own implementation of make_unique to support array construction.

Signed-off-by: Sergei Barannikov <s.barannikov@samsung.com>
* Add copyright information.

5 years agoIntroduce alias feature shape (#5273)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 24 May 2019 09:56:57 +0000 (18:56 +0900)]
Introduce alias feature shape (#5273)

Introduce alias model::FeatureShape for nnfw::misc::feature::Shape

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years ago[Interpreter] Introduce kernel registration structure (#5269)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 24 May 2019 09:19:20 +0000 (18:19 +0900)]
[Interpreter] Introduce kernel registration structure (#5269)

* Introduce kernel registration structure

- Divide kernel to prepare/invoke
- Introduce kernel registration structure
  - OperationExecutor's constructure register kernel
  - Visitor call prepare and invoke function based on node type

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
* Fix unused variable

5 years agoRename snake case padding util function (#5271)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 24 May 2019 05:01:16 +0000 (14:01 +0900)]
Rename snake case padding util function (#5271)

Rename valid_padding and same_padding function

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years ago[Interpreter] Introduce buffer allocator and deallocator (#5260)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 24 May 2019 04:01:18 +0000 (13:01 +0900)]
[Interpreter] Introduce buffer allocator and deallocator (#5260)

* Introduce introduce buffer allocator and deallocator

Allocate buffer if need for operation output
Deallocate buffer if all uses are finished

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
* Rename allocatedIfNeed to allocatedIfNeeded

5 years agoFix remove file name in ExecTime unittest (#5264)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 24 May 2019 04:00:38 +0000 (13:00 +0900)]
Fix remove file name in ExecTime unittest (#5264)

Fix remove file name in ExecTime unittest to exec_time.json

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoPrepare to use Stride struct in operation param (#5261)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 24 May 2019 02:01:29 +0000 (11:01 +0900)]
Prepare to use Stride struct in operation param (#5261)

Move util::Stride to InternalType.h
Make field for stride param in operation node definition

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoNew schema_generated.h file in tflite_loader (#5228)
Павел Ильютченко/AI Tools Lab /SRR/Engineer/삼성전자 [Fri, 24 May 2019 01:20:33 +0000 (04:20 +0300)]
New schema_generated.h file in tflite_loader (#5228)

* Regenerated schema_generated.h file in tflite loader

* Generate new file with correspondings flatbuffers version and flags

Signed-off-by: Pavel Iliutchenko <p.iliutchenk@samsung.com>
* Recompiled schema header without extra flags

Signed-off-by: Pavel Iliutchenko <p.iliutchenk@samsung.com>
* New line at the end of file

Signed-off-by: Pavel Iliutchenko <p.iliutchenk@samsung.com>
5 years agoUse rua-shim in T/F Lite delegate (#5263)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 24 May 2019 01:20:20 +0000 (10:20 +0900)]
Use rua-shim in T/F Lite delegate (#5263)

This commit update T/F Lite delegate to use RUA Shim implementation
instead of the current Shim implementation (derived from T/F Lite).

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years agoFixed 'how to test manually' document (#5251)
Ivan Vagin/AI Tools Lab /SRR/Engineer/삼성전자 [Fri, 24 May 2019 00:35:39 +0000 (03:35 +0300)]
Fixed 'how to test manually' document (#5251)

Fixed 'how to test manually' document

Signed-off-by: Ivan Vagin <ivan.vagin@samsung.com>
5 years agoUse padding util function for transpose convolution (#5256)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 23 May 2019 04:15:05 +0000 (13:15 +0900)]
Use padding util function for transpose convolution (#5256)

Use padding util function for transpose convolution on acl cl backend stage generator

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years ago[RUA] Update CMake target name & ifdef guard (#5255)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 23 May 2019 04:14:54 +0000 (13:14 +0900)]
[RUA] Update CMake target name & ifdef guard (#5255)

With this commit, RUA becomes consistent with other libraries in NNFW
in terms of CMake target name and ifdef guard.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years agoAdd interpreter unittest using buffer (#5221)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 23 May 2019 02:00:49 +0000 (11:00 +0900)]
Add interpreter unittest using buffer (#5221)

* Add interpreter unittest using buffer

Add interpreter unittest using two add operation with buffer output and constant operand
Move add kernel code order for correct exception

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
* Update example model comment

5 years ago[tflite_run] Support input from file (#5204)
Ivan Vagin/AI Tools Lab /SRR/Engineer/삼성전자 [Wed, 22 May 2019 22:15:45 +0000 (01:15 +0300)]
[tflite_run] Support input from file (#5204)

Supported input from file (--input cli key)

Signed-off-by: Ivan Vagin <ivan.vagin@samsung.com>
5 years agoRevise padding parameter resolution (#5248)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 22 May 2019 22:14:31 +0000 (07:14 +0900)]
Revise padding parameter resolution (#5248)

Resolve paddidng parameter value at frontend
Use util function in backend stage generator

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoRemove const keyword for int32_t return (#5249)
오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 22 May 2019 22:13:22 +0000 (07:13 +0900)]
Remove const keyword for int32_t return (#5249)

Remove const keyword for int32_t return in cker

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
5 years agoFix backend pointers in ExecTime (#5241)
Андрей Шедько/AI Tools Lab /SRR/Engineer/삼성전자 [Wed, 22 May 2019 08:10:20 +0000 (11:10 +0300)]
Fix backend pointers in ExecTime (#5241)

Fix backend pointers in ExecTime

Signed-off-by: Andrei Shedko <a.shedko@samsung.com>
5 years ago[RUA] Introduce Anchor & Shim module (#5243)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 22 May 2019 08:08:32 +0000 (17:08 +0900)]
[RUA] Introduce Anchor & Shim module (#5243)

This commit introduces rua-anchor which provides as a global rua
service store, and rua-shim which provides (inlined) Android NN API
implementation which delegates the call to the anchored runtime.

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