diff options
author | Chunseok Lee <chunseok.lee@samsung.com> | 2020-12-14 14:43:43 +0900 |
---|---|---|
committer | Chunseok Lee <chunseok.lee@samsung.com> | 2020-12-14 14:43:43 +0900 |
commit | 62529acabbafce7730601ed01d5709d7bc0d378a (patch) | |
tree | bf6912cfa8fac4a2997292bfcb3c82055734c97e /docs | |
parent | 6ea13af5257155ff993c205cf997b870cc627f73 (diff) | |
download | nnfw-62529acabbafce7730601ed01d5709d7bc0d378a.tar.gz nnfw-62529acabbafce7730601ed01d5709d7bc0d378a.tar.bz2 nnfw-62529acabbafce7730601ed01d5709d7bc0d378a.zip |
Imported Upstream version 1.12.0upstream/1.12.0
Diffstat (limited to 'docs')
-rw-r--r-- | docs/conf.py | 2 | ||||
-rw-r--r-- | docs/howto/how-to-add-a-new-operation.md | 2 | ||||
-rw-r--r-- | docs/howto/how-to-introduce-a-new-operation-into-runtime.md | 48 | ||||
-rw-r--r-- | docs/howto/how-to-use-specific-backend.md | 40 | ||||
-rw-r--r-- | docs/howto/index.rst | 15 | ||||
-rw-r--r-- | docs/release/1.10/index.rst | 13 | ||||
-rw-r--r-- | docs/release/1.11/index.rst | 13 | ||||
-rw-r--r-- | docs/release/1.11/release-note-1.11.1.md | 7 | ||||
-rw-r--r-- | docs/release/1.12/index.rst | 13 | ||||
-rw-r--r-- | docs/release/1.12/release-note-1.12.0.md | 28 | ||||
-rw-r--r-- | docs/release/1.5/index.rst | 13 | ||||
-rw-r--r-- | docs/release/1.6/index.rst | 13 | ||||
-rw-r--r-- | docs/release/1.7/index.rst | 13 | ||||
-rw-r--r-- | docs/release/1.7/release-note-1.7.0.md | 46 | ||||
-rw-r--r-- | docs/release/1.8/index.rst | 13 | ||||
-rw-r--r-- | docs/release/1.9/index.rst | 14 | ||||
-rw-r--r-- | docs/release/index.rst | 8 | ||||
-rw-r--r-- | docs/runtime/index.rst | 7 | ||||
-rw-r--r-- | docs/runtime/supported-operations-backend.md | 19 |
19 files changed, 267 insertions, 60 deletions
diff --git a/docs/conf.py b/docs/conf.py index 1185bcffa..68b7d0628 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.11.1' +release = '1.12.0' # -- General configuration --------------------------------------------------- diff --git a/docs/howto/how-to-add-a-new-operation.md b/docs/howto/how-to-add-a-new-operation.md index 8ea7014a3..241ba6cb1 100644 --- a/docs/howto/how-to-add-a-new-operation.md +++ b/docs/howto/how-to-add-a-new-operation.md @@ -6,4 +6,4 @@ ## Runtime -- [How to introduce a new operatoin into runtime](how-to-introduce-a-new-operation-into-runtime.md) +- [How to introduce a new operation into runtime](how-to-introduce-a-new-operation-into-runtime.md) 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 f8fc0201b..9ab498783 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 @@ -24,7 +24,6 @@ onert support the operation. - [acl_cl](#acl_cl-1) - [acl_neon](#acl_neon-1) - [cpu](#cpu-1) - - [TensorRegister (in some cases)](#tensorregister-in-some-cases) - [ConstantInitializer (in some cases)](#constantinitializer-in-some-cases) - [cpu](#cpu-2) - [Samples (to be updated)](#samples-to-be-updated) @@ -420,51 +419,28 @@ void visit(const ir::operation::Select &) override; ```cpp void KernelGenerator::visit(const ir::operation::Select &node) { - const auto output_index{node.getOutputs().at(ir::operation::Select::Output::OUTPUT)}; - const auto cond_index{node.getInputs().at(ir::operation::Select::Input::COND)}; - const auto input1_index{node.getInputs().at(ir::operation::Select::Input::INPUT1)}; - const auto input2_index{node.getInputs().at(ir::operation::Select::Input::INPUT2)}; - - const auto output_backend_descr = ::onert::backend::cpu::kernel::getTensorDescriptor( - _ctx.at(output_index), _current_op_seq_layout); - const auto cond_backend_descr = ::onert::backend::cpu::kernel::getTensorDescriptor( - _ctx.at(cond_index), _current_op_seq_layout); - const auto input1_backend_descr = ::onert::backend::cpu::kernel::getTensorDescriptor( - _ctx.at(input1_index), _current_op_seq_layout); - const auto input2_backend_descr = ::onert::backend::cpu::kernel::getTensorDescriptor( - _ctx.at(input2_index), _current_op_seq_layout); + const auto output_index{node.getOutputs().at(0)}; + const auto condition_index{node.getInputs().at(ir::operation::Select::Input::CONDITION)}; + const auto true_index{node.getInputs().at(ir::operation::Select::Input::INPUT_TRUE)}; + const auto false_index{node.getInputs().at(ir::operation::Select::Input::INPUT_FALSE)}; - auto output_alloc = _tensor_builder->at(output_index).get(); - auto cond_alloc = _tensor_builder->at(cond_index).get(); - auto input1_alloc = _tensor_builder->at(input1_index).get(); - auto input2_alloc = _tensor_builder->at(input2_index).get(); + auto output_tensor = _tensor_reg->getPortableTensor(output_index); + auto condition_tensor = _tensor_reg->getPortableTensor(condition_index); + auto true_tensor = _tensor_reg->getPortableTensor(true_index); + auto false_tensor = _tensor_reg->getPortableTensor(false_index); - auto fn = std::make_unique<::onert::backend::cpu::kernel::SelectLayer>(); + auto fn = std::make_unique<ops::SelectLayer>(); - fn->configure(cond_alloc->buffer(), cond_backend_descr, input1_alloc->buffer(), - input1_backend_descr, input2_alloc->buffer(), input2_backend_descr, - output_alloc->buffer(), output_backend_descr); + fn->configure(condition_tensor, true_tensor, false_tensor, output_tensor); - _execution_builder->append(std::move(fn)); + _return_fn = std::move(fn); } ``` -### TensorRegister (in some cases) - -This component registers tensors. Most tensors will be automatically registered internally. There -are some exceptions, however, where additional implementations are required. It is the case when a -tensor is treated unusually in its backend. - -The kernel of some operation has weights in `HWIO` as layout(data format) in case of that input's -layout is `NHWC`. And, for `NCHW`, weights is `OIHW`. But TFLite model has weigths, `OHWI` for -`NHWC` and `OIHW` for `NCHW`. Therefore, to register the appropriate tensor on the backend, you have -to implement it additionally. - ### ConstantInitializer (in some cases) This component registers function initializing constant tensors and initialize constant tensor -layer. This is similar to TensorRegister. Most tensors will be automatically registered internally. -And there are some exceptions. +layer. Most tensors will be automatically registered internally. And there are some exceptions. #### cpu diff --git a/docs/howto/how-to-use-specific-backend.md b/docs/howto/how-to-use-specific-backend.md new file mode 100644 index 000000000..32e1b831b --- /dev/null +++ b/docs/howto/how-to-use-specific-backend.md @@ -0,0 +1,40 @@ +# How to Use Specific Backend during Inference + +ONE runtime has many ways to use specific backend during inference + +## Using NNFW API + +### [nnfw_set_available_backends](https://github.com/Samsung/ONE/blob/c46ddc04abdb58323fbd38389e6927f003bfaea1/runtime/onert/api/include/nnfw.h#L458) +- Multiple backends can be set and they must be separated by a semicolon (ex: "acl_cl;cpu"). +- For each backend string, `libbackend_{backend}.so` will be dynamically loaded during nnfw_prepare. +- Among the multiple backends, the 1st element is used as the default backend. + +### [nnfw_set_op_backend](https://github.com/Samsung/ONE/blob/c46ddc04abdb58323fbd38389e6927f003bfaea1/runtime/onert/api/include/nnfw.h#L476) +- The backend for op has higher priority than available backends specified by nnfw_set_available_backends. + +## Using Environment Variable + +### 1. BACKENDS +- Same as `nnfw_set_available_backends` +- Example +```bash +BACKENDS=cpu ./Product/out/bin/nnpackage_run ... +``` + +### 2. OP_BACKEND_[OP_TYPE] +- Same as `nnfw_set_op_backend` +- Set backend for specific operator type +- Example + - Execute `Conv2D` operator on ruy backend and others on cpu backend +```bash +OP_BACKEND_Conv2D=ruy BACKENDS="cpu;ruy" ./Product/out/bin/nnpackage_run ... +``` + +### 3. OP_BACKEND_MAP +- Set backend for specific operator by its index +- Format : `<op_id>=<backend>;<op_id>=<backend>...` +- Example + - Execute `operator 10` on `acl_cl` backend and others on `acl_neon` backend +```bash +OP_BACKEND_MAP="10=acl_cl" BACKENDS="acl_neon;acl_cl" ./Product/out/bin/nnpackage_run ... +``` diff --git a/docs/howto/index.rst b/docs/howto/index.rst index c84902a39..faeedbfaa 100644 --- a/docs/howto/index.rst +++ b/docs/howto/index.rst @@ -10,19 +10,22 @@ How To :maxdepth: 2 :caption: Contents: - ./how-to-add-a-new-operation.md ./how-to-build-compiler.md ./how-to-build-package.md ./how-to-build-runtime.md ./how-to-build-runtime-tizen-gbs-rpi4.md ./how-to-build-runtime-using-prebuilt-docker-image.md - ./how-to-cross-build-runtime-for-arm.md ./how-to-cross-build-runtime-for-aarch64.md ./how-to-cross-build-runtime-for-android.md - ./how-to-contribute.md - ./how-to-make-an-application-with-runtime.md - ./how-to-remote-debugging-with-visual-studio-code.md + ./how-to-cross-build-runtime-for-arm.md ./how-to-run-package.md + ./how-to-make-an-application-with-runtime.md ./how-to-use-api.md - ./how-to-use-nnfw-api.md ./how-to-use-nnapi-binding.md + ./how-to-use-nnfw-api.md + ./how-to-use-specific-backend.md + ./how-to-contribute.md + ./how-to-remote-debugging-with-visual-studio-code.md + ./how-to-add-a-new-operation.md + ./how-to-introduce-a-new-operation-into-compiler.md + ./how-to-introduce-a-new-operation-into-runtime.md diff --git a/docs/release/1.10/index.rst b/docs/release/1.10/index.rst new file mode 100644 index 000000000..bc415fbda --- /dev/null +++ b/docs/release/1.10/index.rst @@ -0,0 +1,13 @@ +.. ONE documentation master file, created by + sphinx-quickstart on Thu May 14 18:13:12 2020. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +1.0 +=== + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + ./release-note-1.10.0.md diff --git a/docs/release/1.11/index.rst b/docs/release/1.11/index.rst new file mode 100644 index 000000000..2e4544af6 --- /dev/null +++ b/docs/release/1.11/index.rst @@ -0,0 +1,13 @@ +.. ONE documentation master file, created by + sphinx-quickstart on Thu May 14 18:13:12 2020. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +1.0 +=== + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + ./release-note-1.11.0.md diff --git a/docs/release/1.11/release-note-1.11.1.md b/docs/release/1.11/release-note-1.11.1.md deleted file mode 100644 index 9efedf602..000000000 --- a/docs/release/1.11/release-note-1.11.1.md +++ /dev/null @@ -1,7 +0,0 @@ -# Release Note 1.11.1 - -## ONE Runtime - -### Hot Fixes - -- Fix segfault due to the wrong BCQGather DynamicShapeInferer's behavior diff --git a/docs/release/1.12/index.rst b/docs/release/1.12/index.rst new file mode 100644 index 000000000..68b4c7347 --- /dev/null +++ b/docs/release/1.12/index.rst @@ -0,0 +1,13 @@ +.. ONE documentation master file, created by + sphinx-quickstart on Thu May 14 18:13:12 2020. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +1.0 +=== + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + ./release-note-1.12.0.md diff --git a/docs/release/1.12/release-note-1.12.0.md b/docs/release/1.12/release-note-1.12.0.md new file mode 100644 index 000000000..1f13bc4ce --- /dev/null +++ b/docs/release/1.12/release-note-1.12.0.md @@ -0,0 +1,28 @@ +# Release Note 1.12.0 + +## ONE Compiler + +### Compiler Frontend + +- Add optimization pass: ReplaceMulAddWithDepthwiseConvPass, SubstitutePackToReshape, RemoveRedundantTranspose, ShuffleWeightTo16x1Float32Pass +- Add quantization for InstanceNorm. +- Fix bug of `one-import-bcq` command for `--v1`, `--v2` arguments. +- Fix FuseBCQPass to work with inter-subgraphs in the model file and minor BCQ related optimizations. + +## ONE Runtime + +### Runtime backend operation supports more operations and types + +- CPU backend + - Concat: int8 + - DepthToSpace: float, uint8, int8 + - LeakyRelu: float +- ACL-CL backend + - ArgMin: float, uint8, int8 +- ACL-NEON backend + - ArgMax: int8 + - ArgMin: float, uint8, int8 + +### nnpackage defines configuration file + +- Allow users to set configuration variable via conf file. For more information, See [nnpackage spec](../../../nnpackage/spec) diff --git a/docs/release/1.5/index.rst b/docs/release/1.5/index.rst new file mode 100644 index 000000000..0764bf230 --- /dev/null +++ b/docs/release/1.5/index.rst @@ -0,0 +1,13 @@ +.. ONE documentation master file, created by + sphinx-quickstart on Thu May 14 18:13:12 2020. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +1.0 +=== + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + ./release-note-1.5.0.md diff --git a/docs/release/1.6/index.rst b/docs/release/1.6/index.rst new file mode 100644 index 000000000..79389cf08 --- /dev/null +++ b/docs/release/1.6/index.rst @@ -0,0 +1,13 @@ +.. ONE documentation master file, created by + sphinx-quickstart on Thu May 14 18:13:12 2020. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +1.0 +=== + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + ./release-note-1.6.0.md diff --git a/docs/release/1.7/index.rst b/docs/release/1.7/index.rst new file mode 100644 index 000000000..65a839f13 --- /dev/null +++ b/docs/release/1.7/index.rst @@ -0,0 +1,13 @@ +.. ONE documentation master file, created by + sphinx-quickstart on Thu May 14 18:13:12 2020. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +1.0 +=== + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + ./release-note-1.7.0.md diff --git a/docs/release/1.7/release-note-1.7.0.md b/docs/release/1.7/release-note-1.7.0.md new file mode 100644 index 000000000..c1a4f50b2 --- /dev/null +++ b/docs/release/1.7/release-note-1.7.0.md @@ -0,0 +1,46 @@ +## Feature Highlights + +- **ONE** Compiler + - Compiler supports more operations + - New command line interface for user interface consistancy +- **ONE** Runtime + - Runtime CPU backend supports more operations + - Runtime CPU backend supports more quant8 operations + - API changes + - New optimization + +## ONE Compiler + +### Compiler supports more operations + +- MatrixDiag, MatrixSetDiag, ReverseSequence, ReverseV2, SegmentSum, SelectV2, SparseToDense, Where + +### New command line interface for user interface consistancy + +- one-import: imports conventional model files to circle + - one-import-tf: imports TensorFlow model to circle + - one-import-tflite: imports TensorFlow lite model to circle +- one-optimize: circle optimize command +- one-quantize: circle quantize command + - supports float32 to uint8, layer wise (for Conv series) +- one-pack: package command +- one-prepare-venv: prepares python virtual environment for importing TensorFlow model +- one-codegen: backend(if available) code generator + +## ONE Runtime + +### Runtime CPU backend supports more operations + +- LogSoftmax, SpaceToBatchND + +### Runtime CPU backend supports more quant8 operations + +- Logistic, Mul, Tanh, SpaceToBatchND, Transpose, Sub, Max, Min, Less, Greater, GreaterEqual, LessEqual, Equal, NotEqual + +### API changes + +- Introduce basic asynchronous execution API + +### New optimization + +- Remove dynamic tensor overhead from static models diff --git a/docs/release/1.8/index.rst b/docs/release/1.8/index.rst new file mode 100644 index 000000000..4dc1d5be9 --- /dev/null +++ b/docs/release/1.8/index.rst @@ -0,0 +1,13 @@ +.. ONE documentation master file, created by + sphinx-quickstart on Thu May 14 18:13:12 2020. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +1.0 +=== + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + ./release-note-1.8.0.md diff --git a/docs/release/1.9/index.rst b/docs/release/1.9/index.rst new file mode 100644 index 000000000..d77012c96 --- /dev/null +++ b/docs/release/1.9/index.rst @@ -0,0 +1,14 @@ +.. ONE documentation master file, created by + sphinx-quickstart on Thu May 14 18:13:12 2020. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +1.0 +=== + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + ./release-note-1.9.0.md + ./release-note-1.9.1.md diff --git a/docs/release/index.rst b/docs/release/index.rst index bb542bc1c..1a5a780c0 100644 --- a/docs/release/index.rst +++ b/docs/release/index.rst @@ -15,3 +15,11 @@ Release ./1.2/index ./1.3/index ./1.4/index + ./1.5/index + ./1.6/index + ./1.7/index + ./1.8/index + ./1.9/index + ./1.10/index + ./1.11/index + ./1.12/index diff --git a/docs/runtime/index.rst b/docs/runtime/index.rst index d44f8222a..e80dfc81e 100644 --- a/docs/runtime/index.rst +++ b/docs/runtime/index.rst @@ -12,8 +12,9 @@ Runtime ./api.md ./core.md - ./compute.md + ./controlflow-operations.md ./executors.md - ./backend-api.md ./heterogeneous-execution.md - ./controlflow-operations.md + ./backend-api.md + ./compute.md + ./supported-operations-backend.md diff --git a/docs/runtime/supported-operations-backend.md b/docs/runtime/supported-operations-backend.md index bcc635536..04ece9765 100644 --- a/docs/runtime/supported-operations-backend.md +++ b/docs/runtime/supported-operations-backend.md @@ -1,6 +1,6 @@ # Supported Operations and backend -As of 2020-11-10 +As of 2020-12-07 ### Raw-data format (float32, int32, boolean, etc) @@ -10,7 +10,7 @@ Abs | O | O | O Add | O | O | O AddN | O | | ArgMax | O | O | O -ArgMin | O | | +ArgMin | O | O | O AvgPool2D | O | O | O BatchMatmul | O | | BatchToSpaceND | O | O | O @@ -19,7 +19,7 @@ Concat | O | O | O Conv2D | O | O | O Cos | O | | Custom | O | | -DepthToSpace | | O | O +DepthToSpace | O | O | O DepthwiseConv2D | O | O | O Div | O | O | O EmbeddingLookup | | O | O @@ -37,7 +37,7 @@ If | O | | InstanceNormalize | | O | O L2Normalization | O | O | O L2Pool | | O | O -LeakyRelu | | O | O +LeakyRelu | O | O | O Less | O | O | O LessEqual | O | O | O LocalResponseNormalize | | O | O @@ -89,6 +89,7 @@ SpaceToDepth | O | O | O Split | O | O | O SplitV | O | | Sqrt | O | O | O +Square | O | | | SquaredDifference | O | O | O Squeeze | O | O | O StridedSlice | O | O | O @@ -110,14 +111,14 @@ Operation | CPU | ACL-CL | ACL-NEON -- | -- | -- | -- Add | O | O | O ArgMax | O | O | O -ArgMin | O | | +ArgMin | O | O | O AvgPool2D | O | O | O BatchToSpaceND | O | O | O Cast | O | O | Concat | O | O | O Conv2D | O | O | O Custom | O | | -DepthToSpace | | O | O +DepthToSpace | O | O | O DepthwiseConv2D | O | O | O Dequantize | O | O | O EmbeddingLookup | | O | O @@ -170,6 +171,12 @@ Unpack(Unstack) | | O | O ### Quantization format (int8) +Operation | CPU | ACL-CL | ACL-NEON +-- | -- | -- | -- +ArgMax | O | O | O +ArgMin | O | O | O +Concat | O | | +DepthToSpace | O | | Dequantize | O | | Rank | O | | Shape | O | | |