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
:warning:**You are using a development branch. Things might be broken. For a proper usage of embARC MLI Library please checkout the [latest release](https://github.com/foss-for-synopsys-dwc-arc-processors/embarc_mli/releases).**
5
-
6
-
7
4
This repository contains source code of embARC Machine Learning Inference Library (embARC MLI Library), its documentation and examples. The primary purpose of this library is to enable developers to efficiently implement and/or port data processing algorithms based on machine learning principles for DSP-enhanced ARC Processors.
8
5
9
6
# Table of Content
@@ -24,19 +21,55 @@ This repository contains source code of embARC Machine Learning Inference Librar
24
21
25
22
# Release Notes
26
23
27
-
1. Early access of version 2.0 ("2.0_EA")
28
-
2. Release notes will be populated closer to the release date.
24
+
1. Version 2.0 EA
25
+
* This is the first early access release for embARC MLI 2.0 (MLI 2.0 EA)
26
+
***It is highly recommended to use embARC MLI 2.0 for VPX and x86 emulation targets only. You can use [embARC MLI 1.1](https://github.com/foss-for-synopsys-dwc-arc-processors/embarc_mli/releases/tag/Release_1.1) for EM/HS targets.**
27
+
* Not all kernels are fully optimized
28
+
29
+
3. This release supports following functional primitives
30
+
* 2D Convolution
31
+
* 2D Depthwise Convolution
32
+
* 2D Transpose Convolution
33
+
* 2D Group Convolution
34
+
* Fully Connected layer
35
+
* Max and average pooling
36
+
* LSTM and GRU recurrent cells
37
+
* RNN Dense layer
38
+
* Elementwise (add, sub, mul, min, max)
39
+
* Permute
40
+
* Argmax
41
+
* Data manipulation (concatenation, permute, 2D padding)
42
+
* ReLU, Leaky ReLU, Parametric ReLU, ReLU1, ReLU6
43
+
* Softmax, Sigmoid, TanH, L2 Normalization
44
+
* Helper functions to copy (partial) tensors (mli_mov*)
45
+
46
+
3. Supported data layout:
47
+
* Data layout HWC (Height-Width-Channel)
48
+
49
+
4. Supported data format:
50
+
* Fixed point 8bit and 16bit (fx8 and fx16)
51
+
* Signed asymmetric 8bit quantization (sa8)
52
+
* Signed asymmetric datatype supports per-tensor or per channel quantization with 16bit scale factors.
53
+
54
+
5. Slicing support: creation of sub-tenors and support for non-contiguous tensor data.
55
+
56
+
6. Supported platforms:
57
+
* VPX
58
+
* x86 emulation
59
+
60
+
6. Toolchains support:
61
+
*[MetaWare Development Tools](https://www.synopsys.com/dw/ipdir.php?ds=sw_metaware) version 2021.03 and newer.
62
+
* GCC 9.1.0 (for x86 emulation)
63
+
* MSVC 2019 (for x86 emulation)
29
64
30
65
# Documentation
31
66
32
67
embARC MLI library API documentation for version 2.0 is available in the [/doc](/doc) directory. It can be built from sources as described in the related [readme file](doc/README.md).
33
68
34
-
The documentation will be available online closer to the release date.
35
-
<!--Read the documentation at [github.io](https://foss-for-synopsys-dwc-arc-processors.github.io/embarc_mli/doc/build/html/index.html).-->
69
+
The documentation will be available online closer to the final release date.
36
70
37
71
# Package Structure
38
72
39
-
<!-- Requires update on the examples side-->
40
73
`./bin` - directory for embARC MLI library binary archive created during build
41
74
`./obj` - directory for all intermediate artifacts created during build
42
75
`./cmake` - contains CMake settings file
@@ -148,34 +181,20 @@ As a result of configuration and build you will find `bin/native` folder with th
148
181
149
182
The first step is to open a command line and change working directory to the root of the embARC MLI repo. Afterward, you can use one of the following commands.
150
183
151
-
1. Build project to emulate ARC EMxD platform:
152
-
```bash
153
-
gmake build ROUND_MODE=CONVERGENT
154
-
```
155
-
156
-
2. Build project to emulate ARC VPX platform:
184
+
1. Build project to emulate ARC VPX platform:
157
185
```bash
158
186
gmake build ROUND_MODE=UP FULL_ACCU=OFF
159
187
```
160
188
161
-
3. Build project to emulate ARC VPX platform with full debug checking of parameters and assertions in runtime. Use multithreaded build process (4 threads):
189
+
2. Build project to emulate ARC VPX platform with full debug checking of parameters and assertions in runtime. Use multithreaded build process (4 threads):
Main target platforms for embARC MLI Library are ARC processors. The specific processor family is determined by *.tcf file provided for library configuration. Supported ARC Processor families:
176
-
- ARC VPX
177
-
- ARC EMxD (partially optimized)
178
-
- ARC HSxD (partially optimized)
197
+
Main target platforms for embARC MLI Library are ARC processors. The specific processor family is determined by *.tcf file provided for library configuration. It is highly recommended to use embARC MLI 2.0 for VPX processor only. EM/HS targets are not properly tested and optimized. You can use [embARC MLI 1.1](https://github.com/foss-for-synopsys-dwc-arc-processors/embarc_mli/releases/tag/Release_1.1).
179
198
180
199
embARC MLI Library build for ARC processors requires [MetaWare Development Tools](https://www.synopsys.com/dw/ipdir.php?ds=sw_metaware) (MWDT) version 2021.03 and higher.
181
200
@@ -187,7 +206,7 @@ To build embARC MLI library you need
[`TCF_FILE`](#tcf_file) is a mandatory option for ARC target. Package contains several TCF files in `/hw` directory with recommended target configs for evaluation or for existing ARC based boards (see related [readme file](hw/README.md)).
209
+
[`TCF_FILE`](#tcf_file) is a mandatory option for ARC target.
191
210
192
211
**In case you are going to compile and run tests or examples it is better to provide the path to a runtime library using the [`BUILDLIB_DIR`](#buildlib_dir) option.**
193
212
@@ -203,35 +222,30 @@ As a result of configuration and build you will find `bin/arc` folder with the M
203
222
204
223
205
224
### **Build Command Examples For ARC Processors**
225
+
The following commands assume usage of the recommended VPX configuration. TCF for this configuration you need to generate using _tcfgen_ tool delivered with MetaWare Development tools. The first step is to open a command line and change working directory to the root of the embARC MLI repo. Then use the following command to generate recommended tcf file taking default `vpx5_integar_full` configuration as basis:
206
226
207
-
The first step is to open a command line and change working directory to the root of the embARC MLI repo. Afterward, you can use one of the following commands.
1. Build project for recommended ARC VPX evaluation target. [`BUILDLIB_DIR`](#buildlib_dir) is mandatory for this, but default "vpx5_integer_full" pack delivered with MWDT tools can be used. Use multithreaded build process (4 threads):
Afterward, you can use one of the following commands to configure and build the package:
213
232
214
-
2. Build project for recommended ARC EM9D evaluation target. Default runtime libraries can be used. Use multithreaded build process (4 threads):
215
-
```bash
216
-
gmake TCF_FILE=../../hw/em9d.tcf JOBS=4 build
217
-
```
218
233
219
-
3. Build project forrecommended ARC VPX evaluation target optimized for code size and with full debug checking of parameters and assertionsin runtime. Use multithreaded build process (4 jobs):
234
+
1. Build project for recommended ARC VPX evaluation target. [`BUILDLIB_DIR`](#buildlib_dir) is mandatory for this, but default "vpx5_integer_full" pack delivered with MWDT tools can be used. Use multithreaded build process (4 threads):
4. Reconfigure and build existing ARC project forrecommended ARC EM9D evaluation targetin 4 threads with debug checking (no asserts):
239
+
2. Build project forrecommended ARC VPX evaluation target optimized for code size and with full debug checking of parameters and assertionsin runtime. Use multithreaded build process (4 jobs):
5. Build project forrecommended ARC VPX evaluation target using reference code. It's unoptimized straightforward and expected to be bitwise with optimized one. Use multithreaded build process (4 jobs) and artifacts are storedin`bin/arc_ref` and `obj/arc_ref`:
245
+
3. Build project forrecommended ARC VPX evaluation target using reference code. It's unoptimized straightforward and expected to be bitwise with optimized one. Use multithreaded build process (4 jobs) and artifacts are storedin`bin/arc_ref` and `obj/arc_ref`:
The TCF file defines ARC target processor hardware configuration.
271
-
[`./hw`](/hw) directory contains several TCF files for evaluation, or you can supply your own TCF that aligns with your hardware configuration. This option is mandatory for ARC platform and must not be set for x86 host emulation.
284
+
The TCF file defines ARC target processor hardware configuration.
285
+
You can supply your own TCF that aligns with your hardware configuration. If you don't have a specific tcf file, you can use the _tcfgen_ util delivered with MetaWare Development tools. Basic _vpx5_integer_full_ template delivered with MetaWare Development tools might be a good starting point. The _tcfgen_ tool is documented in Linker and Utils guide which is also delivered with MetaWare Development tools. This option is mandatory for ARC platform and must not be setfor x86 host emulation.
0 commit comments