summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorChunseok Lee <chunseok.lee@samsung.com>2020-09-05 21:49:46 +0900
committerChunseok Lee <chunseok.lee@samsung.com>2020-09-05 21:49:46 +0900
commit74476a2d0296bdad70a2f7f90bc7419a8b05bffd (patch)
tree3f991636c1e9423d38eb16a384c20b569b0d678e /docs
parent042b262b3633b6c0f577aed6cb4b980ad0c1dcf3 (diff)
downloadnnfw-74476a2d0296bdad70a2f7f90bc7419a8b05bffd.tar.gz
nnfw-74476a2d0296bdad70a2f7f90bc7419a8b05bffd.tar.bz2
nnfw-74476a2d0296bdad70a2f7f90bc7419a8b05bffd.zip
Diffstat (limited to 'docs')
-rw-r--r--docs/conf.py2
-rw-r--r--docs/howto/how-to-introduce-a-new-operation-into-runtime.md57
-rw-r--r--docs/release/1.9/release-note-1.9.0.md38
-rw-r--r--docs/runtime/compute.md12
4 files changed, 108 insertions, 1 deletions
diff --git a/docs/conf.py b/docs/conf.py
index 649b677a9..9b870097a 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -21,7 +21,7 @@ copyright = '2020, Samsung Research & contributors'
author = 'Samsung Research & contributors'
# The full version, including alpha/beta/rc tags
-release = '1.8.0'
+release = '1.9.0'
# -- General configuration ---------------------------------------------------
diff --git a/docs/howto/how-to-introduce-a-new-operation-into-runtime.md b/docs/howto/how-to-introduce-a-new-operation-into-runtime.md
index 4e295baee..ab449c4be 100644
--- a/docs/howto/how-to-introduce-a-new-operation-into-runtime.md
+++ b/docs/howto/how-to-introduce-a-new-operation-into-runtime.md
@@ -176,6 +176,63 @@ void Dumper::visit(const Select &node)
}
```
+5. Add code for shape inference
+- ONE runtime tries to calculate shapes and allocate memory during compilation time. For some calculations of output shapes that cannot be done during compilation time, ONE runtime will calculate shapes and allocate memory during execution time.
+- Calculation of shapes during compilation time is called _static shape inference_ and calculation of shapes during execution time is called _dynamic shape inference_.
+- [`StaticShapeInference.h`](`/runtime/onert/compiler/StaticShapeInference.h`)
+
+```CPP
+ void visit(const ir::operation::Select &op) override;
+```
+- [`StaticShapeInference.cc`](/runtime/onert/core/src/compiler/StaticShapeInference.cc)
+```CPP
+void StaticShapeInferer::visit(const ir::operation::Select &op)
+{
+ const auto input_cond_idx{op.getInputs().at(ir::operation::Select::Input::CONDITION)};
+ const auto &input_cond = _operands.at(input_cond_idx);
+
+ const auto &input_true = ...
+ const auto &input_false = ...
+ ir::Operand &output = ...
+
+ // Select output shpae
+ ir::Shape new_shape = shape_inference::inferSelectShape(
+ input_cond.info().shape(), input_true.info().shape(), input_false.info().shape());
+ output.info().shape(new_shape);
+}
+```
+- [`DynamicShapeInference.h`](/runtime/onert/core/include/exec/DynamicShapeInference.h)
+```CPP
+ void visit(const ir::operation::Select &op) override;
+```
+- [`DynamicShapeInference.cc`](/runtime/onert/core/src/exec/DynamicShapeInference.cc)
+```CPP
+void DynamicShapeInferer::visit(const ir::operation::Select &op)
+{
+ const auto input_cond_idx = op.getInputs().at(ir::operation::Select::Input::CONDITION);
+ const auto &input_cond = _tensor_registry->getITensor(input_cond_idx);
+
+ const auto &input_true = ...
+ const auto &input_false = ...
+ auto output = ...
+
+ if ((!input_cond->is_dynamic()) && (!input_true->is_dynamic()) && (!input_false->is_dynamic()))
+ {
+ return;
+ }
+
+ auto input_cond_shape = input_cond->getShape();
+ auto input_true_shape = input_true->getShape();
+ auto input_false_shape = input_false->getShape();
+
+ // Select output shpae
+ ir::Shape new_shape =
+ shape_inference::inferSelectShape(input_cond_shape, input_true_shape, input_false_shape);
+
+ dynamicTensorManagerOf(output)->applyShape(output_ind, new_shape);
+}
+```
+
## Frontend
This module generates IR from a model. There are two kinds of frontend: Loader and NNAPI. First, Loader loads a model file and generates IR from it. Second, NNAPI generates IR from a model set via [Neural Networks API of android](https://developer.android.com/ndk/guides/neuralnetworks)
diff --git a/docs/release/1.9/release-note-1.9.0.md b/docs/release/1.9/release-note-1.9.0.md
new file mode 100644
index 000000000..5ac434b30
--- /dev/null
+++ b/docs/release/1.9/release-note-1.9.0.md
@@ -0,0 +1,38 @@
+# Release Note 1.9.0
+
+## ONE Compiler
+
+### Compiler supports more operations
+
+- NonMaxSuppressionV4, NonMaxSuppressionV5, PadV2, Unique
+
+### Changes
+
+- Quantization enhancements: channel wise UINT8 quantization(Conv2D, DepwiseConv, TransposeConv, FullyConnected)
+- Experimental requantization from INT8 to UINT8
+- Adding more operator value tests
+- tf2tfliteV2 supports conversion from Keras model, saved model
+- Refactoring for better maintenance long Class codes using visitor patterns
+- Introducing optimization pass that fuses batch normalization with Transposed Convolution.
+
+
+## ONE Runtime
+
+### Runtime backend operation support
+
+- CPU backend: RANK
+- CPU backend qasymm uint8: LOG_SOFTMAX
+- ACL-CL backend: LEAKY_RELU, RESIZE_NEAREST_NEIGHBOR
+
+
+### Optimization
+
+- Copy Elimination between compatible backends
+
+### Operation Implementation
+
+- Operations with same parameters are unified
+
+### Change
+
+- CPU backend qasymm uint8 performance enhancement: arithmetic operations
diff --git a/docs/runtime/compute.md b/docs/runtime/compute.md
index 3768cf013..857a589d8 100644
--- a/docs/runtime/compute.md
+++ b/docs/runtime/compute.md
@@ -1 +1,13 @@
# Compute
+
+`compute` directory is for the libraries for actual computation of neural network operations. These libraries are used by backends. Currently we have two libraries.
+
+## ARMComputeEx
+
+It is an extension of ARM [ComputeLibrary](https://github.com/ARM-software/ComputeLibrary), in order to support some operations that are not yet supported by ComputeLibrary. It is used by `acl_cl` and `acl_neon` backends.
+
+The code structure looks just like ComputeLibrary's. Some of the code could be copied from the latest version of ComputeLibrary to support some operations quickly when those are not included in the latest version yet.
+
+## cker
+
+"cker" stands for Cpu KERnel. It is a port of Tensorflow lite's operation kernels and possibly there are some own code. It is used by `cpu` backend.