platform/core/ml/nnfw.git
5 years agoAdd Mobilenet+Inception-v3 model loading system tests (#945)
Dmitry Mozolev/AI Tools Lab /SRR/Engineer/삼성전자 [Tue, 14 Aug 2018 16:48:49 +0000 (19:48 +0300)]
Add Mobilenet+Inception-v3 model loading system tests (#945)

Note that there is no way to run them yet because the way to run all
system tests separately from the unit tests should be decided first,
as well as the way to store large files (NN models in this case).

Signed-off-by: Dmitry Mozolev <d.mozolev@samsung.com>
5 years ago[nnc] Fix tensorflow lite import of depthwise conv (#985)
Dmitry Mozolev/AI Tools Lab /SRR/Engineer/삼성전자 [Tue, 14 Aug 2018 16:45:28 +0000 (19:45 +0300)]
[nnc] Fix tensorflow lite import of depthwise conv (#985)

Depthwise convolution in Tensorflow Lite has channel multiplier
as its kernel's first dimension, while current Model IR
assumes it is the last dimension. This commit fixes this issue
by appropriately transposing the kernel during import.

Signed-off-by: Dmitry Mozolev <d.mozolev@samsung.com>
5 years ago[nnc] Interpreter: fixed Pool operation (#983)
Denis Maksimenko/AI Tools Lab /SRR/Assistant Engineer/삼성전자 [Tue, 14 Aug 2018 15:34:50 +0000 (18:34 +0300)]
[nnc] Interpreter: fixed Pool operation (#983)

Fixed Pooling op. Added missing "else" statement. Everything worked without it, but it was extremely confusing. Also added a "break" for consistency, even though it is not needed.

Signed-off-by: Denis Maksimenko <d.maksimenko@partner.samsung.com>
5 years ago[nnc] Assume SAME padding in Caffe importer (#1011)
Dmitry Mozolev/AI Tools Lab /SRR/Engineer/삼성전자 [Tue, 14 Aug 2018 14:27:26 +0000 (17:27 +0300)]
[nnc] Assume SAME padding in Caffe importer (#1011)

Layers have numeric padding parameters in Caffe, as oppopsed to
SAME/VALID padding in Tensorflow Lite and Model IR.

Currently,
during the model import stage there is no information about tensor
shapes, so it is impossible to map numeric paddings to SAME/VALID
paddings correctly.

Despite that, current reference models for Caffe do follow the rule of
"if pad is zero then padding is VALID, otherwise SAME",
so this commit does exactly that (before, Caffe importer would
throw an exception if it found non-zero non-equal paddings for height
and width; but inception-v3 has non-square convolutions which lead to
exactly such case).

Signed-off-by: Dmitry Mozolev <d.mozolev@samsung.com>
5 years agoFixed FullyConnected. (#1008)
Denis Maksimenko/AI Tools Lab /SRR/Assistant Engineer/삼성전자 [Tue, 14 Aug 2018 13:50:23 +0000 (16:50 +0300)]
Fixed FullyConnected. (#1008)

Fixed ShapeInference for FullyConnected layer, fixed interpreter implementation of FUllyConnected op.

Signed-off-by: Denis Maksimenko <d.maksimenko@partner.samsung.com>
5 years ago[nnc] Caffe import: transpose FullyConnected weights (#1009)
Denis Maksimenko/AI Tools Lab /SRR/Assistant Engineer/삼성전자 [Tue, 14 Aug 2018 13:45:31 +0000 (16:45 +0300)]
[nnc] Caffe import: transpose FullyConnected weights (#1009)

Now transposing internal_product weights in Caffe importer to match internal format.

Signed-off-by: Denis Maksimenko <d.maksimenko@partner.samsung.com>
5 years agoFix return value. (#1010)
Denis Maksimenko/AI Tools Lab /SRR/Assistant Engineer/삼성전자 [Tue, 14 Aug 2018 13:43:48 +0000 (16:43 +0300)]
Fix return value. (#1010)

createFullyConnected() used to return wrong Node if bias is not present.

Signed-off-by: Denis Maksimenko <d.maksimenko@partner.samsung.com>
5 years agoSoft backend fix softmax deserialization (#975)
Efimov Alexander/AI Tools Lab/./Samsung Electronics [Tue, 14 Aug 2018 11:53:45 +0000 (14:53 +0300)]
Soft backend fix softmax deserialization (#975)

This commit fixes deserialization of softmax parameters

Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
5 years agoSoft backend: add absent dimension in shape (#981)
Efimov Alexander/AI Tools Lab/./Samsung Electronics [Tue, 14 Aug 2018 11:53:25 +0000 (14:53 +0300)]
Soft backend: add absent dimension in shape (#981)

Add dimension in shape on deserialization (if there are 3 instead of 4)
this is batch dimension - 1 for inference

Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
5 years agoRenamed sample plugin option (#942)
Ivan Vagin/AI Tools Lab /SRR/Engineer/삼성전자 [Tue, 14 Aug 2018 11:32:08 +0000 (14:32 +0300)]
Renamed sample plugin option (#942)

This commit renamed sample plugin option

Signed-off-by: Ivan Vagin <ivan.vagin@samsung.com>
5 years ago[coco] Fix build break (#1005)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 14 Aug 2018 07:49:32 +0000 (16:49 +0900)]
[coco] Fix build break (#1005)

This commit fixes build break caused by bag link access interface.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Pass ObjectLink to Op/Instr Manager (#1002)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 14 Aug 2018 07:44:36 +0000 (16:44 +0900)]
[coco] Pass ObjectLink to Op/Instr Manager (#1002)

This commit revises Op/Instr manager to take ObjectLink as an arugment
of their constructor.

Note that this link is not used, yet.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Introduce PtrSlot (#969)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 14 Aug 2018 07:43:01 +0000 (16:43 +0900)]
[coco] Introduce PtrSlot (#969)

This commit introduces PtrSlot which allows us to insert a hook on
pointer updates.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Accessor on ObjectInfo (#1001)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 14 Aug 2018 07:42:47 +0000 (16:42 +0900)]
[coco] Accessor on ObjectInfo (#1001)

This commit introduces indirect accessor on ObjectInfo inside Object
class.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Support unlink on Bag (#1000)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 14 Aug 2018 07:42:39 +0000 (16:42 +0900)]
[coco] Support unlink on Bag (#1000)

This commit revises Object::bag method to support Bag unlink.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Default constructible Conv2DTest fixture (#999)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 14 Aug 2018 07:25:22 +0000 (16:25 +0900)]
[coco] Default constructible Conv2DTest fixture (#999)

Clang 6.X implicitly delete default constructor when there are const
fields, which results in build error.

This commit explicitly introduces the default constructor of Conv2DTest
fixture to fix build break.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Return casted value correctly (#998)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 14 Aug 2018 06:48:29 +0000 (15:48 +0900)]
[coco] Return casted value correctly (#998)

This commit fixes a bug in 'curr' method implementation.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[nnkit] Extract Caffe backend implementation (#997)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 14 Aug 2018 06:48:19 +0000 (15:48 +0900)]
[nnkit] Extract Caffe backend implementation (#997)

This commit extracts Caffe backend class from nnkit Caffe module.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Pass Bag-to-BagInfo link via virtual method (#993)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 14 Aug 2018 06:48:10 +0000 (15:48 +0900)]
[coco] Pass Bag-to-BagInfo link via virtual method (#993)

This commit revises Object class to get Bag-to-BagInfo link via virtual
method (to make it easy to introduce a new fields if necessary).

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Fix incorrect ifdef guard (#994)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 14 Aug 2018 05:04:13 +0000 (14:04 +0900)]
[coco] Fix incorrect ifdef guard (#994)

This commit fixes incorrect ifdef guard of FeatureObjectInfo.forward.h

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[nnkit] Type-generic Caffe Backend (#991)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 14 Aug 2018 04:52:06 +0000 (13:52 +0900)]
[nnkit] Type-generic Caffe Backend (#991)

This commit revises FloatCaffeBackend ans type-generic CaffeBackend.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Use consistent ifdef guard (#995)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 14 Aug 2018 04:51:57 +0000 (13:51 +0900)]
[coco] Use consistent ifdef guard (#995)

This commit updates inconsistent ifdef guards in coco IR headers.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Use consistent factory method name (#996)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 14 Aug 2018 04:51:47 +0000 (13:51 +0900)]
[coco] Use consistent factory method name (#996)

This commit renames make method in InputManager and OutputManage classes
as 'create' similarly as other manager classes.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Introduce KernelObjectInfo (#987)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 14 Aug 2018 02:35:04 +0000 (11:35 +0900)]
[coco] Introduce KernelObjectInfo (#987)

This commit introduces KernelObjectInfo class which will hold the
internal state of kernel objects in coco IR.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Introduce 'Conv2DTest' fixture (#988)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 14 Aug 2018 02:34:56 +0000 (11:34 +0900)]
[coco] Introduce 'Conv2DTest' fixture (#988)

This commit introduces 'Conv2DTest' fixture to simplify Conv2D op tests.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Introduce Instr fixtures (#989)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 14 Aug 2018 02:34:49 +0000 (11:34 +0900)]
[coco] Introduce Instr fixtures (#989)

This commit introduces InstrTest, FeatureInstrTest, UnifTTest classes
which includes common routines for writing tests.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[nnkit] Extract TensorContext (#992)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 14 Aug 2018 02:32:55 +0000 (11:32 +0900)]
[nnkit] Extract TensorContext (#992)

This commit extracts CaffeTensorContext (in nnkit Caffe backend) as
nnkit::support::caffe::TensorContext.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Introduce 'ObjectTest' fixture (#990)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 14 Aug 2018 02:32:48 +0000 (11:32 +0900)]
[coco] Introduce 'ObjectTest' fixture (#990)

This commit introduces 'ObjectTest' fixture which includes common
infrastructure for writing 'Object' tests.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[nnkit] Construct CaffeBackend from caffe::Net (#967)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 14 Aug 2018 02:01:50 +0000 (11:01 +0900)]
[nnkit] Construct CaffeBackend from caffe::Net (#967)

* [nnkit] Construct CaffeBackend from caffe::Net

Currently, the constructor of CaffeBackend takes arguments for
caffe::Net, and forwards it to internally allocated caffe::Net instance.

This commit revises CaffeBackend constructor to take an exteranlly
allocated caffe::Net instance as its argument.

This change allows us to construct a caffe backend from in-memory caffe
model (instead of serialized one).

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
* Remove unnecessary comment

5 years agoImprove command line parser and add unit tests for command line interface (#984)
Роман Михайлович Русяев/AI Tools Lab /SRR/Staff Engineer/삼성전자 [Mon, 13 Aug 2018 15:58:11 +0000 (18:58 +0300)]
Improve command line parser and add unit tests for command line interface (#984)

* command line parser is done
* add unit tests for testing options declaration and correct parsing

Signed-off-by: Roman Rusyaev <r.rusyaev@samsung.com>
5 years agoGeneralize options for soft backend (#923)
Efimov Alexander/AI Tools Lab/./Samsung Electronics [Mon, 13 Aug 2018 15:33:43 +0000 (18:33 +0300)]
Generalize options for soft backend (#923)

Replace specific file paths with output directory and common name

Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
5 years ago[nnc debug] Add internal documentation (#971)
Denis Maksimenko/AI Tools Lab /SRR/Assistant Engineer/삼성전자 [Mon, 13 Aug 2018 12:28:08 +0000 (15:28 +0300)]
[nnc debug] Add internal documentation (#971)

Added rst document desribing nnc debugging system.

Signed-off-by: Denis Maksimenko <d.maksimenko@partner.samsung.com>
5 years agoFix tflite Dims argument (#954)
Efimov Alexander/AI Tools Lab/./Samsung Electronics [Mon, 13 Aug 2018 12:18:18 +0000 (15:18 +0300)]
Fix tflite Dims argument (#954)

Reverse axis order for tflite functions.

Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
5 years agoShape inference unit test fix (#972)
Efimov Alexander/AI Tools Lab/./Samsung Electronics [Mon, 13 Aug 2018 10:25:24 +0000 (13:25 +0300)]
Shape inference unit test fix (#972)

Add absent dimensions into input data shape

Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
5 years ago[coco] Use std::set to record dependent objects (#968)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Mon, 13 Aug 2018 02:21:17 +0000 (11:21 +0900)]
[coco] Use std::set to record dependent objects (#968)

This commit revises Bag and BagInfo to use std::set (instead of PtrList)
to record dependent objects.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Simplify BlockManager tests (#956)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Mon, 13 Aug 2018 02:21:03 +0000 (11:21 +0900)]
[coco] Simplify BlockManager tests (#956)

This commit extracts the common routine in BlockManager tests, and
move it to a new test fxiture class (BlockManagerTest).

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years agointerpreter_plugin: fix segfault if input/output node not found (#950)
Vitaliy Cherepanov/AI Tools Lab /SRR/Engineer/삼성전자 [Fri, 10 Aug 2018 09:14:44 +0000 (12:14 +0300)]
interpreter_plugin: fix segfault if input/output node not found (#950)

add intput / output nodes checking

Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
5 years agointerpreter_plugin: fix input tensor initialization (#953)
Vitaliy Cherepanov/AI Tools Lab /SRR/Engineer/삼성전자 [Fri, 10 Aug 2018 09:14:10 +0000 (12:14 +0300)]
interpreter_plugin: fix input tensor initialization (#953)

add tensor and input file sizes checking

Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
5 years agoIR graph: Fix getInput/getOutput (#949)
Vitaliy Cherepanov/AI Tools Lab /SRR/Engineer/삼성전자 [Fri, 10 Aug 2018 09:13:38 +0000 (12:13 +0300)]
IR graph: Fix getInput/getOutput (#949)

add checking of map search results

Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
5 years agoFix output nodes search by name (#948)
Vitaliy Cherepanov/AI Tools Lab /SRR/Engineer/삼성전자 [Fri, 10 Aug 2018 09:12:59 +0000 (12:12 +0300)]
Fix output nodes search by name (#948)

fix problem when interpreter cannot find output node by name

Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
5 years ago Soft backend: eigen library (#841)
Efimov Alexander/AI Tools Lab/./Samsung Electronics [Fri, 10 Aug 2018 09:06:52 +0000 (12:06 +0300)]
 Soft backend: eigen library (#841)

Add library with common support functions for operations

Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
5 years ago[nnkit] Type-generic Caffe TensorContext (#966)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 10 Aug 2018 08:57:39 +0000 (17:57 +0900)]
[nnkit] Type-generic Caffe TensorContext (#966)

This commit revises FloatCaffeTensorContext in nnkit Caffe backend as a
type-generic one.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Non-public head method (#965)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 10 Aug 2018 08:57:30 +0000 (17:57 +0900)]
[coco] Non-public head method (#965)

This comit revises DLinkedLists:::Node to allow its descendent classes
to have non-public head method (The current design enforces head to be a
public method).

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Introduce FeatureObjectInfo (#964)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 10 Aug 2018 08:57:23 +0000 (17:57 +0900)]
[coco] Introduce FeatureObjectInfo (#964)

* [coco] Introduce FeatureObjectInfo

This commit introduce FeatureObjectInfo class which internally manages
mutable information related with each FeatureObject.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
* Use correct incorrect ifdef guard

5 years agoCmdline: add command line infrastructure (#952)
Роман Михайлович Русяев/AI Tools Lab /SRR/Staff Engineer/삼성전자 [Fri, 10 Aug 2018 08:18:49 +0000 (11:18 +0300)]
Cmdline: add command line infrastructure  (#952)

implementation of the following things:
* parser for command line;
* interface for creating options
* wrapper for unit tests

Signed-off-by: Roman Rusyaev <r.rusyaev@samsung.com>
5 years ago[coco] Introduce 'Arg' class (#960)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 10 Aug 2018 07:13:13 +0000 (16:13 +0900)]
[coco] Introduce 'Arg' class (#960)

* [coco] Introduce 'Arg' class

This commit introduces 'Arg' class which servers as a base class for
both Input and Output.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
* Use consistent declaration

5 years ago[coco] Remove deprecated Bag constructor (#963)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 10 Aug 2018 06:24:53 +0000 (15:24 +0900)]
[coco] Remove deprecated Bag constructor (#963)

This commit removes deprecated Bag object constructor.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Add 'curr' method to DLinkedList::Node (#961)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 10 Aug 2018 05:55:58 +0000 (14:55 +0900)]
[coco] Add 'curr' method to DLinkedList::Node (#961)

This commit introdcues 'curr' method which internally casts this as
Child, and replaces all the use of reinterpret_cast in Node
implementation with curr method.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Introduce FeatureObjectTest class (#959)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 10 Aug 2018 05:53:19 +0000 (14:53 +0900)]
[coco] Introduce FeatureObjectTest class (#959)

This commit revises FeatureObject-related tests using FeatureObjectTest
class.

This class provides some usefule utilities (such as allocate) for
writing tests.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Introduce KernelObjectTest (#962)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 10 Aug 2018 05:52:56 +0000 (14:52 +0900)]
[coco] Introduce KernelObjectTest (#962)

This commit introduces KernelObjectTest class which includes various
helper methods for writing KernelObject tests.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years agoDisable failing nnc test (#958)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 10 Aug 2018 01:08:51 +0000 (10:08 +0900)]
Disable failing nnc test (#958)

This commit temporarily disables a part of failing nnc test to fix build
break.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Implement Op::parent method (#940)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 9 Aug 2018 23:00:15 +0000 (08:00 +0900)]
[coco] Implement Op::parent method (#940)

This commit implements Op::parent method which allows users to retrieve
an instruction that owns an operation.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Update OpLink on UnitF::op update (#939)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 9 Aug 2018 22:59:39 +0000 (07:59 +0900)]
[coco] Update OpLink on UnitF::op update (#939)

This commit revises UnitF::op method to update OpLink properly.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Introduce ObjectInfo (#938)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 9 Aug 2018 22:57:27 +0000 (07:57 +0900)]
[coco] Introduce ObjectInfo (#938)

This commit introduces ObjectInfo class, and revises ObjectManager to
take Object -> ObjectInfo link on construction.

This is the first step toward support automatic object def/use updates.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years agoBugfix: tests for auto dimension reshape (#857)
Efimov Alexander/AI Tools Lab/./Samsung Electronics [Wed, 8 Aug 2018 13:35:35 +0000 (16:35 +0300)]
Bugfix: tests for auto dimension reshape (#857)

Add undefined dimension constant and more tests for shape inference

Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
5 years ago[nnc] Fix Caffe Concat operator import (#924)
Dmitry Mozolev/AI Tools Lab /SRR/Engineer/삼성전자 [Wed, 8 Aug 2018 13:23:36 +0000 (16:23 +0300)]
[nnc] Fix Caffe Concat operator import (#924)

Concat layer might not have a ConcatParameter section with it,
so it is only possible to recognize it by the name of the layer.

Signed-off-by: Dmitry Mozolev <d.mozolev@samsung.com>
5 years ago[nnc] Add doxygen configuration file (#914)
Dmitry Mozolev/AI Tools Lab /SRR/Engineer/삼성전자 [Wed, 8 Aug 2018 13:22:20 +0000 (16:22 +0300)]
[nnc] Add doxygen configuration file (#914)

This config is set to:
  - extract undocumented entities as well (for class diagrams etc)
  - extract private class members (for fuller documentation)
  - extract only C/C++ files

Signed-off-by: Dmitry Mozolev <d.mozolev@samsung.com>
5 years agoSoftbackend: move serialization out of ModelAnalyzer (#859)
Efimov Alexander/AI Tools Lab/./Samsung Electronics [Wed, 8 Aug 2018 13:20:56 +0000 (16:20 +0300)]
Softbackend: move serialization out of ModelAnalyzer (#859)

Check limits of char parameters properly,
split max and average pool in defferent calls,
serialize output shape where needed

Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
5 years ago[nnc testing] Move unit tests to a separate folder (#913)
Denis Maksimenko/AI Tools Lab /SRR/Assistant Engineer/삼성전자 [Wed, 8 Aug 2018 13:19:50 +0000 (16:19 +0300)]
[nnc testing] Move unit tests to a separate folder (#913)

Created unittests dir, moved nnc module tests there, created CMakeLists.txt for new directory and edited nnc CMakeLists.txt.

Signed-off-by: Denis Maksimenko <d.maksimenko@partner.samsung.com>
5 years ago[nnkit] Introduce nnkit_support_caffe (#936)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 8 Aug 2018 10:30:20 +0000 (19:30 +0900)]
[nnkit] Introduce nnkit_support_caffe (#936)

This commit extracts BlobContext and its descendents from nnkit Caffe
backend implementation as nnkit_support_caffe library.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Use OpManager for Instr test (#937)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 8 Aug 2018 10:04:41 +0000 (19:04 +0900)]
[coco] Use OpManager for Instr test (#937)

This commit removes DummyOp implementation from Instr test, and uses
OpManager to create an Op instance (which is required by UnitF::op
method tests).

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Pass OpLink to Op/Instr Manager (#935)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 8 Aug 2018 08:32:58 +0000 (17:32 +0900)]
[coco] Pass OpLink to Op/Instr Manager (#935)

This commit revises Op/Instr Manager to take OpLink on construction.

Note that OpLink passed ot Op/Instr Managers is not used, yet.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Enable format check (#932)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 8 Aug 2018 06:36:32 +0000 (15:36 +0900)]
[coco] Enable format check (#932)

This commit enables format check on coco.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Introduce Generic Data Context (#929)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 8 Aug 2018 05:44:21 +0000 (14:44 +0900)]
[coco] Introduce Generic Data Context (#929)

* [coco] Introduce Generic Data Context

This commit introduces generic data context, which allows any frontends
to deliver constand weight data to backends.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
* Fix GCC 4.9 build break

5 years ago[coco] Default constructible DLinkedList::Node (#926)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 8 Aug 2018 04:56:41 +0000 (13:56 +0900)]
[coco] Default constructible DLinkedList::Node (#926)

The current design of DLinkedList::Node enforces all of its descendent classes to
implement a consturctor that takes PtrLink, and passes it to its parent.

This restriction makes it difficult to introduce some intermediate
traists.

This commit revises DLinkedList::Node to remove this restriction.

The current design enforces only leaf classes to implement 'get' method.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco.generic] Generic Data Handling Library (#920)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 8 Aug 2018 01:14:01 +0000 (10:14 +0900)]
[coco.generic] Generic Data Handling Library (#920)

This commit introduces 'coco_generic' which provides various classes and
functions to deal with generic data (such as f32).

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Require reads and updates for Instr classes (#922)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 8 Aug 2018 01:00:53 +0000 (10:00 +0900)]
[coco] Require reads and updates for Instr classes (#922)

This commit requires all of Instr classes to implement reads and updates
methods which returns a set of Bags read/updated during execution.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years agoSoft backend: refactoring of artefact Shape class (#820)
Efimov Alexander/AI Tools Lab/./Samsung Electronics [Tue, 7 Aug 2018 14:15:14 +0000 (17:15 +0300)]
Soft backend: refactoring of artefact Shape class (#820)

Adjust artefact shape to implementation needs
Add more tests

Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
5 years ago[coco] Hide BagInfo from Users (#917)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 7 Aug 2018 10:42:04 +0000 (19:42 +0900)]
[coco] Hide BagInfo from Users (#917)

This commit rewrites 'Bag.h' to include 'BagInfo.forward.h' instead of
'BagInfo.h' in order to hide the implementation details of 'BagInfo'
from the users of 'Bag'.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[nest] Support Free Variable enumeration (#901)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 7 Aug 2018 10:18:44 +0000 (19:18 +0900)]
[nest] Support Free Variable enumeration (#901)

This commit introduces 'nest::FV' which allows us to collect free
variables in various nest objects such as expression.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[nnc debug] Add debugging system (#893)
Denis Maksimenko/AI Tools Lab /SRR/Assistant Engineer/삼성전자 [Tue, 7 Aug 2018 09:28:14 +0000 (12:28 +0300)]
[nnc debug] Add debugging system (#893)

 Add logging system implementation.
This initial commit adds header and source files with defined macros for debugging.

Signed-off-by: Denis Maksimenko <d.maksimenko@partner.samsung.com>
5 years ago[nnc] Remove unnecessary heap allocs in interpreter test (#916)
Dmitry Mozolev/AI Tools Lab /SRR/Engineer/삼성전자 [Tue, 7 Aug 2018 07:34:25 +0000 (10:34 +0300)]
[nnc] Remove unnecessary heap allocs in interpreter test (#916)

Changed unnecessary heap allocation for Interpreter and
ShapeInference objects to stack allocations.

Signed-off-by: Dmitry Mozolev <d.mozolev@samsung.com>
5 years ago[nnc] Fix float equality check in the interpreter test (#915)
Dmitry Mozolev/AI Tools Lab /SRR/Engineer/삼성전자 [Tue, 7 Aug 2018 07:34:09 +0000 (10:34 +0300)]
[nnc] Fix float equality check in the interpreter test (#915)

The problem was that the custom float comparing function wasn't
checking for some corner cases, like floats having a different
sign or being +0 and -0 (although this is very unlikely of course).

Signed-off-by: Dmitry Mozolev <d.mozolev@samsung.com>
5 years ago[caffegen] Add 'init' command (#918)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 7 Aug 2018 03:40:42 +0000 (12:40 +0900)]
[caffegen] Add 'init' command (#918)

This commit introduces 'init' command to caffegen. Unlike 'fill' command,
'init' uses Caffe itself to initialize parameters with random values.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Remove unnecessary Instr::ctor test (#919)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 7 Aug 2018 03:40:34 +0000 (12:40 +0900)]
[coco] Remove unnecessary Instr::ctor test (#919)

This commit removes Instr::ctor test as it currently tests methods
implemented in coco::DLinkedList<...>::Node.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Generate Instr boilerplates from list (#896)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 7 Aug 2018 00:53:10 +0000 (09:53 +0900)]
[coco] Generate Instr boilerplates from list (#896)

This commit generates Instr boilerplates such as casting methods,
visit method in Instr::Visitor, and mutate method in Instr::Mutator.

This change allows us to easily introduce new instructions.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years agoFix soft backend build (#909)
Efimov Alexander/AI Tools Lab/./Samsung Electronics [Mon, 6 Aug 2018 12:36:49 +0000 (15:36 +0300)]
Fix soft backend build (#909)

Fix build of soft backend plugins

Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
5 years ago[coco] Allows users to query Bag's type (#908)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Mon, 6 Aug 2018 06:10:21 +0000 (15:10 +0900)]
[coco] Allows users to query Bag's type (#908)

This commit introduces 'Bag::isInput' and 'Bag::isOutput' methods which
allows users to check Bag's type.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Update 'BagType' from Output (#895)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Mon, 6 Aug 2018 03:16:17 +0000 (12:16 +0900)]
[coco] Update 'BagType' from Output (#895)

Now, the changes on the backing bag of each 'Output' will automatically
updates 'BagType'.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[morph] Add 'NNAPI' support (#898)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Mon, 6 Aug 2018 02:30:55 +0000 (11:30 +0900)]
[morph] Add 'NNAPI' support (#898)

This commit implements shape conversion routines for Android NN API.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[morph] Introduce 'caffe' namespace (#899)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Mon, 6 Aug 2018 02:30:48 +0000 (11:30 +0900)]
[morph] Introduce 'caffe' namespace (#899)

This commit introdcues 'caffe' namespaces in order to avoid name conflicts.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years agoAdd interpreter test and Model IR graph creator that it uses (#872)
Dmitry Mozolev/AI Tools Lab /SRR/Engineer/삼성전자 [Fri, 3 Aug 2018 14:26:42 +0000 (17:26 +0300)]
Add interpreter test and Model IR graph creator that it uses (#872)

Graph creator can create a small Model IR graph consisting of an
input operator, and one other operator - the one being tested,
like Conv2D for example.

Signed-off-by: Dmitry Mozolev <d.mozolev@samsung.com>
5 years agoAdd serialized test info readers and tensor comparator (#871)
Dmitry Mozolev/AI Tools Lab /SRR/Engineer/삼성전자 [Fri, 3 Aug 2018 14:25:51 +0000 (17:25 +0300)]
Add serialized test info readers and tensor comparator (#871)

Added functions that use flatbuffers to get NN operator
parameters needed for Model IR graph construction, and a tensor
comparing function that acts as a GTest assert.

Signed-off-by: Dmitry Mozolev <d.mozolev@samsung.com>
5 years agoAdd nnc interpreter test main and test info schema (#869)
Dmitry Mozolev/AI Tools Lab /SRR/Engineer/삼성전자 [Fri, 3 Aug 2018 14:18:15 +0000 (17:18 +0300)]
Add nnc interpreter test main and test info schema (#869)

Added nnc interpreter test main file a flatbuffers schema
describing NN operator parameters needed for testing.

Signed-off-by: Dmitry Mozolev <d.mozolev@samsung.com>
5 years agoSoft backend: concat operation (#838)
Efimov Alexander/AI Tools Lab/./Samsung Electronics [Fri, 3 Aug 2018 14:17:51 +0000 (17:17 +0300)]
Soft backend: concat operation (#838)

Add implementation of tensor concatenation operation

Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
5 years ago Soft backend: pool operation (#835)
Efimov Alexander/AI Tools Lab/./Samsung Electronics [Fri, 3 Aug 2018 14:17:25 +0000 (17:17 +0300)]
 Soft backend: pool operation (#835)

Add implementation of pool operations

Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
5 years agoAdd nnc interpreter binary test data generator and serializer (#870)
Dmitry Mozolev/AI Tools Lab /SRR/Engineer/삼성전자 [Fri, 3 Aug 2018 12:09:39 +0000 (15:09 +0300)]
Add nnc interpreter binary test data generator and serializer (#870)

So far only normally distributed random tensors are supported.
Flatbuffers is used for serialization.

Signed-off-by: Dmitry Mozolev <d.mozolev@samsung.com>
5 years ago Soft Backend: capped relu operation (#837)
Efimov Alexander/AI Tools Lab/./Samsung Electronics [Fri, 3 Aug 2018 12:08:57 +0000 (15:08 +0300)]
 Soft Backend: capped relu operation (#837)

Add implementation of capped relu operation

Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
5 years ago Soft backend: fully connected operation (#836)
Efimov Alexander/AI Tools Lab/./Samsung Electronics [Fri, 3 Aug 2018 12:08:34 +0000 (15:08 +0300)]
 Soft backend: fully connected operation (#836)

Add implementation of fully connected operation

Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
5 years ago Soft backend: reshape operation (#834)
Efimov Alexander/AI Tools Lab/./Samsung Electronics [Fri, 3 Aug 2018 12:08:15 +0000 (15:08 +0300)]
 Soft backend: reshape operation (#834)

Add implementation of reshape operation

Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
5 years ago Soft backend: relu operation (#832)
Efimov Alexander/AI Tools Lab/./Samsung Electronics [Fri, 3 Aug 2018 12:07:53 +0000 (15:07 +0300)]
 Soft backend: relu operation (#832)

Add implementation of relu operation

Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
5 years ago Soft backend: bias operation (#831)
Efimov Alexander/AI Tools Lab/./Samsung Electronics [Fri, 3 Aug 2018 12:07:31 +0000 (15:07 +0300)]
 Soft backend: bias operation (#831)

Add implementation of bias add operation

Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
5 years agoSoft backend: softmax operation (#817)
Efimov Alexander/AI Tools Lab/./Samsung Electronics [Fri, 3 Aug 2018 12:07:07 +0000 (15:07 +0300)]
Soft backend: softmax operation (#817)

Add softmax operation in soft backend

Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
5 years agoSoft backend: depthwise convolution operation (#816)
Efimov Alexander/AI Tools Lab/./Samsung Electronics [Fri, 3 Aug 2018 12:06:45 +0000 (15:06 +0300)]
Soft backend: depthwise convolution operation (#816)

Add implementation of depthwise convolution operation

Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
5 years agoSoft backend: conv2d operation (#815)
Efimov Alexander/AI Tools Lab/./Samsung Electronics [Fri, 3 Aug 2018 12:06:19 +0000 (15:06 +0300)]
Soft backend: conv2d operation (#815)

Add Implementation of convolution operation in soft backend

Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
5 years ago[coco] Update 'BagType' from Input (#892)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 3 Aug 2018 07:42:59 +0000 (16:42 +0900)]
[coco] Update 'BagType' from Input (#892)

This commit revises 'Input' to update 'BagType' when it updates its
backing Bag.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Generate methods from Op.lst (#891)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 3 Aug 2018 06:02:26 +0000 (15:02 +0900)]
[coco] Generate methods from Op.lst (#891)

This commit revises 'Op' class to generate the implementation of casting methods
and 'accept' method from 'Op.lst' file, which allows us to easily extend operators.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Pass Bag Link to OutputManager (#889)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 3 Aug 2018 05:28:38 +0000 (14:28 +0900)]
[coco] Pass Bag Link to OutputManager (#889)

This commit revises the constructor of OutputManager to take Bag Link
(Bag to BagInfo map) as its argument.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Introduce 'Op::uses' method (#890)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 3 Aug 2018 03:01:17 +0000 (12:01 +0900)]
[coco] Introduce 'Op::uses' method (#890)

This commit introduces 'Op::uses' method which returns a set of objects
will be used during execution.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Pass Bag Link on the construction of InputManager (#888)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 3 Aug 2018 02:02:21 +0000 (11:02 +0900)]
[coco] Pass Bag Link on the construction of InputManager (#888)

This commit revises the constructor of InputManager to take Bag Link
(Bag to BagInfo map) as its argument.

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