You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
6
6
7
7
## Release notes
8
8
----------------
@@ -16,7 +16,7 @@ examples and documentation.
16
16
* Elementwise (add, sub, mul, min, max)
17
17
* Data manipulation (concatanation, permute, 2D padding)
18
18
* ReLU, Leaky ReLu, ReLu1, ReLu6
19
-
* Softmax, Sigmoid, ThanH
19
+
* Softmax, Sigmoid, TanH
20
20
3. Supported data layout CHW (Channel-Height-Width standard for Caffe)
21
21
22
22
## Package structure
@@ -73,8 +73,29 @@ Building of embARC MLI library
73
73
74
74
5. Result Quality shall be "S/N=1823.9 (65.2 db)"
75
75
76
+
## Optimizations for code size
77
+
------------------------------
78
+
By default the embARC MLI Library is build for optimal speed. If code size needs to be reduced, there are two things that can be done:
79
+
1. For convolution and pooling layers there are specialized funtions for specific kernel sizes, they are called by a wrapper functions based on the parameters.
80
+
These parameters are compile time constant in the application, so the application can directly call the specialized functions. This will reduce over all code size.
81
+
Please be aware that the list of specializations is not guaranteed to be backwards compatible between releases.
82
+
83
+
2. Use a different optimization mode when calling the makefile. OPTMODE=size will optimize for size. default is OPTMODE=speed
84
+
'gmake TCF_FILE=../../hw/em9d.tcf OPTMODE=size'
76
85
77
86
## Known Issues
78
87
---------------
79
88
1. Optimal performance for 8-bit data requires version of MetaWare Development Tools 2019.06 or later
80
89
90
+
## Frequently Asked Questions
91
+
---------------
92
+
93
+
Q: Can I use ARC GNU tools to build embARC MLI library?
94
+
A: No you cannot. embARC MLI Library must be built by MetaWare Development Tools only. Read the documentation at [embarc.org](https://embarc.org/embarc_mli/doc/build/html/getting_started/getting_started.html#build-library) for details
95
+
96
+
Q: Can I use MetaWare Development Tools Lite to pre-build embARC MLI library and ARC GNU to build example application?
97
+
A: No you cannot. embARC MLI Library must be built by full version of MetaWare Development Tools. Binaries built with MWDT Lite are not compatible with ARC GNU Tools and full MetaWare Development Tools. Read the MWDT Lite documentation for details.
98
+
99
+
Q: I can not build and run example application for my Synopsys board (EMSK, IoTDK, etc), what I shall do?
100
+
A: If you build for Synopsys boards refer to documentation [embarc.org](https://embarc.org/platforms.html) as a good starting point.
101
+
You should also note that example applications support different configurations for pre trained models and thus memory requirements, not all configurations can be built and run on Synopsys boards due to memory limitations and HW capabilities, read example application readme for details. embARC MLI Library must be also pre built specifically for your board by MetaWare Development Tools. Please note that makefiles provided with examples are configured for IoTDK only if GNU tools are used.
Copy file name to clipboardExpand all lines: doc/documents/library_model/hw_dependencies_config.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -109,7 +109,7 @@ round to the nearest even). All parameters are described in *MetaWare
109
109
Fixed-Point Reference for ARC EM and ARC HS*.
110
110
111
111
.. 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*.
Copy file name to clipboardExpand all lines: examples/example_cifar10_caffe/README.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,6 +106,21 @@ More Options on Building and Running
106
106
---------------------------------------
107
107
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).
108
108
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 |
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.
0 commit comments