Skip to content

Commit 662c182

Browse files
authored
Merge pull request #43 from foss-for-synopsys-dwc-arc-processors/doc_techpubs_upd
updating repo after merge
2 parents f350fdf + 4eafdab commit 662c182

21 files changed

+448
-413
lines changed

doc/documents/MLI_FP_data_format/MLI_FP_data_format.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,12 @@ where:
118118
- :math:`\ fx\_ val\ ` \- FX value of the particular Q format
119119
- :math:`\ fraq\_ bits \ ` \- number of :math:`\ fx\_ val\ ` fractional bits
120120
- :math:`\ Round\ () \ ` \- rounding according to one of supported modes
121-
122-
2 :sup:`fraq_bits` represents 1.0 in FX format and also might
123-
be obtained by shifting (1 << fraq_bits). Rounding mode (nearest, up,
121+
122+
:math:`\ 2^{fraq\_ bits} \ ` represents 1.0 in FX format and also might
123+
be obtained by shifting (1 << :math:`\ fraq\_ bits \ `). Rounding mode (nearest, up,
124124
convergence) affects only FX representation accuracy. MLI Library
125-
uses rounding provided by ARCv2 DSP hardware (see :ref:`hw_comp_dpd` ). ``dequant_real_val`` might be not equal to
126-
``real_ val`` in case of immediate forward/backward conversion
125+
uses rounding provided by ARCv2 DSP hardware (see :ref:`hw_comp_dpd` ). :math:`\ dequant\_ real\_ val\ ` might be not equal to
126+
:math:`\ real\_ val\ ` in case of immediate forward/backward conversion
127127
due to rounding operation (see examples 2 and 4 from the following example list).
128128

129129
.. admonition:: Example
@@ -243,8 +243,8 @@ based on the number of additions to be done:
243243

244244
..
245245
246-
Where Ceil(\ *x*) function rounds up *x* to the smallest integer value
247-
that is not less than *x*. From notation point of view, these extra
246+
Where :math:`\text{Ceil}(x)` function rounds up :math:`x` to the smallest integer value
247+
that is not less than :math:`x`. From notation point of view, these extra
248248
bits are added to integer part.
249249

250250
.. admonition:: Example
@@ -335,6 +335,7 @@ Number of available bits depends on operands types:
335335
guaranteed to perform up to 2 :sup:`24` = 16777216 operations without
336336
overflow.
337337

338+
338339
- **FX16 operands**: 40-bit depth accumulator is used with 1 sign bit
339340
and 39 significant bits. FX16 operands have 1 sign and 15 significant
340341
bits. A multiplication of such operands results in 15 + 15 = 30
@@ -344,6 +345,7 @@ Number of available bits depends on operands types:
344345
For simple accumulation, 39 – 15 = 24 bits are available which
345346
perform up to 2 :sup:`24` = 16777216 operations without overflow.
346347

348+
347349
- **FX16 x FX8 operands**: 32-bit depth accumulator is used. For
348350
MAC-based kernels, 31 – (15 + 7) = 31 - 22 = 9 accumulation bits
349351
are available which can be used to perform up to 2 :sup:`9` = 512

doc/documents/MLI_helpers/convert_tensor.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,17 @@ Parameters
4949
''''''''''
5050

5151
.. table:: Kernel Interface Parameters
52-
:widths: 20,130
53-
54-
+-----------------------+-----------------------+
55-
| **Parameters** | **Description** |
56-
+=======================+=======================+
57-
| ``in`` | [IN] Pointer to input |
58-
| | tensor |
59-
+-----------------------+-----------------------+
60-
| ``start_dim`` | [OUT] Pointer to |
61-
| | output tensor |
62-
+-----------------------+-----------------------+
52+
:widths: 20,130
53+
54+
+-----------------------+-----------------------+
55+
| **Parameters** | **Description** |
56+
+=======================+=======================+
57+
| ``in`` | [IN] Pointer to input |
58+
| | tensor |
59+
+-----------------------+-----------------------+
60+
| ``start_dim`` | [OUT] Pointer to |
61+
| | output tensor |
62+
+-----------------------+-----------------------+
6363

6464
**Returns** - ``status code``
6565

doc/documents/MLI_helpers/count_no_elements.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,17 @@ Parameters
4242
''''''''''
4343

4444
.. table:: Kernel Interface Parameters
45-
:widths: 20,130
46-
47-
+-----------------------+-----------------------+
48-
| **Parameters** | **Description** |
49-
+=======================+=======================+
50-
| ``in`` | [IN] Pointer to input |
51-
| | tensor |
52-
+-----------------------+-----------------------+
53-
| ``start_dim`` | [IN] Start dimension |
54-
| | for counting |
55-
+-----------------------+-----------------------+
45+
:widths: 20,130
46+
47+
+-----------------------+-----------------------+
48+
| **Parameters** | **Description** |
49+
+=======================+=======================+
50+
| ``in`` | [IN] Pointer to input |
51+
| | tensor |
52+
+-----------------------+-----------------------+
53+
| ``start_dim`` | [IN] Start dimension |
54+
| | for counting |
55+
+-----------------------+-----------------------+
5656

5757
**Returns** - *num_of_elements*
5858

doc/documents/MLI_helpers/get_basic_elem_size.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ Parameters
2323
''''''''''
2424

2525
.. table:: Kernel Interface Parameters
26-
:widths: 20,130
27-
28-
+-----------------------+-----------------------+
29-
| **Parameters** | **Description** |
30-
+=======================+=======================+
31-
| ``in`` | [IN] Pointer to input |
32-
| | tensor |
33-
+-----------------------+-----------------------+
26+
:widths: 20,130
27+
28+
+-----------------------+-----------------------+
29+
| **Parameters** | **Description** |
30+
+=======================+=======================+
31+
| ``in`` | [IN] Pointer to input |
32+
| | tensor |
33+
+-----------------------+-----------------------+
3434

3535
**Returns** - Size of basic element in bytes
3636

doc/documents/MLI_kernels/comm_basic_rnn.rst

Lines changed: 49 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ one step of kernel (M or L*M elements for stacked weights matrix).
108108
For the other modes (one-to-one or batch-to-batch), kernel does not
109109
use the intermediate result tensor and this field might not be
110110
initialized. For more information about configuration structure, see
111-
:ref:`fn_conf_brnn`.
111+
:ref:`fn_conf_lstm`.
112112

113113
.. caution::
114114
Ensure that you allocate memory for all tensors (including
@@ -222,59 +222,61 @@ Parameters
222222
''''''''''
223223

224224
.. table:: Kernel Interface Parameters
225-
226-
+-----------------------+-----------------------+
227-
| **Parameters** | **Description** |
228-
+=======================+=======================+
229-
| | |
230-
| ``in`` | [IN] Pointer to input |
231-
| | tensor |
232-
+-----------------------+-----------------------+
233-
| | |
234-
| ``prev_out`` | [IN] Pointer to |
235-
| | previous output |
236-
| | tensor |
237-
+-----------------------+-----------------------+
238-
| | |
239-
| ``weights`` | [IN] Pointer to |
240-
| | weights tensor |
241-
+-----------------------+-----------------------+
242-
| | |
243-
| ``bias`` | [IN] Pointer to |
244-
| | biases tensor |
245-
+-----------------------+-----------------------+
246-
| | |
247-
| ``cfg`` | [IN/OUT] Pointer to |
248-
| | configuration |
249-
| | structure |
250-
+-----------------------+-----------------------+
251-
| | |
252-
| ``out`` | [OUT] Pointer to |
253-
| | output tensor. Result |
254-
| | is stored here |
255-
+-----------------------+-----------------------+
225+
:widths: 20,130
226+
227+
+-----------------------+-----------------------+
228+
| **Parameters** | **Description** |
229+
+=======================+=======================+
230+
| | |
231+
| ``in`` | [IN] Pointer to input |
232+
| | tensor |
233+
+-----------------------+-----------------------+
234+
| | |
235+
| ``prev_out`` | [IN] Pointer to |
236+
| | previous output |
237+
| | tensor |
238+
+-----------------------+-----------------------+
239+
| | |
240+
| ``weights`` | [IN] Pointer to |
241+
| | weights tensor |
242+
+-----------------------+-----------------------+
243+
| | |
244+
| ``bias`` | [IN] Pointer to |
245+
| | biases tensor |
246+
+-----------------------+-----------------------+
247+
| | |
248+
| ``cfg`` | [IN/OUT] Pointer to |
249+
| | configuration |
250+
| | structure |
251+
+-----------------------+-----------------------+
252+
| | |
253+
| ``out`` | [OUT] Pointer to |
254+
| | output tensor. Result |
255+
| | is stored here |
256+
+-----------------------+-----------------------+
256257

257258
.. _kernel-specializations-2:
258259

259260
Kernel Specializations
260261
^^^^^^^^^^^^^^^^^^^^^^
261262

262263
.. table:: Non-Specialized Functions
263-
264-
+---------------------------------------+-----------------------------------+
265-
| **Function** | **Description** |
266-
+=======================================+===================================+
267-
| ``mli_krn_basic_rnn_cell_fx8`` | General function; 8bit FX |
268-
| | elements; |
269-
+---------------------------------------+-----------------------------------+
270-
| ``mli_krn_basic_rnn_cell_fx16`` | General function; 16bit FX |
271-
| | elements; |
272-
+---------------------------------------+-----------------------------------+
273-
| ``mli_krn_basic_rnn_cell_fx8w16d`` | General function; FX tensors |
274-
| | (8bit weights and biases, 16 bit |
275-
| | input, state, cell, output and |
276-
| | intermediate data); |
277-
+---------------------------------------+-----------------------------------+
264+
:widths: 20,130
265+
266+
+---------------------------------------+-----------------------------------+
267+
| **Function** | **Description** |
268+
+=======================================+===================================+
269+
| ``mli_krn_basic_rnn_cell_fx8`` | General function; 8bit FX |
270+
| | elements; |
271+
+---------------------------------------+-----------------------------------+
272+
| ``mli_krn_basic_rnn_cell_fx16`` | General function; 16bit FX |
273+
| | elements; |
274+
+---------------------------------------+-----------------------------------+
275+
| ``mli_krn_basic_rnn_cell_fx8w16d`` | General function; FX tensors |
276+
| | (8bit weights and biases, 16 bit |
277+
| | input, state, cell, output and |
278+
| | intermediate data); |
279+
+---------------------------------------+-----------------------------------+
278280

279281
.. _conditions-for-applying-the-kernel-2:
280282

doc/documents/MLI_kernels/comm_fully_connected.rst

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -66,46 +66,48 @@ Parameters
6666
''''''''''
6767

6868
.. table:: Kernel Interface Parameters
69-
70-
+-----------------------+-----------------------+
71-
| **Parameters** | **Description** |
72-
+=======================+=======================+
73-
| | |
74-
| ``in`` | [IN] Pointer to Input |
75-
| | feature map tensor |
76-
+-----------------------+-----------------------+
77-
| | |
78-
| ``weights`` | [IN] Pointer to |
79-
| | weights tensor |
80-
+-----------------------+-----------------------+
81-
| | |
82-
| ``bias`` | [IN] Pointer to |
83-
| | biases tensor |
84-
+-----------------------+-----------------------+
85-
| | |
86-
| ``out`` | [OUT] Pointer to |
87-
| | output tensor. Result |
88-
| | is stored here |
89-
+-----------------------+-----------------------+
69+
:widths: 20,130
70+
71+
+-----------------------+-----------------------+
72+
| **Parameters** | **Description** |
73+
+=======================+=======================+
74+
| | |
75+
| ``in`` | [IN] Pointer to Input |
76+
| | feature map tensor |
77+
+-----------------------+-----------------------+
78+
| | |
79+
| ``weights`` | [IN] Pointer to |
80+
| | weights tensor |
81+
+-----------------------+-----------------------+
82+
| | |
83+
| ``bias`` | [IN] Pointer to |
84+
| | biases tensor |
85+
+-----------------------+-----------------------+
86+
| | |
87+
| ``out`` | [OUT] Pointer to |
88+
| | output tensor. Result |
89+
| | is stored here |
90+
+-----------------------+-----------------------+
9091

9192
Kernel Specializations
9293
^^^^^^^^^^^^^^^^^^^^^^
9394

9495
.. table:: Non-Specialized Functions
95-
96-
+-------------------------------------+-----------------------------------+
97-
| **Function** | **Description** |
98-
+=====================================+===================================+
99-
| ``mli_krn_fully_connected_fx8`` | General function; 8bit FX |
100-
| | elements; |
101-
+-------------------------------------+-----------------------------------+
102-
| ``mli_krn_fully_connected_fx16`` | General function; 16bit FX |
103-
| | elements; |
104-
+-------------------------------------+-----------------------------------+
105-
| ``mli_krn_fully_connected_fx8w16d`` | General function; FX tensors |
106-
| | (8bit weights and biases, 16 bit |
107-
| | input and output); |
108-
+-------------------------------------+-----------------------------------+
96+
:widths: 20,130
97+
98+
+-------------------------------------+-----------------------------------+
99+
| **Function** | **Description** |
100+
+=====================================+===================================+
101+
| ``mli_krn_fully_connected_fx8`` | General function; 8bit FX |
102+
| | elements; |
103+
+-------------------------------------+-----------------------------------+
104+
| ``mli_krn_fully_connected_fx16`` | General function; 16bit FX |
105+
| | elements; |
106+
+-------------------------------------+-----------------------------------+
107+
| ``mli_krn_fully_connected_fx8w16d`` | General function; FX tensors |
108+
| | (8bit weights and biases, 16 bit |
109+
| | input and output); |
110+
+-------------------------------------+-----------------------------------+
109111

110112
.. _conditions_apply_kernel:
111113

doc/documents/MLI_kernels/comm_lstm.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ Prototype
210210
const mli_tensor *prev_out,
211211
const mli_tensor *weights,
212212
const mli_tensor *bias,
213-
const mli_lstm_cell_cfg *cfg,
213+
const mli_rnn_cell_cfg *cfg,
214214
mli_tensor *cell,
215215
mli_tensor *out);
216216
@@ -253,7 +253,7 @@ Kernel Specializations
253253
^^^^^^^^^^^^^^^^^^^^^^
254254

255255
.. table:: Non-Specialized Functions
256-
:widths: 50,80
256+
:widths: 20,130
257257

258258
+-----------------------------------+-----------------------------------+
259259
| **Function** | **Description** |
@@ -297,7 +297,7 @@ function:
297297
- The input tensor has the following restrictions:
298298

299299
- For ``RNN_ONE_TO_ONE`` mode, the total number of input and previous
300-
output tensors elements (N+M) must be equal to the last dimension of the
300+
output tensor-elements (N+M) must be equal to the last dimension of the
301301
weights tensor
302302

303303
- For ``RNN_BATCH_TO_BATCH`` and ``RNN_BATCH_TO_LAST`` modes, the first

0 commit comments

Comments
 (0)