platform/core/ml/nnfw.git
6 years ago[enco] Include NeuralNetworks.h (#1214)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 28 Aug 2018 23:51:49 +0000 (08:51 +0900)]
[enco] Include NeuralNetworks.h (#1214)

This commit revises enco to emit C++ code which includes
NeuralNetworks.h.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoMove High-Level Design Documentation to contrib/nnc (#1216)
Роман Михайлович Русяев/AI Tools Lab /SRR/Staff Engineer/삼성전자 [Tue, 28 Aug 2018 15:29:32 +0000 (18:29 +0300)]
Move High-Level Design Documentation to contrib/nnc (#1216)

* Move High-Level Design Document to contrib/nnc
* Move SW Requirement Specification Document to contrib/nnc
* Move all their dependencies to contrib/nnc

Signed-off-by: Roman Rusyaev <r.rusyaev@samsung.com>
6 years agoFix caffe blob import (#1211)
Efimov Alexander/AI Tools Lab/./Samsung Electronics [Tue, 28 Aug 2018 14:57:55 +0000 (17:57 +0300)]
Fix caffe blob import (#1211)

Replace copy of float into char array with float to float copy

Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
6 years agoPartial reorganize nnc file hierarchy (#1197)
Роман Михайлович Русяев/AI Tools Lab /SRR/Staff Engineer/삼성전자 [Tue, 28 Aug 2018 10:08:47 +0000 (13:08 +0300)]
Partial reorganize nnc file hierarchy (#1197)

* reorganize modelIR part: plugin/core/... -> core/modelIR

Signed-off-by: Roman Rusyaev <r.rusyaev@samsung.com>
6 years ago[enco] Append generated block (#1208)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 28 Aug 2018 09:28:25 +0000 (18:28 +0900)]
[enco] Append generated block (#1208)

The current implementation of caffe frontend generates a block, but does
not appends it to the block list.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[enco] Generate Subnet declaration (#1203)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 28 Aug 2018 07:22:26 +0000 (16:22 +0900)]
[enco] Generate Subnet declaration (#1203)

This commit implements SubnetStructBuilder which generates a helper
struct for accessing android NN sub-network.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoBuild caffeproto under externals (#1207)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 28 Aug 2018 07:08:43 +0000 (16:08 +0900)]
Build caffeproto under externals (#1207)

This commit revises CaffeProtoConfig.cmake to use a dedicated build directory
for libcaffeproto.so (under build/externals/caffeproto).

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[enco] Initilize Conv2D kernel overlay (#1206)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 28 Aug 2018 07:06:39 +0000 (16:06 +0900)]
[enco] Initilize Conv2D kernel overlay (#1206)

This commit revises caffe frontend to initialize Conv2D kernel overlay.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[enco] Build Android NN module (#1204)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 28 Aug 2018 07:06:26 +0000 (16:06 +0900)]
[enco] Build Android NN module (#1204)

This commit revises SplitPass to build andoird NN module for each
compatible block in the code under compilation.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoSuppress warnings by Caffe package (#1205)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 28 Aug 2018 06:58:51 +0000 (15:58 +0900)]
Suppress warnings by Caffe package (#1205)

This commit revises Caffe package not to report warnings when dependent
libraries (Boost, HDF5, Atlas) are missing.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoSuppress warning during configuration (#1202)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 28 Aug 2018 04:35:44 +0000 (13:35 +0900)]
Suppress warning during configuration (#1202)

The current implementation of 'CaffeProto' package shows unnecessary
warnings when libprotobuf is unavailable.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[enco] Introduce Split pass (#1200)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 28 Aug 2018 03:03:39 +0000 (12:03 +0900)]
[enco] Introduce Split pass (#1200)

This commit introduces Split pass which split a sequence of instructions
into a sequence of phases.

This Split pass marks aome of phases as Andoird NN compatible if all the
op/instruction in it have a correponds Andoird NN operation.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[enco] Support simple convolution IR generation (#1194)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 28 Aug 2018 00:57:35 +0000 (09:57 +0900)]
[enco] Support simple convolution IR generation (#1194)

With this commit, enco caffe frontend is now able to process convolution
layers that satisfy the following conditions:
- 2D convolution with no bias
- Padding is 0 for all the spatial axes
- Stride is 1 for all the spatial axes
- Dilation is 1 for all the spatial axes

Note that this commit does not pass kernel weight, yet.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[enco] Introduce caffe-based test framework (#1189)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 28 Aug 2018 00:50:17 +0000 (09:50 +0900)]
[enco] Introduce caffe-based test framework (#1189)

This commit implementes caffe-based random test framework for enco.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoFix bug when destructor of PluginManager throws exception (#1196)
Роман Михайлович Русяев/AI Tools Lab /SRR/Staff Engineer/삼성전자 [Mon, 27 Aug 2018 15:26:59 +0000 (18:26 +0300)]
Fix bug when destructor of PluginManager throws exception (#1196)

* mark destructor as noexcept(false)
* write unittest to test that destructor throws exception correctly
* not to throw exception from destructor if stack is unwinding

Signed-off-by: Roman Rusyaev <r.rusyaev@samsung.com>
6 years agoFix buffer overflow bug in unit test (#1193)
Роман Михайлович Русяев/AI Tools Lab /SRR/Staff Engineer/삼성전자 [Mon, 27 Aug 2018 09:55:34 +0000 (12:55 +0300)]
Fix buffer overflow bug in unit test (#1193)

* add nullptr to end of argv and correct argc

Signed-off-by: Roman Rusyaev <r.rusyaev@samsung.com>
6 years ago[enco] Introduce ConvolutionSpec class (#1191)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Mon, 27 Aug 2018 09:51:17 +0000 (18:51 +0900)]
[enco] Introduce ConvolutionSpec class (#1191)

This commit introduces ConvolutionSpec class which allows us to infer
the shape of kernel and output feature map for a given shape of input
feature map.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[enco] Introduce NormalizePass (#1192)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Mon, 27 Aug 2018 09:36:07 +0000 (18:36 +0900)]
[enco] Introduce NormalizePass (#1192)

This commit introduces NormalizePass which inserts data reordering
(Shuffle) instructions to make each instruction/operation compatible
with Android NN API.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoPartial reorganization of project file hierarchy (#1187)
Роман Михайлович Русяев/AI Tools Lab /SRR/Staff Engineer/삼성전자 [Mon, 27 Aug 2018 07:44:34 +0000 (10:44 +0300)]
Partial reorganization of project file hierarchy (#1187)

* reorganize backend part: soft, interpreter
* reorganize driver and support
* create utils dir

Signed-off-by: Roman Rusyaev <r.rusyaev@samsung.com>
6 years ago[coco] Set default stride as 1 (#1188)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Mon, 27 Aug 2018 02:03:39 +0000 (11:03 +0900)]
[coco] Set default stride as 1 (#1188)

This commit revises Stride2D to use 1 as its default stride value.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[enco] Support Shuffle code generation (#1182)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Mon, 27 Aug 2018 02:03:27 +0000 (11:03 +0900)]
[enco] Support Shuffle code generation (#1182)

This commit implement Shuffle code generator which emits nested loops
that corresponds to a shuffle instruction.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoAdd negative axis number support in concat (#1186)
Efimov Alexander/AI Tools Lab/./Samsung Electronics [Fri, 24 Aug 2018 14:43:04 +0000 (17:43 +0300)]
Add negative axis number support in concat (#1186)

Adds support for negative axis indexing in concat operation

6 years ago[enco] Include functional in Driver (#1174)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 24 Aug 2018 08:47:27 +0000 (17:47 +0900)]
[enco] Include functional in Driver (#1174)

This commit inserts '#include <functional>' at the top of Driver.cpp to
fix a build break reported by the recent C++ compiler (g++ 8.X and clang++ 7.X).

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[enco] Introduce MemoryContext class (#1180)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 24 Aug 2018 07:54:13 +0000 (16:54 +0900)]
[enco] Introduce MemoryContext class (#1180)

This commit introduces MemoryContext class which manages expressions
that denote the base address and size of memory region dedicated to each
Bag.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoImport reference NN runtime (#1181)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 24 Aug 2018 07:53:37 +0000 (16:53 +0900)]
Import reference NN runtime (#1181)

This commit imports reference android NN runtime implementation.

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

This commit introduces DuplicatePass which eliminates a pair of
input/ouput that share the same bag as their underlying bag.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[nnkit] Mangle tensor names (#1173)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 24 Aug 2018 06:46:02 +0000 (15:46 +0900)]
[nnkit] Mangle tensor names (#1173)

This commit revises HDF5 export/import action to mangle tensor
names when it export into/import from a HDF5 file.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[enco] Emit missing return (#1178)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 24 Aug 2018 02:40:02 +0000 (11:40 +0900)]
[enco] Emit missing return (#1178)

Network_input_count and Network_output_count emitted by the current
implementation does not have "return".

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[enco] Emit input/output metadata API (#1176)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 24 Aug 2018 02:30:46 +0000 (11:30 +0900)]
[enco] Emit input/output metadata API (#1176)

With this commit, enco now emits the implementation of input/ouput
metadata API.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoIntroduce EXCLUDE option to add_subdirectories (#1156)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 24 Aug 2018 01:29:48 +0000 (10:29 +0900)]
Introduce EXCLUDE option to add_subdirectories (#1156)

Now, user can request add_subdirectories not to include some
directories.

Note that there is no change in the default behavior.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[enco] Process Input layer (#1158)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 24 Aug 2018 01:12:45 +0000 (10:12 +0900)]
[enco] Process Input layer (#1158)

This commit revises enco Caffe frontend to support Input layer.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[enco] Check the existence of in/out bag (#1154)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 24 Aug 2018 00:58:03 +0000 (09:58 +0900)]
[enco] Check the existence of in/out bag (#1154)

* [enco] Check the existence of in/out bag

The current design of enco NNAPI backend does not work if there is an
in/out bag.

This commit introduces a corresponding assert to make it easy to detect
such a case.

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

6 years ago[enco] Record Input/Output Shape metadata (#1153)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 24 Aug 2018 00:33:29 +0000 (09:33 +0900)]
[enco] Record Input/Output Shape metadata (#1153)

With this commit, generated C++ code includes the shape metadata of each
input and output.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agofix build bug: eliminate dependencies from external Shape (#1164)
Роман Михайлович Русяев/AI Tools Lab /SRR/Staff Engineer/삼성전자 [Thu, 23 Aug 2018 16:11:45 +0000 (19:11 +0300)]
fix build bug: eliminate dependencies from external Shape (#1164)

* remove redundant operator<<
* replace including shape headers

Signed-off-by: Roman Rusyaev <r.rusyaev@samsung.com>
6 years agoRefactor CLI options and output message (#1142)
Роман Михайлович Русяев/AI Tools Lab /SRR/Staff Engineer/삼성전자 [Thu, 23 Aug 2018 15:38:10 +0000 (18:38 +0300)]
Refactor CLI options and output message (#1142)

-  remove redundant option
-  correct output message in usage method

Signed-off-by: Roman Rusyaev <r.rusyaev@samsung.com>
6 years agoAdd .dot Model IR dumper (#1027)
Dmitry Mozolev/AI Tools Lab /SRR/Engineer/삼성전자 [Thu, 23 Aug 2018 15:32:45 +0000 (18:32 +0300)]
Add .dot Model IR dumper (#1027)

Allows to present Model IR graph as a graph in .dot format.

6 years ago[nnc] Save interpreter result (#941)
Ivan Vagin/AI Tools Lab /SRR/Engineer/삼성전자 [Thu, 23 Aug 2018 09:42:58 +0000 (12:42 +0300)]
[nnc] Save interpreter result (#941)

Added cli key to save interpreter result

6 years agoUpdate README.md about running nnc (#1141)
Роман Михайлович Русяев/AI Tools Lab /SRR/Staff Engineer/삼성전자 [Thu, 23 Aug 2018 08:58:52 +0000 (11:58 +0300)]
Update README.md about running nnc (#1141)

- update README.md
- correct overview for options
- replace tabs by spaces in option printing

Signed-off-by: Roman Rusyaev <r.rusyaev@samsung.com>
6 years ago[enco] Load model from files (#1152)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 23 Aug 2018 08:09:17 +0000 (17:09 +0900)]
[enco] Load model from files (#1152)

This commit revises caffe frontend to load prototxt and caffemodel from
disk.

Now users should provides these files as an argument.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[coco] Allow Input and Output to share the same bag (#1150)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 23 Aug 2018 07:05:03 +0000 (16:05 +0900)]
[coco] Allow Input and Output to share the same bag (#1150)

This commit revises coco IR to allow Input and Output to share the same
backing bag.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[enco] Record input/output names (#1151)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 23 Aug 2018 06:57:21 +0000 (15:57 +0900)]
[enco] Record input/output names (#1151)

With this commit, C++ code that enco generates allows users to get input/output
name via Network_input_name and Network_output_name API.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[enco] Enforce source code generation (#1149)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 23 Aug 2018 04:12:21 +0000 (13:12 +0900)]
[enco] Enforce source code generation (#1149)

This commit revises enco basic(000) testcase to always generate source
code.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[enco] Implement Caffe model import helpers (#1144)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 23 Aug 2018 04:05:59 +0000 (13:05 +0900)]
[enco] Implement Caffe model import helpers (#1144)

This commit implements 'from_txt' and 'from_bin' helper functions that
constructs caffe NetParameter from textual/binary input stream.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[ann] Import Android NN API header (#1147)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 23 Aug 2018 03:48:57 +0000 (12:48 +0900)]
[ann] Import Android NN API header (#1147)

This commit introduces 'ann_api' target which allow clients to access Android NN API
header.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[enco] Introduce Global vairable manager (#1140)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 23 Aug 2018 01:07:26 +0000 (10:07 +0900)]
[enco] Introduce Global vairable manager (#1140)

This commit introduces Global class which allows us to declare global
variables with its initial value.

The current implemenation supports global string decleration.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[enco] Introduce basic test (000) (#1139)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 23 Aug 2018 01:07:15 +0000 (10:07 +0900)]
[enco] Introduce basic test (000) (#1139)

This commit introduces the first enco test which enforces enco to
generates compilable C++ code (at least for empty model).

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agointerpreter: add intermediate operations result getter (#1112)
Vitaliy Cherepanov/AI Tools Lab /SRR/Engineer/삼성전자 [Wed, 22 Aug 2018 15:41:22 +0000 (18:41 +0300)]
interpreter: add intermediate operations result getter (#1112)

implemented getting results by node names

Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
6 years agoFix axis number for nonstandart shaped tensors (#1039)
Efimov Alexander/AI Tools Lab/./Samsung Electronics [Wed, 22 Aug 2018 15:23:10 +0000 (18:23 +0300)]
Fix axis number for nonstandart shaped tensors (#1039)

Set proper axis number for softmax and reshape opeartions for tensors with non 4 dimension shapes

6 years ago[nnc] Update DepthwiseConvolution interpreter test (#1032)
Dmitry Mozolev/AI Tools Lab /SRR/Engineer/삼성전자 [Wed, 22 Aug 2018 15:21:04 +0000 (18:21 +0300)]
[nnc] Update DepthwiseConvolution interpreter test (#1032)

Follow-up to #1030, now DepthwiseConv operation is tested
with a full 4D kernel.

6 years ago[nncc.foundation] Remove unused Exception class (#1131)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 22 Aug 2018 13:15:45 +0000 (22:15 +0900)]
[nncc.foundation] Remove unused Exception class (#1131)

This commit removes Exception class from nncc.foundation as there is no
code that use this class.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoAdd support of negative axis in softmax (#1117)
Efimov Alexander/AI Tools Lab/./Samsung Electronics [Wed, 22 Aug 2018 13:09:17 +0000 (16:09 +0300)]
Add support of negative axis in softmax (#1117)

Use negative parameter in softmax operation to count axises from last one

6 years ago[enco] Emit Network_???_count and Network_???_bind (#1138)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 22 Aug 2018 10:39:50 +0000 (19:39 +0900)]
[enco] Emit Network_???_count and Network_???_bind (#1138)

This commit revises C++ code emitter to emit the implementation of the
following functions:
 - Network_input_count
 - Network_input_bind
 - Network_output_count
 - Network_output_bind

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[coco] Introduce Stride2D (#1137)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 22 Aug 2018 10:32:32 +0000 (19:32 +0900)]
[coco] Introduce Stride2D (#1137)

This commit introduces Stirde2D class which records stride over 2D plane
(such as channels in a feature map).

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[enco] Dummy Caffe Frontend implementation (#1133)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 22 Aug 2018 09:36:38 +0000 (18:36 +0900)]
[enco] Dummy Caffe Frontend implementation (#1133)

This commit introduces Frontend class which inherits enco::Frontend.

In the current implementation, load method always returns empty
coco::Module and coco::Data instances.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[enco] Self-complete C++ code gen (#1134)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 22 Aug 2018 08:33:15 +0000 (17:33 +0900)]
[enco] Self-complete C++ code gen (#1134)

This commit revises C++ code generator to generate self-complete C++
code, which allows us to compile generated C++ code without any
dependency.

The current implementation includes "NeuralNetworks.h" (which is not
available yet), and emits Network_output_dim implementatation that
cannot be compiled.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[coco] Record Conv2D Padding (#1135)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 22 Aug 2018 08:32:53 +0000 (17:32 +0900)]
[coco] Record Conv2D Padding (#1135)

This commit revises Conv2D op to record required padding.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[enco] Caffe frontend template (#1130)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 22 Aug 2018 07:16:50 +0000 (16:16 +0900)]
[enco] Caffe frontend template (#1130)

This commit creates a workspace for Caffe frontend with basic template.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[enco] Invoke backend compile method from CLI (#1126)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 22 Aug 2018 07:12:51 +0000 (16:12 +0900)]
[enco] Invoke backend compile method from CLI (#1126)

This commit revises enco-cli to initiate compilation from loaded bundle
(that frontend generates).

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[enco] Introduce basic implementation of CppCode (#1128)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 22 Aug 2018 07:12:35 +0000 (16:12 +0900)]
[enco] Introduce basic implementation of CppCode (#1128)

This commit introduces basic implementation of CppCode which emits the
basic template of compiled artifact.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[enco] Introduce Backend basic implementation (#1127)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 22 Aug 2018 07:09:47 +0000 (16:09 +0900)]
[enco] Introduce Backend basic implementation (#1127)

This commit introduces the basic template of enco::Backend
implementation.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[coco] Introduce reorder in Arg (#1124)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 22 Aug 2018 07:05:44 +0000 (16:05 +0900)]
[coco] Introduce reorder in Arg (#1124)

This commit add reorder method to Arg to facilitate Frontend
implementation.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[nest] Fix conv2d example comments (#1123)
박세희/동작제어Lab(SR)/Principal Engineer/삼성전자 [Wed, 22 Aug 2018 07:04:13 +0000 (16:04 +0900)]
[nest] Fix conv2d example comments (#1123)

This will fix nest conv2d example comments about ifm, ker accessing.

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
6 years agoImplement compiler driver and redesign plugin system (#1103)
Роман Михайлович Русяев/AI Tools Lab /SRR/Staff Engineer/삼성전자 [Wed, 22 Aug 2018 06:52:50 +0000 (09:52 +0300)]
Implement compiler driver and redesign plugin system (#1103)

* improve command line parser a little bit
* implement compiler driver
* redesign plugin system:
  - eliminate redundant classes
  - search plugin by predefined paths
  - adapt cmake build system: installation of targets
* Remove redundant headers
* Set plugin name dependent on OS target
* Eliminate dependencies from nncc_foundation and nncc_core libraries

Signed-off-by: Roman Rusyaev <r.rusyaev@samsung.com>
6 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>
6 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

6 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>
6 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>
6 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>
6 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>
6 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

6 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

6 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

6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>