박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 4 Sep 2018 02:20:15 +0000 (11:20 +0900)]
[enco.caffe] Initial PoolingSpec implementation (#1312)
This commit submits the initial implementation of PoolingSpec.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 4 Sep 2018 02:18:00 +0000 (11:18 +0900)]
[coco] Configurable MaxPool2D window size (#1313)
This commit introduces a field and methods related with window (=
receptive field) configuration.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 4 Sep 2018 01:51:13 +0000 (10:51 +0900)]
[enco] Extract string-manipulating rotuines (#1311)
This commit extracts concat method (for string manipulation) from
Subnet.cpp, and introduces String.h for future reuse.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 4 Sep 2018 01:25:53 +0000 (10:25 +0900)]
[coco] Create MaxPool2D with OpManager (#1310)
This commit implements 'create' method for 'MaxPool2D' op in
'OpManager'.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 4 Sep 2018 00:26:47 +0000 (09:26 +0900)]
[coco] Introduce MaxPool2D class (#1307)
This commit introduces MaxPool2D class which allows coco IR to describe
MAX pooling over feature maps.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 4 Sep 2018 00:11:16 +0000 (09:11 +0900)]
[enco] Add 006 test (#1306)
This commit adds 006 testcase which includes a simple ReLU layer in it.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Mon, 3 Sep 2018 23:24:52 +0000 (08:24 +0900)]
[enco] Build ANN ReLU operator (#1298)
This commit revises ANNGroupBuilder and ANNOpBuilder to recognize ReLU
operation.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Mon, 3 Sep 2018 23:24:40 +0000 (08:24 +0900)]
[enco] Emit ReLU opcode (#1297)
enco is now able to generate ANeuralNetworks_addOperation call for
RELU operator.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박세희/동작제어Lab(SR)/Principal Engineer/삼성전자 [Mon, 3 Sep 2018 23:24:18 +0000 (08:24 +0900)]
[enco] Suppress caffe test glog messages (#1287)
This will suppress enco caffe test glog messages while in build steps.
Error and Fatal will be shown.
Signed-off-by: SaeHie Park <saehie.park@samsung.com>
Support for grouped convolution for caffe (#1209)
Adds support for grouped convolution in caffe: fix kernel tensor on shape inference
Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
Update HLD, SRS, and DLD documentation (#1304)
* include content from rst file into one
* remove redundant rst files
* correct reference to image
Signed-off-by: Roman Rusyaev <r.rusyaev@samsung.com>
Update DLD by adding of ModelIR, C++ backend, Caffe backend, CLI description (#1286)
Added description of:
* model IR
* soft backend
* caffe importer
* command line interface
Signed-off-by: Roman Rusyaev <r.rusyaev@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Mon, 3 Sep 2018 05:47:35 +0000 (14:47 +0900)]
[coco] Introduce Window2D class (#1296)
This commit introduces Window2D class which denotes the size of
receptive field that some spatial operator (such as Pooling) uses.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Mon, 3 Sep 2018 05:47:22 +0000 (14:47 +0900)]
[enco] Introduce ReLU op to ANN IR (#1294)
This commit introduces RELU tag to ann::Operation::Code enumeration.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Mon, 3 Sep 2018 05:47:11 +0000 (14:47 +0900)]
[enco] Genernally normalize feature layout (#1293)
The current implementation of NormalizePass applies feature layout
normalization only for Conv2D operation.
With this commit, NormalizePass normalizes feature layout for general
feature operation (including ReLU).
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Mon, 3 Sep 2018 05:47:02 +0000 (14:47 +0900)]
[enco.caffe] Build IR from ReLU layer (#1292)
This commit implements the initial implementation of IR builder for ReLU
layer.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Mon, 3 Sep 2018 02:32:31 +0000 (11:32 +0900)]
[enco] Add kernel_h/kernel_w convolution test (#1291)
This commit adds caffe 005 test which includes a convolution layer that
specifies its kernel size using kernel_h and kernel_w, and enables
build/inference test.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Mon, 3 Sep 2018 02:03:55 +0000 (11:03 +0900)]
[coco] Extend OpManager for ReLU op (#1278)
This commit implements create<ReLU> method, which allows us to create
ReLU instances via OpManager.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Mon, 3 Sep 2018 01:56:15 +0000 (10:56 +0900)]
[refNN] Support ReLU operator (#1290)
This commit imports ReLU operator-related implementations into the
reference NN runtime.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Mon, 3 Sep 2018 01:38:07 +0000 (10:38 +0900)]
[enco.caffe] Support kernel_h/kernel_w paramaters (#1289)
With this commit, ConvolutionSpec is now able to recoginize kernel_h and
kernel_w parameters.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Mon, 3 Sep 2018 01:10:48 +0000 (10:10 +0900)]
[enco] Asymmetrically padded convolution test (#1276)
This commit adds 004 test which includes asymmetrically padded
convolution layer, and enables build/inference test.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Mon, 3 Sep 2018 01:10:01 +0000 (10:10 +0900)]
[enco] Symmetrically padded convolution test (#1274)
This commit adds a 003 test which includes symmetrically padded
convolution layer.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
Remove redundant curly brace (#1282)
remove redundant curly brace when initialization of cmake variable
Signed-off-by: Roman Rusyaev <r.rusyaev@samsung.com>
Closing files in interpreter`s plugin and cpp operations (#1185)
Add closing of files in interpreter_plugin.cpp and cpp_operations.def. Also checking for error codes was made.
Signed-off-by: y.novikov <y.novikov@partner.samsung.com>
Fix build bugs: not enabled target if its dependent targets are unavailable (#1258)
Targets for tests won't be built if main targets aren't set
Signed-off-by: Roman Rusyaev <r.rusyaev@samsung.com>
Not enable frontend plugins if their dependencies aren't set (#1279)
* frontend plugins won't be enabled if their dependencies aren't set
* added feature to disable command line options. It is needed to
disable plugin options if plugins aren't available
Signed-off-by: Roman Rusyaev <r.rusyaev@samsung.com>
Move Detailed Level Design Documentation to contrib/nnc (#1281)
* move rst file
* correct references in file: replace .md by .rst
Signed-off-by: Roman Rusyaev <r.rusyaev@samsung.com>
남궁석/동작제어Lab(SR)/Engineer/삼성전자 [Fri, 31 Aug 2018 14:39:09 +0000 (23:39 +0900)]
Update getting_started document for docker (#1267)
Docker build for _nncc_ use multistage-build
However multistage-build require docker 17.05 or higher version
This commit will update this information
Signed-off-by: Seok NamKoong <sk.namkoong@samsung.com>
Correct paths where plugins are to be searched (#1280)
* now it's not necessary to run make install
* now plugins are searched by relative path
Signed-off-by: Roman Rusyaev <r.rusyaev@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 31 Aug 2018 08:35:37 +0000 (17:35 +0900)]
[CaffeProto] Do NOT generate files at top-level (#1273)
CaffeProto package currently places generated protobuf files into the
top-level binary directory.
With this commit, generated protobufe files are inside a directory
dedicated to caffeproto target (external/caffeproto).
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 31 Aug 2018 08:35:24 +0000 (17:35 +0900)]
[coco] Add ReLU operator (#1272)
This commit introduces ReLU op class which denotes a ReLU op in coco IR.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 31 Aug 2018 08:33:39 +0000 (17:33 +0900)]
[enco.caffe] Deliver Conv2D padding values via IR (#1271)
With this commit, enco Caffe frontend now sets Conv2D padding values
correctly in IR.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 31 Aug 2018 06:28:35 +0000 (15:28 +0900)]
[enco.core] Use DefaultVisitor (#1269)
The use of Op::Visitor and Instr::Visitor in enco.core enforces us to
update enco whenever a new operator is introduced to coco IR.
To decouple changes on enco from thone on coco, this commit revises
enco core library to use DefaultVisitor instead of Visitor.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 31 Aug 2018 06:24:30 +0000 (15:24 +0900)]
[enco] Read pad from ConvolutionParameter (#1268)
* [enco] Read pad from ConvolutionParameter
This commit revises ConvolutionSpec to read pad values from
ConvolutionParameter.
Note that 'pad_h' and 'pad_w' parameters are not supported, yet.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
* Fix typos (stride_h -> pad_h, stride_w -> pad_w)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 31 Aug 2018 04:20:43 +0000 (13:20 +0900)]
[enco] Set Conv2D padding for ANN Subnet (#1264)
The current implementation assumes that padding is always 0. With this commit,
enco now sets Conv2D padding based on padding parameters that IR
provides.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 31 Aug 2018 04:20:03 +0000 (13:20 +0900)]
[enco] Add ConvolutionSpec::ifm_shape test (#1266)
This commit extracts repeated tests over ifm_shape as a seperate test.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 31 Aug 2018 04:18:44 +0000 (13:18 +0900)]
[enco] Add symmetrically strided convolution test (#1265)
This commit adds 002 testcase which tests symmetrically strided
convolution, and enables build/inference test.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 31 Aug 2018 04:16:10 +0000 (13:16 +0900)]
[core] Remove deprecated PadInfo and StrideInfo (#1263)
This commit removes deprecated PadInfo and StrideInfo classes from
nncc.core.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 31 Aug 2018 00:56:50 +0000 (09:56 +0900)]
[enco] Extract CanonicalChannelAxis (#1259)
This commit extracts CanonicalChannelAxis class from ConvolutionSpec to
make it reusable from outside.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 31 Aug 2018 00:52:43 +0000 (09:52 +0900)]
[enco.caffe] Set Conv2D stride (#1256)
With this commit, enco Caffe frontend now sets strides for Conv2D op
entity.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 31 Aug 2018 00:29:19 +0000 (09:29 +0900)]
[nnop] Use internal PadInfo and StrideInfo (#1260)
This commit introduces nnop-internal PadInfo and StrideInfo class, and
revises conv method to use these internal classes.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Fri, 31 Aug 2018 00:19:07 +0000 (09:19 +0900)]
[enco] Pass strides to ANN subnet (#1257)
This commit passes stride values (specified in Conv2D op) to android NN
sub-network via setOperandValue calls.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 30 Aug 2018 08:49:35 +0000 (17:49 +0900)]
[enco] Adjust input size for 001 test (#1255)
This commit adjusts inputs size of 001 test to reduce test time.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 30 Aug 2018 08:49:25 +0000 (17:49 +0900)]
[enco] Remove duplicated includes (#1253)
This commit removes duplicated '#include "Normalize.h"' in
Normalize.cpp.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 30 Aug 2018 08:49:14 +0000 (17:49 +0900)]
[coco] Support stride get/set for Conv2D (#1252)
This commit allows us to get and set stride values for Conv2D operation.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 30 Aug 2018 08:33:57 +0000 (17:33 +0900)]
[enco] Convolution Shape inference with stride (#1251)
This commit revises ConvolutionSpec to infer stride values for each
spatial axis, and use these values for OFM shape inference.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 30 Aug 2018 07:00:19 +0000 (16:00 +0900)]
[enco] Enable inference test on 001 case (#1248)
This commit enables inference test on 001 (simple convolution) case.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 30 Aug 2018 06:48:36 +0000 (15:48 +0900)]
[enco] Emit setInput and setOutput calls (#1246)
With this commit, generated code will includes the call for the
following APIs (if necessary):
- ANeuralNetworksExecution_setInput
- ANeuralNetworksExecution_setOutput
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 30 Aug 2018 06:48:28 +0000 (15:48 +0900)]
[enco] Emit ANeuralNetworksModel_finish call (#1247)
Now, subnet constructor includes ANeuralNetworksModel_finish call.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 30 Aug 2018 05:32:19 +0000 (14:32 +0900)]
[enco] Emit identifyInputsAndOutputs call (#1244)
Generated C++ code will invoke ANeuralNetworksModel_identifyInputsAndOutputs
with this commit.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 30 Aug 2018 05:28:56 +0000 (14:28 +0900)]
[coco] Extract Conv2D class (#1245)
This commit extracts the declaration/implementation/test of Conv2D
class into a dedicated header/source/test file.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 30 Aug 2018 05:28:43 +0000 (14:28 +0900)]
[enco] Identify input/output of ANN subnet (#1243)
This commit revises Split pass to identify input/ouput of android NN
sub-network based on how block and bags are related.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 30 Aug 2018 05:28:31 +0000 (14:28 +0900)]
[enco] Set weight (kernel/bias) data for ANN subnet (#1242)
This commit implements weight initializer for android NN subnet inside
Split pass.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 30 Aug 2018 01:52:04 +0000 (10:52 +0900)]
[enco] Emit addOperation calls (#1240)
With this commit, C++ code generated by enco includes addOperation
calls.
Note that the current implementation supports only CONV_2D operation.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 30 Aug 2018 01:43:57 +0000 (10:43 +0900)]
[enco] Introduce usage analysis helpers (#1239)
* [enco] Introduce usage analysis helpers
This commit introduces several helper functions that allows us to easily
analyze how bags and blocks are related with each other.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
* Add assert on blk
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 30 Aug 2018 01:27:47 +0000 (10:27 +0900)]
[enco] Add asymmetric conv kernel shape test (#1235)
This commit adds a test that checks whether ConvolutionSpec infers
the shape of kernel and OFM when kernel_size is specified for each dimension.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Thu, 30 Aug 2018 01:02:25 +0000 (10:02 +0900)]
[enco] Support subnet in/out identification (#1234)
This commit introduces identifyInputs and identifyOutputs method which
allows Backend to record android NN subnet's input and output.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
Reorganize nnc project file hierarchy (#1219)
* reorganize frontend part (last part)
Signed-off-by: Roman Rusyaev <r.rusyaev@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 29 Aug 2018 08:29:11 +0000 (17:29 +0900)]
[enco] Emit setOperandValue calls (#1233)
Generated C++ code will include setOperand (ANeuralNetworksModel_setOperandValue)
calls with this commit.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 29 Aug 2018 07:57:37 +0000 (16:57 +0900)]
[enco] Use random weight (#1232)
The output of current 000 test is always filled with zero as Caffe
uses 'constant:0' weight filler if weight filler is not specified.
This commit revises 001 testcase to use gaussian filler for weight.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 29 Aug 2018 07:57:30 +0000 (16:57 +0900)]
[enco] Update test configuration correctly (#1231)
The current implementation does not update test configuration for
inference tests.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 29 Aug 2018 07:13:18 +0000 (16:13 +0900)]
[enco] Create and start ANN exeution (#1230)
With this commit, enco now emits ANeuralNetworksExecution_create and
ANeuralNetworksExecution_startCompute calls.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 29 Aug 2018 06:10:21 +0000 (15:10 +0900)]
[enco] Emit addOperand calls (#1228)
* [enco] Emit addOperand calls
Now, the constructor of Subnet class includes addOperand calls in it.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
* Use scalar/tensor instead of info
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 29 Aug 2018 06:09:21 +0000 (15:09 +0900)]
[enco] Introduce setOperand for non-scalar values (#1229)
This commit introduces overloaded setOperand method which takes non-scalar
(array) values.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 29 Aug 2018 04:30:11 +0000 (13:30 +0900)]
[enco] Record ANN input/output opreands (#1227)
This commit extends ann::Module class with input and output methods
which records the input and output operands of android NN model.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 29 Aug 2018 03:04:43 +0000 (12:04 +0900)]
[enco] Emit fields in Subnet classes (#1224)
* [enco] Emit fields in Subnet classes
This commit revises SubnetStructBuilder to emit mandatory fields and
relevant constructor/destructor code.
Note that model construction is not yet supported.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
* Fix a typo (Retun -> Return)
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 29 Aug 2018 03:02:46 +0000 (12:02 +0900)]
[enco] Declare subnet field (#1226)
Now, Network struct has a dedicated field for each subnet.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 29 Aug 2018 02:58:43 +0000 (11:58 +0900)]
[enco] Remove redundant host memory allocation (#1225)
This commit removes redundant host momory allocation introduced by
mistake.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 29 Aug 2018 02:33:12 +0000 (11:33 +0900)]
[enco] Add convolution test (#1223)
This commit adds a simple caffe model with one convolution layer as a
testcase.
Note that inference test is not yet enabled.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 29 Aug 2018 02:10:31 +0000 (11:10 +0900)]
[enco] Append missing semicolon (#1222)
The current implementation emits assert call without semicolon.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Wed, 29 Aug 2018 02:02:50 +0000 (11:02 +0900)]
[enco] Introduce build test (#1221)
The current enco test framework supports only inference test based on
nnkit, and thus cannot be used in the middle of development.
This commit allows us to test whether enco generates a valid source code.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 28 Aug 2018 23:52:12 +0000 (08:52 +0900)]
[enco] Introduce SubnetBlockCompiler template (#1213)
This commit introduces SubnetBlockCompiler which will generate the code
that invokes Android NN network inference.
Note that the current implementation simply generates some assert code.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 [Tue, 28 Aug 2018 23:52:00 +0000 (08:52 +0900)]
[enco] Allocate host buffers (#1212)
With this commit, generated C++ code allocate local buffers inside
Invoke method.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
박종현/동작제어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>
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>
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>
Partial reorganize nnc file hierarchy (#1197)
* reorganize modelIR part: plugin/core/... -> core/modelIR
Signed-off-by: Roman Rusyaev <r.rusyaev@samsung.com>
박종현/동작제어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>
박종현/동작제어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>
박종현/동작제어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>
박종현/동작제어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>
박종현/동작제어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>
박종현/동작제어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>
박종현/동작제어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>
박종현/동작제어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>
박종현/동작제어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>
박종현/동작제어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>
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>
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>
박종현/동작제어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>
박종현/동작제어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>
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>
박종현/동작제어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>
박종현/동작제어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>
Add negative axis number support in concat (#1186)
Adds support for negative axis indexing in concat operation
박종현/동작제어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>
박종현/동작제어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>
박종현/동작제어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>
박종현/동작제어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>
박종현/동작제어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>