summaryrefslogtreecommitdiff
path: root/nnpackage
diff options
context:
space:
mode:
authorChunseok Lee <chunseok.lee@samsung.com>2020-12-14 14:43:43 +0900
committerChunseok Lee <chunseok.lee@samsung.com>2020-12-14 14:43:43 +0900
commit62529acabbafce7730601ed01d5709d7bc0d378a (patch)
treebf6912cfa8fac4a2997292bfcb3c82055734c97e /nnpackage
parent6ea13af5257155ff993c205cf997b870cc627f73 (diff)
downloadnnfw-62529acabbafce7730601ed01d5709d7bc0d378a.tar.gz
nnfw-62529acabbafce7730601ed01d5709d7bc0d378a.tar.bz2
nnfw-62529acabbafce7730601ed01d5709d7bc0d378a.zip
Imported Upstream version 1.12.0upstream/1.12.0
Diffstat (limited to 'nnpackage')
-rw-r--r--nnpackage/examples/one_op_in_tflite/metadata/MANIFEST3
-rw-r--r--nnpackage/examples/one_op_in_tflite/metadata/config.cfg1
-rw-r--r--nnpackage/spec/10_packaging_and_manifest.md27
3 files changed, 28 insertions, 3 deletions
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`.