Dr1 development document (#5646)
authorEfimov Alexander/AI Tools Lab/./Samsung Electronics <a.efimov@samsung.com>
Mon, 29 Jul 2019 00:24:50 +0000 (09:24 +0900)
committer이성재/On-Device Lab(SR)/Principal Engineer/삼성전자 <sj925.lee@samsung.com>
Mon, 29 Jul 2019 00:24:50 +0000 (09:24 +0900)
* Updated SDD document for DR1

- Added more tasks
- Changed formatiing of task table
- Responsible person is changed

* change development plan, fix responcibilities, remove NNCC repo mentions
* add control flow related item
* remove redundant tizen requirements
* relax control flow requirements
* fix naming of components

Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
docs/project/19_NN_Compiler_and_Runtime_SDD.rst [new file with mode: 0644]
docs/project/19_NN_Compiler_and_Runtime_SDD.rst.cover [new file with mode: 0644]
docs/project/Makefile
docs/project/project_purpose_and_scope.rst
docs/project/project_sw_hw_constraints.rst [new file with mode: 0644]
docs/project/project_target_model.rst [new file with mode: 0644]

diff --git a/docs/project/19_NN_Compiler_and_Runtime_SDD.rst b/docs/project/19_NN_Compiler_and_Runtime_SDD.rst
new file mode 100644 (file)
index 0000000..cc005e6
--- /dev/null
@@ -0,0 +1,629 @@
+=======================\r
+SW Development Document\r
+=======================\r
+\r
+.. contents::\r
+\r
+.. section-numbering::\r
+\r
+.. raw:: pdf\r
+\r
+   PageBreak oneColumn\r
+\r
+\r
+**Revision history**\r
+\r
++-------+-------------+-----------------------------+--------------------------+---------------------+\r
+| Ver.  | Date        | Contents                    | Author                   | Approver            |\r
++=======+=============+=============================+==========================+=====================+\r
+| 0.1   | 2019.04.22  | Initial version             | Rusyaev Roman            | Sung-Jae Lee        |\r
++-------+-------------+-----------------------------+--------------------------+---------------------+\r
+| 0.2   | 2019.04.23  | SE member in-charge review  | Aleksei Kondrashov       |                     |\r
++-------+-------------+-----------------------------+--------------------------+---------------------+\r
+| 1.0   | 2019.04.24  | Final Execution DR version  | Rusyaev Roman            | Sung-Jae Lee        |\r
++-------+-------------+-----------------------------+--------------------------+---------------------+\r
+| 1.1   | 2019.07.24  | DR1 version                 | Efimov Alexander         | Sung-Jae Lee        |\r
++-------+-------------+-----------------------------+--------------------------+---------------------+\r
+\r
+.. include:: project_terms_and_abbreviation.rst\r
+\r
+Project Overview\r
+================\r
+\r
+Purpose and Scope\r
+-----------------\r
+\r
+\r
+.. include:: project_purpose_and_scope.rst\r
+.. include:: project_target_model.rst\r
+\r
+Assumptions, Dependencies and Constraints\r
+-----------------------------------------\r
+\r
+.. include:: project_sw_hw_constraints.rst\r
+\r
+Development Plan And Result\r
+===========================\r
+\r
+Development Schedule\r
+--------------------\r
+\r
+.. list-table:: Table 2-1. SW Development Schedule\r
+   :widths: 10 10 5 5 4 4 6\r
+   :header-rows: 1\r
+\r
+   * - Task\r
+     - Deliverable\r
+     - Plan start\r
+     - Plan end\r
+     - Result start\r
+     - Result end\r
+     - Responsibility\r
+\r
+   * - Prepare SW requirements\r
+     - SRS v1.0 \r
+     - 04.2019\r
+     - 05.2019\r
+     - \r
+     - \r
+     - R\. Rusyaev\r
+\r
+   * - Prepare SW System Test Plan\r
+     - STD v1.0\r
+     - 04.2019\r
+     - 05.2019\r
+     -\r
+     -\r
+     - R\. Rusyaev\r
+\r
+   * - Prepare Initial Project Plan\r
+     - SDD v1.0\r
+     - 04.2019\r
+     - 05.2019\r
+     -\r
+     -\r
+     - R\. Rusyaev\r
+\r
+   * - Prepare SW System Cases\r
+     - STD v2.0\r
+     - 04.2019\r
+     - 06.2019\r
+     -\r
+     -\r
+     - R\. Rusyaev\r
+\r
+   * - Prepare software design documents\r
+     - HLD, DLD\r
+     - 05.2019\r
+     - 08.2019\r
+     -\r
+     -\r
+     - A\. Efimov\r
+\r
+   * - Implement proof of concept for custom operations support in `NN Runtime`\r
+     - Proof of concept for custom operations support in `NN Runtime`\r
+     - 05.2019\r
+     - 08.2019\r
+     -\r
+     -\r
+     - A\. Efimov\r
+\r
+   * - Develop initial version of ONXX importer\r
+     - Initial version of ONNX importer, capable for one operation networks import\r
+     - 05.2019\r
+     - 08.2019\r
+     -\r
+     -\r
+     - A\. Efimov\r
+\r
+   * - Develop `Common IR` for `NN Compiler` and `NN Runtime`\r
+     - `Common IR` for `NN Compiler` and `NN Runtime`\r
+     - 04.2019\r
+     - 09.2019\r
+     -\r
+     -\r
+     - A\. Efimov\r
+\r
+   * - Support heterogeneous execution\r
+     - Heterogeneous execution for CPU and GPU backends\r
+     - 04.2019\r
+     - 09.2019\r
+     -\r
+     -\r
+     - A\. Efimov\r
+\r
+   * - Implement TF Importer\r
+     - TensorFlow NN Model Importer tested and capable to import all target models\r
+     - 05.2019\r
+     - 09.2019\r
+     -\r
+     -\r
+     - A\. Efimov\r
+\r
+   * - Support custom operations in `NN Runtime`\r
+     - Custom operations support in `NN Runtime` and provide internal interface for custom operations registration\r
+     - 05.2019\r
+     - 09.2019\r
+     -\r
+     -\r
+     - A\. Efimov\r
+\r
+   * - Develop mature version of ONXX importer\r
+     - Initial version of ONNX importer, capable for inception-v3 network import\r
+     - 05.2019\r
+     - 10.2019\r
+     -\r
+     -\r
+     - A\. Efimov\r
+\r
+   * - Prepare proof of concept for control flow operations in `NN Runtime`\r
+     - Proof of concept for control flow operations in `NN Runtime`\r
+     - 07.2019\r
+     - 11.2019\r
+     -\r
+     -\r
+     - A\. Efimov\r
+\r
+   * - Implement final version of ONNX Importer\r
+     - ONNX NN Model Importer tested and capable to import all target models\r
+     - 05.2019\r
+     - 11.2019\r
+     -\r
+     -\r
+     - A\. Efimov\r
+\r
+   * - Prepare test result\r
+     - STD v2.0, UTR v1.0\r
+     - 04.2019\r
+     - 11.2019\r
+     -\r
+     -\r
+     - A\. Efimov\r
+\r
+   * - Prepare project completion documents\r
+     - STD v2.0, Technology Items completion reports\r
+     - 05.2019\r
+     - 12.2019\r
+     -\r
+     -\r
+     - A\. Efimov\r
+\r
+\r
+SW Metrics\r
+----------\r
+\r
+.. list-table:: Table 2-2. SW Metrics\r
+   :widths: 5 10 5 7 5 4 8\r
+   :header-rows: 1\r
+\r
+   * - Category\r
+     - Metric\r
+     - Collection Method\r
+     - Collection Period\r
+     - Planned\r
+     - Actual\r
+     - Responsibility\r
+\r
+   * - Quality\r
+     - Test pass rate\r
+     - GTest\r
+     - 22.02.2019 - 31.12.2019\r
+     - 100%\r
+     -\r
+     - A\. Efimov\r
+\r
+   * - Quality\r
+     - Defects density\r
+     - Manual (GTest/Scripts)\r
+     - 22.02.2019 - 31.12.2019\r
+     - <= 1 defect/KLOC\r
+     -\r
+     - A\. Efimov\r
+\r
+   * - Quality\r
+     - Defects removal rate\r
+     - Manual (GTest/Scripts)\r
+     - 22.02.2019 - 31.12.2019\r
+     - 100%\r
+     -\r
+     - A\. Efimov\r
+\r
+   * - Quality\r
+     - Critical defects\r
+     - SVACE\r
+     - 22.02.2019 - 31.12.2019\r
+     - 0\r
+     -\r
+     - A\. Efimov\r
+\r
+   * - Quality\r
+     - Major defects\r
+     - SVACE\r
+     - 22.02.2019 - 31.12.2019\r
+     - 0\r
+     -\r
+     - A\. Efimov\r
+\r
+   * - Quality\r
+     - Code review issue removal\r
+     - Samsung Research GitHub\r
+     - 22.02.2019 - 31.12.2019\r
+     - 100%\r
+     -\r
+     - A\. Efimov\r
+\r
+   * - Quality\r
+     - Comments Rate\r
+     - ``cloc`` tool\r
+     - 22.02.2019 - 31.12.2019\r
+     - Exceed 20%\r
+     -\r
+     - A\. Efimov\r
+\r
+   * - Quality\r
+     - Cyclomatic Complexity (per file)\r
+     - SonarQube\r
+     - 22.02.2019 - 31.12.2019\r
+     - < 50\r
+     -\r
+     - A\. Efimov\r
+\r
+   * - Quality\r
+     - Unused Items (Unused Files, Unused Functions, Unused Global Variables)\r
+     - gcc/g++\r
+     - 22.02.2019 - 31.12.2019\r
+     - 0\r
+     -\r
+     - A\. Efimov\r
+\r
+   * - Process\r
+     - Project On-time Completion Rate\r
+     - PLM\r
+     - 22.02.2019 - 31.12.2019\r
+     - 100%\r
+     -\r
+     - A\. Efimov\r
+\r
+   * - Process\r
+     - Milestone On-time Completion Rate\r
+     - PLM\r
+     - 22.02.2019 - 31.12.2019\r
+     - 100%\r
+     -\r
+     - A\. Efimov\r
+\r
+   * - Process\r
+     - Process compliance\r
+     - Audit\r
+     - 22.02.2019 - 31.12.2019\r
+     - 100%\r
+     -\r
+     - A\. Kondrashov\r
+\r
+\r
+SW Configurations Management\r
+----------------------------\r
+\r
+Document\r
+````````\r
+\r
+\r
+.. list-table:: Table 2-3. Document Configuration Item\r
+   :widths: 2 20 5 8\r
+   :header-rows: 1\r
+\r
+   * - No\r
+     - Configuration Item\r
+     - Location\r
+     - Submitter\r
+\r
+   * - 1\r
+     - SW Requirement Specification\r
+     - PLM, GitHub\r
+     - A\. Efimov\r
+\r
+   * - 2\r
+     - SW Development Document\r
+     - PLM, GitHub\r
+     - A\. Efimov\r
+\r
+   * - 3\r
+     - SW High Level Document\r
+     - PLM, GitHub\r
+     - A\. Efimov\r
+\r
+\r
+   * - 4\r
+     - SW Detailed Level Document\r
+     - PLM, GitHub\r
+     - A\. Efimov\r
+\r
+   * - 5\r
+     - SW System Test Document\r
+     - PLM, GitHub\r
+     - A\. Efimov\r
+\r
+   * - 6\r
+     - SW Unit Test Report\r
+     - PLM, GitHub\r
+     - A\. Efimov\r
+\r
+\r
+SW Source Code\r
+``````````````\r
+\r
+\r
+SW Repositories: https://github.sec.samsung.net/STAR/nnfw\r
+\r
+::\r
+\r
+  git clone https://github.sec.samsung.net/STAR/nnfw.git\r
+\r
+\r
+\r
+Baseline\r
+````````\r
+\r
+.. list-table:: Table 2-4. Baseline Establishment\r
+   :widths: 5 5 8\r
+   :header-rows: 1\r
+\r
+   * - Phase\r
+     - Baseline Name\r
+     - SW Configuration Item\r
+\r
+   * - 04.2019 Plan\r
+     - Execution DR\r
+     - SW Requirement Specification, SW Development Document, System Test Document initial version\r
+\r
+   * - 06.2019 Execution\r
+     - DR1\r
+     - System Test Document\r
+\r
+   * - 08.2019 Execution\r
+     - Design document\r
+     - SW High Level Document, SW Detailed Design Document\r
+\r
+   * - 09.2019 Execution\r
+     - DR2\r
+     - Update design documents, UTR (1st round), STD (1st round)\r
+\r
+   * - 10.2019 Execution\r
+     - Test report\r
+     - SW System Test Document (result), SW Unit Test Report\r
+\r
+   * - 12.2019 Completion\r
+     - Project Completion\r
+     - Project Completion Report\r
+\r
+SW Quality Verification\r
+=======================\r
+\r
+SW Verification\r
+---------------\r
+\r
+\r
+.. list-table:: Table 3-1. SW Verification Plan and Result\r
+   :widths: 4 11 11 8 8 10 7 6\r
+   :header-rows: 1\r
+\r
+   * - No\r
+     - Verification Item\r
+     - Quality Goal\r
+     - Tool\r
+     - Phase\r
+     - Development Team Member in Charge\r
+     - Result\r
+     - Note\r
+\r
+   * - 1\r
+     - Open source License Verification\r
+     - Clear violations of open source obligation\r
+     - ProtexIP\r
+     - Execution\r
+     - Efimov Alexander\r
+     -\r
+     -\r
+\r
+   * - 2\r
+     - Potential Defect\r
+     - Fix all defects\r
+     - Svace\r
+     - Test\r
+     - Efimov Alexander\r
+     -\r
+     -\r
+\r
+   * - 3\r
+     - System Defect\r
+     - Fix Critical/ Major defects\r
+     - GitHub\r
+     - Test\r
+     - Efimov Alexander\r
+     -\r
+     -\r
+\r
+Static Analysis\r
+---------------\r
+\r
+.. list-table:: Table 3-2. Static Analysis Verification\r
+   :widths: 5 20 10 7 20\r
+   :header-rows: 1\r
+\r
+   * - No\r
+     - Activity\r
+     - Schedule\r
+     - Result\r
+     - Comment\r
+\r
+   * - 1\r
+     - SA Verification I (SVACE)\r
+     - 28.09.2019\r
+     -\r
+     -\r
+\r
+   * - 2\r
+     - SA Verification II (SVACE)\r
+     - 30.11.2019\r
+     -\r
+     -\r
+\r
+   * - 2\r
+     - SA Verification III (SVACE)\r
+     - 31.12.2019\r
+     -\r
+     -\r
+\r
+Coding Standard\r
+---------------\r
+\r
+.. list-table:: Table 3-3. Coding Standard Verification\r
+   :widths: 5 20 10 7 20\r
+   :header-rows: 1\r
+\r
+   * - No\r
+     - Activity\r
+     - Schedule\r
+     - Result\r
+     - Comment\r
+\r
+   * - 1\r
+     - Coding standard enforcement with ``clang-format`` tool.\r
+     - Regular\r
+     -\r
+     -\r
+\r
+\r
+Convergence (integration testing)\r
+---------------------------------\r
+\r
+Out of scope since the integration with other SW is not required by SW Requirement Specification.\r
+\r
+Dynamic Analysis\r
+----------------\r
+\r
+Dynamic analysis for NN Compiler memory leaks investigation performed with Valgrind/AdressSanitizer/LeakSanitizer tools.\r
+\r
+.. list-table:: Table 3-4. Dynamic Analysis Verification\r
+   :widths: 5 20 10 7 20\r
+   :header-rows: 1\r
+\r
+   * - No\r
+     - Activity\r
+     - Schedule\r
+     - Result\r
+     - Comment\r
+\r
+   * - 1\r
+     - DA Verification I\r
+     - 28.09.2019\r
+     -\r
+     -\r
+\r
+   * - 2\r
+     - DA Verification II\r
+     - 30.11.2019\r
+     -\r
+     -\r
+\r
+   * - 2\r
+     - DA Verification III\r
+     - 31.12.2019\r
+     -\r
+     -\r
+\r
+Architecture Analysis\r
+---------------------\r
+\r
+SW architecture verification is managed by HQ.\r
+\r
+\r
+SW Security\r
+-----------\r
+\r
+Out of the project scope since the project is not related to SW security.\r
+\r
+\r
+Code Review\r
+-----------\r
+\r
+\r
+.. list-table::\r
+   :widths: 5 20 10 7 20\r
+   :header-rows: 1\r
+\r
+   * - No\r
+     - Activity\r
+     - Schedule\r
+     - Result\r
+     - Comment\r
+\r
+   * - 1\r
+     - Code review via GitHub pull requests\r
+     - Regular\r
+     -\r
+     -\r
+\r
+Risk Management\r
+===============\r
+\r
+\r
+.. list-table:: Table 4-1. SW Risk Management\r
+   :widths: 7 12 12 10 12 12\r
+   :header-rows: 1\r
+\r
+   * - Priority\r
+     - Risk Description\r
+     - Risk Reduction Solution\r
+     - Schedule\r
+     - Result\r
+     - Responsibility\r
+\r
+   * - 1\r
+     - Project scope is changed due extra HQ request\r
+     - Discuss the new requirements via email and messenger, update SRS\r
+     - 02.2019 - 12.2019\r
+     -\r
+     - A\. Efimov\r
+\r
+   * - 2\r
+     - Unavoidable technical difficulties during requirements implementation\r
+     - Submit requirements changes and get confirmation from HQ\r
+     - 02.2019 - 12.2019\r
+     -\r
+     - A\. Efimov\r
+\r
+   * - 3\r
+     - Not enough HR\r
+     - Hire team members as soon as possible, request assistance from other teams\r
+     - 02.2019 - 12.2019\r
+     -\r
+     - A\. Efimov\r
+\r
+   * - 4\r
+     - Use of GPL code\r
+     - Minimize usage of GPL code, wrap GPL modules with well-defined interfaces\r
+       so they can be easily replaced.\r
+     - 02.2019 - 12.2019\r
+     -\r
+     - A\. Efimov\r
+\r
+   * - 5\r
+     - Requirements would change due external or internal circumstances, e.g. new technology or product launch\r
+     - Discuss project changes and make corrections\r
+     - 02.2019 - 12.2019\r
+     -\r
+     - A\. Efimov\r
+\r
+\r
+**References**\r
+\r
+Competitors:\r
+\r
+.. [#] `NNVM: Open Compiler for AI Frameworks <https://github.com/dmlc/nnvm>`_.\r
+.. [#] `Latte.jl: A high-performance DSL for deep neural networks in Julia <https://github.com/IntelLabs/Latte.jl>`_.\r
+.. [#] `DNNDK: Full-stack solution for deep learning development & deployment <http://www.deephi.com/dnndk.html>`_.\r
+.. [#] `nngraph: Neural Network Graph Package <https://github.com/torch/nngraph>`_.\r
+.. [#] `Richard Wei, Lane Schwartz, Vikram Adve, DLVM: A modern compiler infrastructure for deep learning systems, arXiv:1711.03016, 2017 <http://dlvm.org/>`_.\r
+.. [#] `XLA (Accelerated Linear Algebra): a domain-specific compiler for linear algebra that optimizes TensorFlow computations <https://www.tensorflow.org/performance/xla>`_.\r
+.. [#] `nGraph: an open source C++ library, compiler and runtime for Deep Learning frameworks <https://github.com/NervanaSystems/ngraph>`_.\r
diff --git a/docs/project/19_NN_Compiler_and_Runtime_SDD.rst.cover b/docs/project/19_NN_Compiler_and_Runtime_SDD.rst.cover
new file mode 100644 (file)
index 0000000..d584d03
--- /dev/null
@@ -0,0 +1,7 @@
+=======================
+SW Development Document
+=======================
+
+-------------------------
+SRR-RAJ0119ZZ-BERF-SDD001
+-------------------------
index 5a58c8c..fe3a0c6 100644 (file)
@@ -1,4 +1,4 @@
-DOC_SRC = 19_NN_Compiler_and_Runtime_SRS.rst
+DOC_SRC = 19_NN_Compiler_and_Runtime_SRS.rst 19_NN_Compiler_and_Runtime_SDD.rst
 
 DOC_PDF = $(DOC_SRC:.rst=.pdf)
 
index b153326..c6f7eac 100644 (file)
@@ -3,11 +3,10 @@ The main goals of the project are to develop compiler and runtime for neural net
 |
 | **2019 year goals:**
 
-- Support heterogeneous computing in NN compiler and runtime
-- Support TensorFlow NN model format
-- Support ONNX NN model format
-- Implement target-independent compiler optimizations
-- Improve inference performance in NN runtime
-- Develop common IR for both NN compiler and runtime
-- Support RNN in NN runtime
-- Support custom operators in NN runtime
+- Support heterogeneous computing in NN Runtime
+- Support TensorFlow NN Model format
+- Support ONNX NN Model format
+- Improve inference performance in NN Runtime
+- Develop common IR for both NN Compiler and NN Runtime
+- Support RNN in NN Runtime
+- Support custom operators in NN Runtime
diff --git a/docs/project/project_sw_hw_constraints.rst b/docs/project/project_sw_hw_constraints.rst
new file mode 100644 (file)
index 0000000..5c602b4
--- /dev/null
@@ -0,0 +1,33 @@
+|
+
+.. list-table:: Table 1-2. Assumptions, Dependencies and the Constraints
+   :widths: 23 40 23
+   :header-rows: 1
+
+   * - Item
+     - Assumptions, Dependencies and the Constraints
+     - Reference
+
+   * - Tizen SW Platform
+     - The following items should be provided:
+         - Tizen API
+         - Tizen kernel
+         - Tizen FW
+         - Tizen SDK
+         - Tizen naming convention
+     -
+         - `www.tizen.org <www.tizen.org>`_
+         - `wiki.tizen.org <wiki.tizen.org>`_
+         - `developer.tizen.org <developer.tizen.org>`_
+
+   * - Host OS
+     - Tizen, Linux-based OS (Ubuntu, Archlinux, etc)
+     -
+         - `Ubuntu site <https://www.ubuntu.com/>`_
+         - `Archlinux site <https://www.archlinux.org/>`_
+         - `www.tizen.org <www.tizen.org>`_
+
+   * - Target HW
+     - The reference device should be provided: Odroid-XU4
+     -
+
diff --git a/docs/project/project_target_model.rst b/docs/project/project_target_model.rst
new file mode 100644 (file)
index 0000000..e953c62
--- /dev/null
@@ -0,0 +1,14 @@
+|
+
+.. list-table:: Table 1-1. Target Model
+   :widths: 23 50 20
+   :header-rows: 1
+
+   * - Product
+     - Target Model Name
+     - Comment
+
+   * - Linux-based device
+     - Odroid XU4
+     - Reference board
+