Skip to content

Commit 455fc11

Browse files
authored
Merge pull request #55 documentation updates
DOCS: Fixed links to TF docs + added link to online MLI documentation…
2 parents 339c18d + fb38bae commit 455fc11

File tree

7 files changed

+45
-7
lines changed

7 files changed

+45
-7
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
embARC Machine Learning Inference Library
22
==================================================
33

4-
This repository contains source code of embARC Machine Learning Inference Library (embARC MLI Library),
5-
examples and documentation.
4+
This repository contains source code of embARC Machine Learning Inference Library (embARC MLI Library),
5+
documentation and examples. Read the documentation at [embarc.org](https://embarc.org/embarc_mli).
66

77
## Release notes
88
----------------

doc/documents/MLI_kernels/convolution_2d.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ inputs shape.
4949

5050
For more details on calculations see convolution part of `TensorFlow–Neural Network details`_.
5151

52-
.. _TensorFlow–Neural Network details: https://www.tensorflow.org/api_guides/python/nn.
52+
.. _TensorFlow–Neural Network details: https://www.tensorflow.org/versions/r1.11/api_guides/python/nn
5353

5454
ReLU activation function might be applied to result of convolution. The
5555
following types of ReLU activations are supported (for more info see

doc/documents/MLI_kernels/pooling_max.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ padding parameters. This logic is similar to convolution 2D operation
3434
For more information on calculations, see the pooling part of
3535
`TensorFlow–Neural Network details`_.
3636

37-
.. _TensorFlow–Neural Network details: https://www.tensorflow.org/api_guides/python/nn
37+
.. _TensorFlow–Neural Network details: https://www.tensorflow.org/versions/r1.11/api_guides/python/nn
3838

3939
.. caution::
4040
Ensure that input and output

doc/documents/library_model/functions.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ Naming convention for the specializations: \
137137
| | parameters to achieve | |
138138
| | same output size | |
139139
| | (similar to ‘SAME’ | |
140-
| | padding scheme used | |
141-
| | in TensorFlow [3]) | |
140+
| | `padding scheme`_ used | |
141+
| | in TensorFlow) | |
142142
+-----------------------+---------------------------+-----------------------+
143143
| ``Input channels`` | [_ch\ *n*] | convolution group, |
144144
| | | pooling group |
@@ -182,6 +182,9 @@ Naming convention for the specializations: \
182182
| | specializations. | |
183183
+-----------------------+---------------------------+-----------------------+
184184

185+
.. _padding scheme: https://www.tensorflow.org/versions/r1.11/api_guides/python/nn#Notes_on_SAME_Convolution_Padding
186+
187+
185188

186189
For example, the function name of a 16bit 2d convolution kernel with
187190
CHW layout and a kernel size of 3x3 and stride of 1 is:

doc/documents/library_model/hw_dependencies_config.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ round to the nearest even). All parameters are described in *MetaWare
109109
Fixed-Point Reference for ARC EM and ARC HS*.
110110

111111
.. note::
112-
The MLI Library sets the required DSP mode inside each function where it is needed, but does not restore it to previous state. If another ARC DSP code beside MLI library is used in an application, ensure that you set the required DSP mode before its execution. For more information see “Configuring the ARC DSP Extensions” section of *MetaWare DSP Programming Guide for ARC EM and ARC HS* or “Using the FXAPI” section of entry [5] of *MetaWare Fixed-Point Reference for ARC EM and ARC HS*.
112+
The MLI Library sets the required DSP mode inside each function where it is needed, but does not restore it to previous state. If another ARC DSP code beside MLI library is used in an application, ensure that you set the required DSP mode before its execution. For more information see “Configuring the ARC DSP Extensions” section of *MetaWare DSP Programming Guide for ARC EM and ARC HS* or “Using the FXAPI” section of *MetaWare Fixed-Point Reference for ARC EM and ARC HS*.
113113

114114
AGU Support
115115
^^^^^^^^^^^

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)