From 62529acabbafce7730601ed01d5709d7bc0d378a Mon Sep 17 00:00:00 2001 From: Chunseok Lee Date: Mon, 14 Dec 2020 14:43:43 +0900 Subject: Imported Upstream version 1.12.0 --- .../examples/one_op_in_tflite/metadata/MANIFEST | 3 ++- .../examples/one_op_in_tflite/metadata/config.cfg | 1 + nnpackage/spec/10_packaging_and_manifest.md | 27 ++++++++++++++++++++-- 3 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 nnpackage/examples/one_op_in_tflite/metadata/config.cfg (limited to 'nnpackage') diff --git a/nnpackage/examples/one_op_in_tflite/metadata/MANIFEST b/nnpackage/examples/one_op_in_tflite/metadata/MANIFEST index 1d96cce1b..3ed12f99d 100644 --- a/nnpackage/examples/one_op_in_tflite/metadata/MANIFEST +++ b/nnpackage/examples/one_op_in_tflite/metadata/MANIFEST @@ -1,7 +1,8 @@ { "major-version" : "1", - "minor-version" : "0", + "minor-version" : "1", "patch-version" : "0", + "configs" : [ "config.cfg" ], "models" : [ "add.tflite" ], "model-types" : [ "tflite" ] } diff --git a/nnpackage/examples/one_op_in_tflite/metadata/config.cfg b/nnpackage/examples/one_op_in_tflite/metadata/config.cfg new file mode 100644 index 000000000..776fa7024 --- /dev/null +++ b/nnpackage/examples/one_op_in_tflite/metadata/config.cfg @@ -0,0 +1 @@ +BACKENDS="cpu" diff --git a/nnpackage/spec/10_packaging_and_manifest.md b/nnpackage/spec/10_packaging_and_manifest.md index d4e6ec8bd..4dc3de874 100644 --- a/nnpackage/spec/10_packaging_and_manifest.md +++ b/nnpackage/spec/10_packaging_and_manifest.md @@ -18,11 +18,13 @@ For `model` and `custom_op`, see [20_model_and_operators.md](20_model_and_operat nnpackage ├── custom_op ├── metadata -│   └── MANIFEST +│   ├── MANIFEST +│   └── config.cfg └── mymodel.model ``` - `mymodel.model` is a model file that has computation graph and weights. +- `config.cfg` is a configuration file that has parameters to configure onert. - `metadata` is a directory that contains all metadata including `MANIFEST`. - `MANIFEST` is a collection of attributes about this package. - `custom_op` is a directory that contains implementation objects. @@ -61,6 +63,11 @@ For detail, see [semantic versioning 2.0.0](https://semver.org/) `patch-version` is the patch version of `nnpackage`. +#### configs + +`configs` is an array of configuration file names placed in `metadata` folder. This can be empty or +attribute itself can be omitted. As of now we only support only one item. + #### models `models` is an array of path to model files, which is relative path from top level directory of this package. @@ -84,9 +91,25 @@ Here is an example of `MANIFEST`. ``` { "major-version" : "1", - "minor-version" : "0", + "minor-version" : "1", "patch-version" : "0", + "configs" : [ "model.cfg" ], "models" : [ "mymodel.model", "yourmodel.model" ], "model-types" : [ "tflite", "circle" ] } ``` + +## 5. Configuration file + +Configuration file is a human readable plain text file having one `key=value` in each line. +- `#` is used as comment and will be ignored afterwards. +- all leading and trailing white spaces will be ignored in both `key` and `value`. + +For example +``` +BACKENDS=cpu +# leading/trailing space is ignored + EXCUTOR=Linear # some comment +``` + +Refer `runtime/onert/core/include/util/Config.lst` file for more information of `key`. -- cgit v1.2.3