platform/core/ml/nnfw.git
6 years agoUpdate Dockerfile (#107)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Fri, 20 Apr 2018 04:31:35 +0000 (13:31 +0900)]
Update Dockerfile (#107)

This commit updates Dockerfile to install google test (for testing),
and protocol buffer (for caffe support).

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[caffegen] Add 'ConvolutionLayer' (#111)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Fri, 20 Apr 2018 02:24:07 +0000 (11:24 +0900)]
[caffegen] Add 'ConvolutionLayer' (#111)

This commit adds 'ConvolutionLayer' which allows us to easily access the
internal of ConvolutionLayerParameter.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[caffegen] Include 'InputLayer.h' (#106)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Fri, 20 Apr 2018 01:20:58 +0000 (10:20 +0900)]
[caffegen] Include 'InputLayer.h' (#106)

LayerAnalysisPass.h uses 'InputLayer', but does not includes
'InputLayer.h'

This commit updates 'LayerAnalysisPass.h', and introduces
empty 'LayerAnalysisPass.cpp' to ensure that 'LayerAnalysisPass.h' is
self-complete.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoAdd CI script (#31)
최형규/동작제어Lab(SR)/Senior Engineer/삼성전자 [Fri, 20 Apr 2018 00:22:43 +0000 (09:22 +0900)]
Add CI script (#31)

Add a command to build using docker for CI and local build

* Using docker image `nncc` as default
* Make use of NNCC_PROJECT_PATH
* Use double quotes to prevent possible issues from space
* Update comments and variable names to fit for nncc

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
6 years ago[caffegen] Introduce 'fill' command (#104)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 19 Apr 2018 10:41:59 +0000 (19:41 +0900)]
[caffegen] Introduce 'fill' command (#104)

This commit implements 'fill' command. Currently, only 'Input' layer
is supported.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[caffegen] Add 'NetworkBuilder' class (#103)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 19 Apr 2018 10:07:01 +0000 (19:07 +0900)]
[caffegen] Add 'NetworkBuilder' class (#103)

This commit adds 'NetworkBuilder' class which reads
'caffe::NetParameter' and creates a 'Network' object.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[caffegen] Fix build break (#102)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 19 Apr 2018 08:47:41 +0000 (17:47 +0900)]
[caffegen] Fix build break (#102)

This commit adds pure virtual methods on layer to fix build break.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[caffegen] Add 'InputLayer' class (#101)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 19 Apr 2018 08:36:52 +0000 (17:36 +0900)]
[caffegen] Add 'InputLayer' class (#101)

This commit introduces 'InputLayer' class which helps us to process
'Input' layer on caffe model.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[caffegen] Add 'Network' class (#100)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 19 Apr 2018 06:40:28 +0000 (15:40 +0900)]
[caffegen] Add 'Network' class (#100)

This commit adds 'Network' class which serves as in-memory Caffe model
representation.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[caffegen] Add 'BlobContext' class (#98)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 19 Apr 2018 05:16:06 +0000 (14:16 +0900)]
[caffegen] Add 'BlobContext' class (#98)

This commit adds 'BlobContext' class which maintains the shape of each
blob.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[caffegen] Add 'LayerContext' class (#99)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 19 Apr 2018 05:15:54 +0000 (14:15 +0900)]
[caffegen] Add 'LayerContext' class (#99)

This commit adds 'LayerContext' class which maintains a sequence of
'Layer' objects.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[caffegen] Add 'BlobShape' class (#96)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 19 Apr 2018 04:28:09 +0000 (13:28 +0900)]
[caffegen] Add 'BlobShape' class (#96)

This commit adds 'BlobShape' class which records the dimensionality of
blobs.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[caffegen] Add Layer-related classes (#97)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 19 Apr 2018 04:27:53 +0000 (13:27 +0900)]
[caffegen] Add Layer-related classes (#97)

This commit adds the following Layer-related classes which will be extended later.
 - Layer (base class)
 - LayerAnalysisPass (for read-only passes)
 - LayerTransformPass (for read-write passes)

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[caffegen] Support 'encode' (#95)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 19 Apr 2018 04:27:15 +0000 (13:27 +0900)]
[caffegen] Support 'encode' (#95)

This commit implements 'encode' command which allows users to convert
prototxt (text format) to caffemodel (binary format).

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years ago[caffegen] Add 'Command' class (#94)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 19 Apr 2018 02:05:10 +0000 (11:05 +0900)]
[caffegen] Add 'Command' class (#94)

This commit adds 'Command' class as a basic infrastructure for
caffegen.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoIntroduce 'nncc_foundation' (#93)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 19 Apr 2018 02:04:28 +0000 (11:04 +0900)]
Introduce 'nncc_foundation' (#93)

This commit introduces 'nncc_foundation' library which includes
functions and classes not directly related with compiler itself, but
useful when implementing it.

The initial version includes the implementation of 'make_unique' which
makes it easy to use 'std::unique_ptr'.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoIntroduce nncc_frontend_caffe_core (#87)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Wed, 18 Apr 2018 01:44:00 +0000 (10:44 +0900)]
Introduce nncc_frontend_caffe_core (#87)

This commit introduces nncc_frontend_caffe_core library which allows us
to access the content of .caffemodel and .prototxt.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoFormat check all the files under tools (#88)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Wed, 18 Apr 2018 01:43:38 +0000 (10:43 +0900)]
Format check all the files under tools (#88)

This commit sets 'tools' as a target of format check. Now, 'nncc format'
will check code style for all the header and source under '/tools'.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoCreate 'caffegen' project (#89)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Wed, 18 Apr 2018 01:40:49 +0000 (10:40 +0900)]
Create 'caffegen' project (#89)

This commit creates empty 'caffegen' project under contrib which will
provide a random caffemodel generator.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoAllow configuration on directories to be format checked (#90)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Wed, 18 Apr 2018 01:39:49 +0000 (10:39 +0900)]
Allow configuration on directories to be format checked (#90)

This commit allows users to specify directories to be format checked on
'nncc format' via command-line arguments.

Running 'nncc format dir1' will check all the files under dir1 in addition
to the default files (i.e. files under directories that include .FORMATCHECKED)

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoAdd nncc::core::ADT::kernel::Shape (#86)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Tue, 17 Apr 2018 23:36:15 +0000 (08:36 +0900)]
Add nncc::core::ADT::kernel::Shape (#86)

This commit adds nncc::core::ADT::kernel::Shape class and related tests.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoAdd nncc::core::ADT::PadInfo (#85)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Tue, 17 Apr 2018 23:36:08 +0000 (08:36 +0900)]
Add nncc::core::ADT::PadInfo (#85)

This commit adds nncc::core::ADT::PadInfo class which describes padding
for convolution operation.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoAdd nncc::core::ADT::StrideInfo (#84)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Tue, 17 Apr 2018 23:36:00 +0000 (08:36 +0900)]
Add nncc::core::ADT::StrideInfo (#84)

This commit adds nncc::core::ADT::StrideInfo class which describes
stride parameters of convolution operation.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoIntroduce CMake functions for example build (#82)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Tue, 17 Apr 2018 10:52:59 +0000 (19:52 +0900)]
Introduce CMake functions for example build (#82)

This commit introduces the following CMake functions for example build:
 - add_nncc_example_executable
 - nncc_example_link_libraries

These functions allow us to easily disable examples when measuring test
coverage.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoUse C++ 11 standard (#83)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Tue, 17 Apr 2018 07:48:36 +0000 (16:48 +0900)]
Use C++ 11 standard (#83)

This commit sets C++ 11 as the default standard for nncc project.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoSupport test coverage measure (#80)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Tue, 17 Apr 2018 03:33:44 +0000 (12:33 +0900)]
Support test coverage measure (#80)

This commit revises CMakeLists.txt to allows users to measure test
coverage, and introduces 'gen-coverage-report' command to make it
easy to generate a test coverage report.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoIntroduce 'test' command (#81)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Tue, 17 Apr 2018 02:22:09 +0000 (11:22 +0900)]
Introduce 'test' command (#81)

This commit introduces 'test' command for 'nncc' driver which invokes
tests managed by CMake.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoAdd nncc::core::ADT::feature::Shape (#78)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Tue, 17 Apr 2018 01:03:02 +0000 (10:03 +0900)]
Add nncc::core::ADT::feature::Shape (#78)

This commit adds nncc::core::ADT::feature::Shape class and related
tests.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoEnable build-time test (#76)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 12 Apr 2018 23:52:40 +0000 (08:52 +0900)]
Enable build-time test (#76)

* Enable build-time test

This commit revises CMakeLists.txt to enable build-time testing based on
Google Test, introduces three helper functions for build library and tests.

With this commit, build-time test will be enabled by default only when google
test is available.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
* Insert 'add_test'

6 years agoAdd 'contribution guide' (#73)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Mon, 9 Apr 2018 11:02:50 +0000 (20:02 +0900)]
Add 'contribution guide' (#73)

This commit adds the first version of 'contribution guide' which
explains how to create a pull request.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoRestructure 'libs' directory (#71)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 5 Apr 2018 09:34:26 +0000 (18:34 +0900)]
Restructure 'libs' directory (#71)

This commit renames 'lib' as 'libs' to make it clear that there are
multiple libraries in this directory, and introduces directories for
frontend (caffe and tflite) implementations.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoAdd IDEF0 A12 (Import operation) diagram (#46)
Sergey Vostokov/SRR-Platform Lab/./삼성전자 [Mon, 2 Apr 2018 21:53:00 +0000 (00:53 +0300)]
Add IDEF0 A12 (Import operation) diagram (#46)

* Add IDEF0 A12 (Import operation) diagram

Add the A12 decomposiont diagram for the Import function.
It includes 3 steps and to components (Parser&Converter)
 - parse NN container format
 - verify loaded NN model
 - convert framework specific IR to common IR

Signed-off-by: Sergey Vostokov <s.vostokov@samsung.com>
* Change input from "NN Model desctiption" to "NN Model instance"

The input "NN Model description" was changed to
"NN Model Instance" for all diagrams A0, A1, A12

Signed-off-by: Sergey Vostokov <s.vostokov@samsung.com>
* Add changes to diagram A0, A1

The input ""NN Model description" was changes to
"NN Model instance" for two top-level diagrams.

Signed-off-by: Sergey Vostokov <s.vostokov@samsung.com>
* Update A12 (Import operation): change rule "NN Model specification"

The rule "NN container format" of function "Parse NN container" was
changed to "NN Model Specification"

Signed-off-by: Sergey Vostokov <s.vostokov@samsung.com>
* Update IDEF0 A12 (Import operation)

- change 1st function name to "Parse"
- chagng 3rd function name to "Convert"
- fix enumeration errors

Signed-off-by: Sergey Vostokov <s.vostokov@samsung.com>
* Update IDEF0 A0, A1

Fix rule "Specification of NN model format" to "NN Model specification"
for consistency.

Signed-off-by: Sergey Vostokov <s.vostokov@samsung.com>
6 years agoFormat check all the files under lib (#38)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Tue, 27 Mar 2018 06:32:04 +0000 (15:32 +0900)]
Format check all the files under lib (#38)

This commit sets 'lib' as a target of format check. Now, 'nncc format'
will check code style for all the header and source under lib/.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoAdd IDEF0 A1 diagram (#44)
Sergey Vostokov/SRR-Platform Lab/./삼성전자 [Tue, 27 Mar 2018 05:37:27 +0000 (08:37 +0300)]
Add IDEF0 A1 diagram (#44)

* Add IDEF0 A1 diagram

The diagram of the first level of decomposition was made.
It includes 5 stages:
- Setup configuration
- Import NN model
- High-level optimization
- Low-Level optimization
- Code generation

Signed-off-by: Sergey Vostokov <s.vostokov@samsung.com>
* Update IDEF0 A1: remove Target ISA and fix copy-paste error

High-Level optimization function doesn't reqiure anithing else but
only hogh-level optimization techniques. The rule Target ISA was
removed.

The copy-paste error was fixed "High-Level opt...> to "Low-Level..."
for block Low-Level optimization

Signed-off-by: Sergey Vostokov <s.vostokov@samsung.com>
* Change input from Setup Configuration block

The block Setup Configuration would produce the
configured session for other modules instead of just
produce parsed arguments

Signed-off-by: Sergey Vostokov <s.vostokov@samsung.com>
* Add mechanism for the block Setup configuration"

The block "Setup configuration" would be done by
Configuration system. That was missed on prev version
of diagram.

Signed-off-by: Sergey Vostokov <s.vostokov@samsung.com>
6 years agoSkip clang-format when there is no candidates (#39)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Sun, 25 Mar 2018 23:13:47 +0000 (08:13 +0900)]
Skip clang-format when there is no candidates (#39)

The format check currently lists up all the files tracked by git as
an input for clang-format when there is no candidate.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoAdd IDEF0 diagrams: A0 (NN model compilation) (#30)
Sergey Vostokov/SRR-Platform Lab/./삼성전자 [Thu, 22 Mar 2018 10:27:58 +0000 (13:27 +0300)]
Add IDEF0 diagrams: A0 (NN model compilation) (#30)

* Add IDEF0 diagrams: A0 (NN model compilation)

This commit adds the A0 diagram, used IDEF0 notation to describe the
first level of decomposition of nncc functionality: NN model compilation

Signed-off-by: Sergey Vostokov <s.vostokov@samsung.com>
* Update IDEF0 A0

Add name of root node as A0
Fix typo TRA -> TRE

Signed-off-by: Sergey Vostokov <s.vostokov@samsung.com>
* Update outcome of A0 diagram to Target binaries

The main function outcome was updated as Target binaries instead of
3 types of outcomes: ARM CPU executable/ARM GPU shaders/NPU executable

Signed-off-by: Sergey Vostokov <s.vostokov@samsung.com>
6 years agoIntroduce 'tools' directory (#37)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 22 Mar 2018 10:27:32 +0000 (19:27 +0900)]
Introduce 'tools' directory (#37)

This commit introduces 'tools' directory which will host all the
official projects that emit executables.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoFix a bug in format check script (#35)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 22 Mar 2018 06:52:35 +0000 (15:52 +0900)]
Fix a bug in format check script (#35)

The format check script currently invokes clang-format only when there
is no files to track.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoIntroduce 'Dockerfile' (#32)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 22 Mar 2018 06:30:29 +0000 (15:30 +0900)]
Introduce 'Dockerfile' (#32)

This commit introduces 'Dockerfile' which ease developement environment
bring up for newcomers.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoUse italic font for nncc (#33)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 22 Mar 2018 05:54:16 +0000 (14:54 +0900)]
Use italic font for nncc (#33)

'design.md' currently includes one non-italic nncc word. This commit
removes this inconsistency.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoIntroduce format checker (#21)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Thu, 22 Mar 2018 00:23:08 +0000 (09:23 +0900)]
Introduce format checker (#21)

This commit introduces C++ format checker to make it easy to maintain style
consistency. Users may invoke this format checker by running 'nncc format'.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoIntroduce 'lib' directory (#25)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Wed, 21 Mar 2018 10:54:04 +0000 (19:54 +0900)]
Introduce 'lib' directory (#25)

This commit introduces 'lib' directory which will hold the
implementation of libraries that nncc officially supports.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoAdd 'roadmap.md' (#26)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Wed, 21 Mar 2018 10:12:28 +0000 (19:12 +0900)]
Add 'roadmap.md' (#26)

This commit adds 'roadmap.md' which states the goal of nncc in 2018.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoAdd design.md (#13)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Mon, 19 Mar 2018 00:51:06 +0000 (09:51 +0900)]
Add design.md (#13)

This commit adds design.md which describes the principle behind the
design of nncc.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
6 years agoAdd basic configure & build tools (#11)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Sun, 18 Mar 2018 23:26:24 +0000 (08:26 +0900)]
Add basic configure & build tools (#11)

* Add basic configure & build tools

This commit introduces 'nncc' script which eases CMake configure and
build.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
* Fix a typo (NNCC_SCIPRT_RPATH -> NNCC_SCRIPT_RPATH)

6 years agoAdd contrib directory (#6)
박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 [Sun, 11 Mar 2018 23:48:13 +0000 (08:48 +0900)]
Add contrib directory (#6)

* Add contrib directory

This commit adds contrib directory which will include all the incubating projects,
and CMakeLists.txt for these incubating projects.

This commit adds 'Getting Started' project template which includes a simple
'hello, world' example to show how to use this directory.

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

6 years agoUpdate README (#2)
서상민/동작제어Lab(SR)/Senior Engineer/삼성전자 [Tue, 6 Mar 2018 08:52:38 +0000 (17:52 +0900)]
Update README (#2)

This commit updates README.md to explain what `nncc` means.

Signed-off-by: Sangmin Seo <sangmin7.seo@samsung.com>
6 years agoUpdate README.md
이명재/Open Source그룹(SR)/Senior Engineer/삼성전자 [Thu, 22 Feb 2018 05:06:43 +0000 (14:06 +0900)]
Update README.md

6 years agoInitial commit
이명재/Open Source그룹(SR)/Senior Engineer/삼성전자 [Thu, 22 Feb 2018 05:06:05 +0000 (14:06 +0900)]
Initial commit