platform/core/ml/nnfw.git
5 years ago[enco] Introduce CppCode class (#1125)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 22 Aug 2018 05:36:12 +0000 (14:36 +0900)]
[enco] Introduce CppCode class (#1125)

This commit introduces CppCode class which encapsulates C++ code
emitter.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[enco] Introduce Code class (#1111)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 22 Aug 2018 04:16:37 +0000 (13:16 +0900)]
[enco] Introduce Code class (#1111)

* [enco] Introduce Code class

This commit introduces Code class which is a triple of coco::Module,
coco::Data, and ANNContext; One may regard this as an extended coco IR.

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

5 years ago[pp] Remove deprecated IndentedDocumentBuilder (#1120)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 22 Aug 2018 02:19:23 +0000 (11:19 +0900)]
[pp] Remove deprecated IndentedDocumentBuilder (#1120)

This commit removes deprecated IndentedDocumentBuilder from pp.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years agoAdd 'llvm' as external module (#1110)
박세희/동작제어Lab(SR)/Principal Engineer/삼성전자 [Wed, 22 Aug 2018 02:19:15 +0000 (11:19 +0900)]
Add 'llvm' as external module (#1110)

This commit adds 'llvm' as external module which provides compile/link options to use LLVM libraries.

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[coco] Introduce Padding2D class (#1121)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 22 Aug 2018 02:19:03 +0000 (11:19 +0900)]
[coco] Introduce Padding2D class (#1121)

This commit introduces Padding2D class which represents padding for
feature operations such as Conv2D.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Support Shuffle creation (#1108)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 22 Aug 2018 02:18:54 +0000 (11:18 +0900)]
[coco] Support Shuffle creation (#1108)

This commit allows InstrManager to create Shuffle instructions.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[nnc] tflite schema moved to separate target (#1092)
Ivan Vagin/AI Tools Lab /SRR/Engineer/삼성전자 [Tue, 21 Aug 2018 18:20:27 +0000 (21:20 +0300)]
[nnc] tflite schema moved  to separate target (#1092)

Moved tflite schema to separate target

5 years agoAdd stream operator for Shape (#1115)
Vitaliy Cherepanov/AI Tools Lab /SRR/Engineer/삼성전자 [Tue, 21 Aug 2018 18:11:43 +0000 (21:11 +0300)]
Add stream operator for Shape (#1115)

This commit adds stream operator for Shape

5 years agoAdd stream operator for Index (#1116)
Vitaliy Cherepanov/AI Tools Lab /SRR/Engineer/삼성전자 [Tue, 21 Aug 2018 18:10:19 +0000 (21:10 +0300)]
Add stream operator for Index (#1116)

This commit adds stream operator for Index

5 years agoMove Shape and Index classes to nnc (#1104)
Efimov Alexander/AI Tools Lab/./Samsung Electronics [Tue, 21 Aug 2018 14:09:40 +0000 (17:09 +0300)]
Move Shape and Index classes to nnc (#1104)

Move Shape, Index and all related support classes to nnc

Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
5 years ago[enco] Introduce ANNBinder and ANNContext (#1109)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 21 Aug 2018 06:36:36 +0000 (15:36 +0900)]
[enco] Introduce ANNBinder and ANNContext (#1109)

This commit introduces ANNBinder (which bridges coco::Block and
ann::Module) and ANNContext (which serves as a factory/tracker of
ANNContext).

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[enco] Introduce ANN IR Module class (#1107)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 21 Aug 2018 04:52:30 +0000 (13:52 +0900)]
[enco] Introduce ANN IR Module class (#1107)

This commit introduces ANN IR Module class which hosts all of ANN
Weight/Operand/Operations in it.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Introduce 'Shuffle' instruction (#1088)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 21 Aug 2018 04:41:29 +0000 (13:41 +0900)]
[coco] Introduce 'Shuffle' instruction (#1088)

This commit introduces 'Shuffle' instruction which allows us to express
data reordering in IR.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[enco] Introduce ANN OperationInventory (#1105)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 21 Aug 2018 01:44:14 +0000 (10:44 +0900)]
[enco] Introduce ANN OperationInventory (#1105)

This commit introduces ANN OperationInventory which stores a sequence of
operations in ANN IR.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years agoAdd llvm 6.0 to CI docker image (#1086)
박세희/동작제어Lab(SR)/Principal Engineer/삼성전자 [Mon, 20 Aug 2018 23:39:57 +0000 (08:39 +0900)]
Add llvm 6.0 to CI docker image (#1086)

This will add llvm 6.0 dev binaries to CI docker image.
- builds llvm 6.0 from source
- use docker multi-stage to reduce image size

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[nncc.core.ADT] Overload == over kernel shape (#1053)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Mon, 20 Aug 2018 23:33:19 +0000 (08:33 +0900)]
[nncc.core.ADT] Overload == over kernel shape (#1053)

This commit introduces '==' operator overloading for kernel shape
instances.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[enco] Introduce ANN WeightInventory class (#1096)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Mon, 20 Aug 2018 23:18:30 +0000 (08:18 +0900)]
[enco] Introduce ANN WeightInventory class (#1096)

This commit introduces ANN WeightInventory class which serves as a
factory and tracker of all the Weight instances.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[enco] Introduce ANN OperandInventory (#1095)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Mon, 20 Aug 2018 23:18:18 +0000 (08:18 +0900)]
[enco] Introduce ANN OperandInventory (#1095)

This commit introduces ANN OperandInventory class which serves as a
factory and tracker of ANN Operand instances.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[enco] Introduce ANN 'Operation' class (#1094)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Mon, 20 Aug 2018 23:18:06 +0000 (08:18 +0900)]
[enco] Introduce ANN 'Operation' class (#1094)

This commit introduces 'Operation' class for Android NN IR that enco
internally uses.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years agoType command line checker functions more precisely (#1100)
Efimov Alexander/AI Tools Lab/./Samsung Electronics [Mon, 20 Aug 2018 17:28:58 +0000 (20:28 +0300)]
Type command line checker functions more precisely (#1100)

Replaces BaseOption in argument of checkers with actual option types

Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
5 years ago[nnc debug] Add command line options (#1079)
Denis Maksimenko/AI Tools Lab /SRR/Assistant Engineer/삼성전자 [Mon, 20 Aug 2018 16:58:16 +0000 (19:58 +0300)]
[nnc debug] Add command line options (#1079)

Add options to enable nnc_debug. They will be processed later by compiler driver.

Signed-off-by: Denis Maksimenko <d.maksimenko@partner.samsung.com>
5 years ago Soft backend: unit tests for C++ operations (#946)
Efimov Alexander/AI Tools Lab/./Samsung Electronics [Mon, 20 Aug 2018 15:35:28 +0000 (18:35 +0300)]
 Soft backend: unit tests for C++ operations (#946)

Add implementation of unittests for operations

Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
5 years ago[enco] Introduce ANN Operand classes (#1093)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Mon, 20 Aug 2018 09:38:38 +0000 (18:38 +0900)]
[enco] Introduce ANN Operand classes (#1093)

This commit introduces ANN Operand classes (Scalar/Tensor) for plain
(non-quantized) operations.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[nnkit] Add caffe section to README (#1080)
Denis Maksimenko/AI Tools Lab /SRR/Assistant Engineer/삼성전자 [Mon, 20 Aug 2018 08:06:45 +0000 (11:06 +0300)]
[nnkit] Add caffe section to README (#1080)

* Add caffe section to README.

Added "Running with Caffe backend" section to nnkit README file.

Signed-off-by: Denis Maksimenko <d.maksimenko@partner.samsung.com>
* Remove excessive newline.

Remove excessive newline to follow document style better.

Signed-off-by: Denis Maksimenko <d.maksimenko@partner.samsung.com>
* Changes.

Changed filename and added info that `caffemodel` is unnecessary.

Signed-off-by: Denis Maksimenko <d.maksimenko@partner.samsung.com>
* Clarify usage.

Add clarification on `caffemodel` file necessity.

Signed-off-by: Denis Maksimenko <d.maksimenko@partner.samsung.com>
5 years ago[enco] Introduce ANN Weight class (#1091)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Mon, 20 Aug 2018 07:55:17 +0000 (16:55 +0900)]
[enco] Introduce ANN Weight class (#1091)

This commit introduces ANN Weight class which will hold initial data for
a specific operand.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[enco] Introduce ANN Operand ID (#1090)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Mon, 20 Aug 2018 07:55:10 +0000 (16:55 +0900)]
[enco] Introduce ANN Operand ID (#1090)

This commit introduces 'ann::OperandID' class to denote an
operand in Android NN network in a type-safe way.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[enco] Introduce Andoird NN DataType enum (#1089)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Mon, 20 Aug 2018 07:21:02 +0000 (16:21 +0900)]
[enco] Introduce Andoird NN DataType enum (#1089)

This commit introduces Android NN DataType enum, which is a part of ANN
IR that enco internally uses.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[enco] Introduce 'core' library (#1087)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Mon, 20 Aug 2018 05:19:31 +0000 (14:19 +0900)]
[enco] Introduce 'core' library (#1087)

This commit introduces enco core library which will hosts Android NN API
backend implementation.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Introduce Update Hook & Slot (#1077)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Mon, 20 Aug 2018 02:48:15 +0000 (11:48 +0900)]
[coco] Introduce Update Hook & Slot (#1077)

This commit introduces 'UpdateHook' and 'UpdateSlot' classes to make it
easy to implement an instruction that directly updates Bag.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years agoAdd nullpointer check in Model IR Node input connection (#1078)
Юрий Новиков/AI Tools Lab /SRR/Assistant Engineer/삼성전자 [Fri, 17 Aug 2018 14:48:33 +0000 (17:48 +0300)]
Add nullpointer check in Model IR Node input connection (#1078)

Pointer returned from function 'dynamic_cast' at ir_node.cpp:23 may be null, and it is dereferenced at ir_node.cpp:23.

fix #1071

Signed-off-by: y.novikov <y.novikov@partner.samsung.com>
5 years agoUse const ptr instead passing by value (#1065)
Юрий Новиков/AI Tools Lab /SRR/Assistant Engineer/삼성전자 [Fri, 17 Aug 2018 14:38:08 +0000 (17:38 +0300)]
Use const ptr instead passing by value (#1065)

Passing structures of such size by value can lead
to unnecessary performance loss.

Signed-off-by: y.novikov <y.novikov@partner.samsung.com>
5 years agoSoft backend: support new format of kernel in depthwise convolution (#1064)
Efimov Alexander/AI Tools Lab/./Samsung Electronics [Fri, 17 Aug 2018 09:57:21 +0000 (12:57 +0300)]
Soft backend: support new format of kernel in depthwise convolution (#1064)

Adds proper support of 4-dimensional kernel in depthwise operation

Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
5 years agoFix softmax axis inporting in TF lite (#1038)
Efimov Alexander/AI Tools Lab/./Samsung Electronics [Fri, 17 Aug 2018 07:38:21 +0000 (10:38 +0300)]
Fix softmax axis inporting in TF lite (#1038)

Set softmax axis to 1 in case of fully connected layer before it

Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
5 years ago[coco] Pass BagLink to InstrManager (#1076)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 17 Aug 2018 07:29:32 +0000 (16:29 +0900)]
[coco] Pass BagLink to InstrManager (#1076)

This commit revises InstrManager to take BagLink as an argument on
construction. BagLink is necessary for bag reading/updating instruction
creation.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Introduce Read Hook & Slot (#1075)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 17 Aug 2018 07:29:24 +0000 (16:29 +0900)]
[coco] Introduce Read Hook & Slot (#1075)

This commit introduces Read Hook & Slot classes which makes is easy to
implement direct Bag reading instruction.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years agoFix docker argument checking (#1074)
박세희/동작제어Lab(SR)/Principal Engineer/삼성전자 [Fri, 17 Aug 2018 06:33:30 +0000 (15:33 +0900)]
Fix docker argument checking (#1074)

This will fix docker argument check and execution
- 'echo' and 'sed' was executed regardless of variable settings

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[coco] Record direct bag read/update (#1073)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 17 Aug 2018 05:13:03 +0000 (14:13 +0900)]
[coco] Record direct bag read/update (#1073)

This commit extends BagInfo to record direct (not through Object) bag
read/update.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[enco] Initial commit (#1072)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 17 Aug 2018 05:12:54 +0000 (14:12 +0900)]
[enco] Initial commit (#1072)

This commit creates 'enco' project; NN model-to-Android NN API
transpiler based on Coco IR.

This commit includes README.md and the core implementation of enco CLI.

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

This commit introduces Locatable interface, which allows us to get a
location (as an instruction) on the code; This class serves as a base
class for Bag::Read, Bag::Update, Object::Def, and Object::Use.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Implement bag update in Arg (#1057)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 17 Aug 2018 00:39:49 +0000 (09:39 +0900)]
[coco] Implement bag update in Arg (#1057)

This commit moves Bag update implementation from Input/Output into Arg.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years agointerpreter plugin: Fix segfaut on tensor loading (#1035)
Vitaliy Cherepanov/AI Tools Lab /SRR/Engineer/삼성전자 [Thu, 16 Aug 2018 12:11:20 +0000 (15:11 +0300)]
interpreter plugin: Fix segfaut on tensor loading (#1035)

Add check result for fopen

Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
5 years ago[coco] Remove Conv2D::Param struct (#1054)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 16 Aug 2018 10:20:17 +0000 (19:20 +0900)]
[coco] Remove Conv2D::Param struct (#1054)

This commit removes Conv2D::Param struct, and revises OpManager::create method
similarly as InstrManager::create method.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Share mock-up Def class (#1056)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 16 Aug 2018 09:49:02 +0000 (18:49 +0900)]
[coco] Share mock-up Def class (#1056)

DefHook/DefSlot tests include their own mock-up Def class. This commit
extracts these mock-up Def class as shared one.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Share mock-up Use class (#1055)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 16 Aug 2018 09:47:59 +0000 (18:47 +0900)]
[coco] Share mock-up Use class (#1055)

This commit extracts mock-up Use class from UseHook/UseSlot tests, and
shares the extracted one for both tests.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Update Object Def/Use from FeatureInstr (#1050)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 16 Aug 2018 08:05:17 +0000 (17:05 +0900)]
[coco] Update Object Def/Use from FeatureInstr (#1050)

This commit revises FeatureInstr to support automatic update of def/use
of its IFM/OFM object.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Record Bag Read/Update set (#1052)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 16 Aug 2018 07:50:17 +0000 (16:50 +0900)]
[coco] Record Bag Read/Update set (#1052)

This commit introduce Bag::Read and Bag::Update class which allows us to
query the location of Bag reads and updates.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Automatic update Kernel Object's user list (#1049)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 16 Aug 2018 06:49:58 +0000 (15:49 +0900)]
[coco] Automatic update Kernel Object's user list (#1049)

This commit revises Conv2D op class to automatically update kernel object's
user list on ker method call.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Introduce DefSlot<T> (#1048)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 16 Aug 2018 05:06:41 +0000 (14:06 +0900)]
[coco] Introduce DefSlot<T> (#1048)

This commit introduces DefSlot template class which make it easy to
declare Object-defining entities such Instr.

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

This commit introduces UseSlot<T> template class which make it easy to
declare Object-using entities such as Op and Instr.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Move ObjectManager into Conv2DTest class (#1046)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 16 Aug 2018 04:50:07 +0000 (13:50 +0900)]
[coco] Move ObjectManager into Conv2DTest class (#1046)

This commit moves ObjectManager-related instance declarations from
ker_update testcase into Conv2DTest fixture.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Introduce DefHook (#1045)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 16 Aug 2018 04:33:25 +0000 (13:33 +0900)]
[coco] Introduce DefHook (#1045)

This commit introduces DefHook class which encapsulates necessary
actions on Def Object updates.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Expose Object def/user information (#1044)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 16 Aug 2018 04:31:40 +0000 (13:31 +0900)]
[coco] Expose Object def/user information (#1044)

This commit allows users to access Object def/user information recorded in
ObjectInfo through Object entities.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Introduce UseHook (#1042)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 16 Aug 2018 04:29:36 +0000 (13:29 +0900)]
[coco] Introduce UseHook (#1042)

This commit introduces UseHook, which encapsulates ObjectInfo update
routines on Object usage changes.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Update Object Link on Object Creation (#1041)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 16 Aug 2018 01:53:32 +0000 (10:53 +0900)]
[coco] Update Object Link on Object Creation (#1041)

This commit revises ObjectManager to update Object Link on object
creation.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Use common UnitF allocation routine (#1040)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 16 Aug 2018 01:30:24 +0000 (10:30 +0900)]
[coco] Use common UnitF allocation routine (#1040)

This commit extracts common UnitF allocation routine in UnitF tests as
'allocate' helper method.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[nnkit] Caffe-based nnsuite conv backend (#1006)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 16 Aug 2018 01:17:17 +0000 (10:17 +0900)]
[nnkit] Caffe-based nnsuite conv backend (#1006)

This commit introduces Caffe-based nnsuite conv backend. This backend
serves as a oracle for Caffe-compatible compiled artifacts.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[coco] Record Def/Use(s) in ObjectInfo (#1007)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 16 Aug 2018 00:50:27 +0000 (09:50 +0900)]
[coco] Record Def/Use(s) in ObjectInfo (#1007)

This commit introduces Def/Use fields in ObjectInfo. Note that
this commit justs introduces fields, and does not include any update
code.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years agoSoft backend: fix fully connected layer (#1015)
Efimov Alexander/AI Tools Lab/./Samsung Electronics [Wed, 15 Aug 2018 16:53:49 +0000 (19:53 +0300)]
Soft backend: fix fully connected layer (#1015)

Fixes serialization of fully connected parameters

Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
5 years agoSoft backend: fix pooling operation (#1028)
Efimov Alexander/AI Tools Lab/./Samsung Electronics [Wed, 15 Aug 2018 16:53:32 +0000 (19:53 +0300)]
Soft backend: fix pooling operation (#1028)

Rearrange window, strides and padding dimensions

Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
5 years agoPartial redesign plugins system and add usage of new CLI (#1029)
Роман Михайлович Русяев/AI Tools Lab /SRR/Staff Engineer/삼성전자 [Wed, 15 Aug 2018 16:53:16 +0000 (19:53 +0300)]
Partial redesign plugins system and add usage of new CLI (#1029)

* improve command line infrastructure:
  - add new parameter (checker) in Option class
* replace all uses by new CLI
* partial redesign plugins system

Signed-off-by: Roman Rusyaev <r.rusyaev@samsung.com>
5 years ago[nnc] Support depthwise conv channel multiplier in interpreter (#1030)
Dmitry Mozolev/AI Tools Lab /SRR/Engineer/삼성전자 [Wed, 15 Aug 2018 16:52:38 +0000 (19:52 +0300)]
[nnc] Support depthwise conv channel multiplier in interpreter (#1030)

Now depthwise convolution in interpreter supports 4D kernels.

Signed-off-by: Dmitry Mozolev <d.mozolev@samsung.com>
5 years agoSoft backend: fix conv operations (#1013)
Efimov Alexander/AI Tools Lab/./Samsung Electronics [Wed, 15 Aug 2018 13:49:53 +0000 (16:49 +0300)]
Soft backend: fix conv operations (#1013)

Fixes convolution 2d operation in soft backend

Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
5 years agonnc: Fix Caffe output node names (#1024)
Vitaliy Cherepanov/AI Tools Lab /SRR/Engineer/삼성전자 [Wed, 15 Aug 2018 12:53:46 +0000 (15:53 +0300)]
nnc: Fix Caffe output node names (#1024)

This commit fix interpreting problem
based on wrong IR output nodes names

Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
5 years ago[nnc] TFlite import: Implement FullyConnected (#1012)
Denis Maksimenko/AI Tools Lab /SRR/Assistant Engineer/삼성전자 [Wed, 15 Aug 2018 12:13:51 +0000 (15:13 +0300)]
[nnc] TFlite import: Implement FullyConnected  (#1012)

TFlite importer can now handle FullyConnected op.

Signed-off-by: Denis Maksimenko <d.maksimenko@partner.samsung.com>
5 years ago[nnc debug] Update debug format in sources (#943)
Denis Maksimenko/AI Tools Lab /SRR/Assistant Engineer/삼성전자 [Wed, 15 Aug 2018 11:42:16 +0000 (14:42 +0300)]
[nnc debug] Update debug format in sources (#943)

Changed format used for debugging in most files.

Signed-off-by: Denis Maksimenko <d.maksimenko@partner.samsung.com>
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>