Skip to content

Commit fb38bae

Browse files
committed
DOCS: Complemented examples info on memory requirements + 8x16 mode is mentioned
1 parent 147c016 commit fb38bae

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

examples/example_cifar10_caffe/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,21 @@ More Options on Building and Running
106106
---------------------------------------
107107
CIFAR-10 example application is implemented in the same way as LSTM Based HAR example and provides the same configuration and running abilities. For more details see appropriate HAR example [description part](/examples/example_har_smartphone/README.md#more-options-on-building-and-running).
108108

109+
Data Memory Requirements
110+
----------------------------
111+
112+
Example application uses statically allocated memory for model weights and intermediate results (activations) and structures. Requirements for them depends on model bit depth
113+
configuration define and listed in table below. Before compiling application for desired hardware configuration, be sure it has enough memory to keep data.
114+
115+
| Data | MODEL_BIT_DEPTH=8 | MODEL_BIT_DEPTH=816 | MODEL_BIT_DEPTH=16 |
116+
| :----------------------------------------------------: | :-------------------: | :-------------------: | :------------------: |
117+
| Weights <br/>*.mli_model* and *mli_model_p2 * sections | 33212 bytes | 33212 bytes | 66420 bytes |
118+
| Activations 1 <br/>*.Zdata * section | 32768 bytes | 65536 bytes | 65536 bytes |
119+
| Activations 2 <br/>*.Ydata * section | 8192 bytes | 16384 bytes | 16384 bytes |
120+
| Structures <br/>*.mli_data* section | 384 bytes | 384 bytes | 384 bytes |
121+
122+
By default, application uses MODEL_BIT_DEPTH=16 mode. Application code size depends on target hardware configuration and compilation flags. MLI Library code is wrapped into mli_lib section.
123+
109124
References
110125
----------------------------
111126
CIFAR-10 Dataset:

examples/example_har_smartphone/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ For this reason you can build and check application with 8 and 16 bit depth of N
120120

121121
gmake TCF_FILE=../../hw/em9d.tcf EXT_CFLAGS="-DMODEL_BIT_DEPTH=8"
122122

123+
* 8x16: 8 bit depth of coefficients and 16 bit depth of data:
124+
125+
gmake TCF_FILE=../../hw/em9d.tcf EXT_CFLAGS="-DMODEL_BIT_DEPTH=816"
126+
123127
Example application may be used in three modes:
124128
1. **Built-in input processing.** Uses only hard-coded vector for the single input model inference.
125129
No application input arguments.
@@ -139,6 +143,22 @@ Input test-set and labels paths are required as argument.
139143
Notes: If the example is compiled with GNU tools, then these modes are transferred to the application using mdb_com_gnu command script file for MetaWare Debugger.
140144
Modify this file to customize the example run mode.
141145

146+
147+
Data Memory Requirements
148+
----------------------------
149+
150+
Example application uses statically allocated memory for model weights and intermediate results (activations) and structures. Requirements for them depends on model bit depth
151+
configuration define and listed in table below. Before compiling application for desired hardware configuration, be sure it has enough memory to keep data.
152+
153+
| Data | MODEL_BIT_DEPTH=8 | MODEL_BIT_DEPTH=816 | MODEL_BIT_DEPTH=16 |
154+
| :-----------------------------------------------: | :-------------------: | :-------------------: | :------------------: |
155+
| Weights <br/>(*.mli_model* section) | 17160 bytes | 17160 bytes | 34316 bytes |
156+
| Activations <br/>(*.Xdata* and *.Ydata* sections) | 8352 bytes | 16704 bytes | 16704 bytes |
157+
| Structures <br/>(*.mli_data* section) | 496 bytes | 496 bytes | 496 bytes |
158+
159+
By default, application uses MODEL_BIT_DEPTH=16 mode. Application code size depends on target hardware configuration and compilation flags. MLI Library code is wrapped into mli_lib section.
160+
161+
142162
References
143163
----------------------------
144164
GitHub project served as starting point for this example:

0 commit comments

Comments
 (0)