Skip to content

Commit 4596e03

Browse files
authored
Readme 2 0 EA
* [README] Draft for 2.0_EA Release
1 parent a6568b9 commit 4596e03

File tree

1 file changed

+60
-45
lines changed

1 file changed

+60
-45
lines changed

README.md

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

4-
: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-
74
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.
85

96
# Table of Content
@@ -24,19 +21,55 @@ This repository contains source code of embARC Machine Learning Inference Librar
2421

2522
# Release Notes
2623

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)
2964

3065
# Documentation
3166

3267
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).
3368

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.
3670

3771
# Package Structure
3872

39-
<!-- Requires update on the examples side-->
4073
`./bin` - directory for embARC MLI library binary archive created during build
4174
`./obj` - directory for all intermediate artifacts created during build
4275
`./cmake` - contains CMake settings file
@@ -148,34 +181,20 @@ As a result of configuration and build you will find `bin/native` folder with th
148181

149182
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.
150183

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:
157185
```bash
158186
gmake build ROUND_MODE=UP FULL_ACCU=OFF
159187
```
160188

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):
162190
```bash
163191
gmake build ROUND_MODE=UP FULL_ACCU=OFF JOBS=4 MLI_DEBUG_MODE=DBG_MODE_FULL
164192
```
165193

166-
4. Reconfigure and build existing x86 project to emulate ARC EM platform in 4 threads with debug checking (no asserts):
167-
```bash
168-
gmake build ROUND_MODE=CONVERGENT \
169-
RECONFIGURE=ON JOBS=4 MLI_DEBUG_MODE=DBG_MODE_RET_CODES
170-
```
171-
172194

173195
## ARC Processors
174196

175-
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).
179198

180199
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.
181200

@@ -187,7 +206,7 @@ To build embARC MLI library you need
187206
gmake build TCF_FILE=<path_to_tcf> [BUILDLIB_DIR=<path_to_target_rt_libs>] <Additional options>
188207
```
189208

190-
[`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.
191210

192211
**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.**
193212

@@ -203,35 +222,30 @@ As a result of configuration and build you will find `bin/arc` folder with the M
203222

204223

205224
### **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:
206226

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.
227+
```bash
228+
tcfgen -o ./hw/vpx5_integer_full.tcf -tcf=vpx5_integer_full -iccm_size=0x80000 -dccm_size=0x40000
229+
```
208230

209-
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):
210-
```bash
211-
gmake TCF_FILE=../../hw/vpx5_integer_full.tcf BUILDLIB_DIR=vpx5_integer_full JOBS=4 build
212-
```
231+
Afterward, you can use one of the following commands to configure and build the package:
213232

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-
```
218233

219-
3. Build project for recommended ARC VPX evaluation target optimized for code size and with full debug checking of parameters and assertions in 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):
220235
```bash
221-
gmake build TCF_FILE=../../hw/vpx5_integer_full.tcf BUILDLIB_DIR=vpx5_integer_full \
222-
OPTMODE=size MLI_DEBUG_MODE=DBG_MODE_FULL JOBS=4
236+
gmake TCF_FILE=./hw/vpx5_integer_full.tcf BUILDLIB_DIR=vpx5_integer_full JOBS=4 build
223237
```
224238

225-
4. Reconfigure and build existing ARC project for recommended ARC EM9D evaluation target in 4 threads with debug checking (no asserts):
239+
2. Build project for recommended ARC VPX evaluation target optimized for code size and with full debug checking of parameters and assertions in runtime. Use multithreaded build process (4 jobs):
226240
```bash
227-
gmake build TCF_FILE=../../hw/em9d.tcf BUILDLIB_DIR=em9d_voice_audio \
228-
RECONFIGURE=ON MLI_DEBUG_MODE=DBG_MODE_RET_CODES JOBS=4
241+
gmake build TCF_FILE=./hw/vpx5_integer_full.tcf BUILDLIB_DIR=vpx5_integer_full \
242+
OPTMODE=size MLI_DEBUG_MODE=DBG_MODE_FULL JOBS=4
229243
```
230244

231-
5. Build project for recommended 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 stored in `bin/arc_ref` and `obj/arc_ref`:
245+
3. Build project for recommended 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 stored in `bin/arc_ref` and `obj/arc_ref`:
232246

233247
```bash
234-
gmake build TCF_FILE=../../hw/vpx5_integer_full.tcf BUILDLIB_DIR=vpx5_integer_full \
248+
gmake build TCF_FILE=./hw/vpx5_integer_full.tcf BUILDLIB_DIR=vpx5_integer_full \
235249
MLI_BUILD_REFERENCE=ON JOBS=4
236250
```
237251

@@ -267,8 +281,9 @@ The first step is to open a command line and change working directory to the roo
267281
### `TCF_FILE`
268282
**Description**: Tool configuration file (TCF) file path.
269283
270-
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 set for x86 host emulation.
286+
272287

273288
**Syntax**: `TCF_FILE=<tcf-file>`
274289
**Values**: one of two options:

0 commit comments

Comments
 (0)