Skip to content

Commit 76418bf

Browse files
rkedar1JaccovG
authored andcommitted
Fixing long tables and table widths
1 parent 5094f3c commit 76418bf

25 files changed

+765
-472
lines changed

doc/documents/data_movement/data_movement.rst

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Data Movement
44
=============
55

66
Most processors and accelerators achieve optimal performance by keeping the kernel
7-
input data in close local memories on those processors (for example, CCMs). Meanwhile,
7+
input data in "close" local memories on those processors (for example, CCMs). Meanwhile,
88
the total amount of data that needs to be operated on is usually bigger than the
99
sizes of those CCMs, so you must copy data into CCMs for processing.
1010

@@ -89,21 +89,26 @@ read from the array. The other values are "don't care".
8989

9090
The size of the array is defined by ``MLI_MAX_RANK``.
9191

92+
.. tabularcolumns:: |\Y{0.25}|\Y{0.15}|\Y{0.4}|
93+
9294
.. _t_mli_mov_cfg_desc:
9395
.. table:: mli_mov_cfg Structure Field Description
9496
:align: center
95-
:widths: auto
97+
:class: longtable
9698

9799
+---------------------+----------------+---------------------------------------------------------------------+
98100
| **Field Name** | **Type** | **Description** |
99101
+=====================+================+=====================================================================+
100102
| ``offset`` | ``uint32_t[]`` | Start coordinate in the source tensor. Values must be smaller |
101103
| | | than the shape of the source tensor. |
102104
+---------------------+----------------+---------------------------------------------------------------------+
103-
| | || Size of the copy in elements per dimension. |
104-
| ``size`` | ``uint32_t[]`` || Restrictions: |
105-
| | || :math:`Size[d] + offset[d] <= src->shape[d]` |
106-
| | || If :math:`size=0` is provided, the size is computed from the input |
105+
| | | Size of the copy in elements per dimension. |
106+
| | | |
107+
| ``size`` | ``uint32_t[]`` | Restrictions: |
108+
| | | |
109+
| | | :math:`Size[d] + offset[d] <= src->shape[d]` |
110+
| | | |
111+
| | | If :math:`size=0` is provided, the size is computed from the input |
107112
| | | size and the cfg parameters. |
108113
+---------------------+----------------+---------------------------------------------------------------------+
109114
| | | Subsample factor for each dimension. Default value is 1, which |
@@ -222,10 +227,12 @@ into the cfg struct while the remaining parameters are set to their default valu
222227
transformations, there is a generic helper function available or the user can manually fill the cfg struct
223228
parameters. Note that the mli_mov_cfg structure is described in detail in :ref:`t_mli_mov_cfg_desc`.
224229

230+
.. tabularcolumns:: |\Y{0.4}|\Y{0.6}|
231+
225232
.. _t_desc_helper_func:
226233
.. table:: Description of Helper Functions for Data Move Config Struct
227234
:align: center
228-
:widths: auto
235+
:class: longtable
229236

230237
+------------------------------------+---------------------------------------------------------------------+
231238
| **Function Name** | **Description** |
@@ -404,10 +411,11 @@ initialization. Table :ref:`t_mli_mov_prep` describes the parameters of this fun
404411
mli_mov_prepare(mli_mov_handle_t* h, const mli_tensor* src, const mli_mov_cfg_t* cfg, mli_tensor* dst);
405412
..
406413
414+
.. tabularcolumns:: |\Y{0.35}|\Y{0.65}|
415+
407416
.. _t_mli_mov_prep:
408417
.. table:: mli_mov_prepare Parameters
409418
:align: center
410-
:widths: auto
411419

412420
+--------------------------+-------------------------------------------------------------+
413421
| **Parameter Name** | **Description** |

doc/documents/mli_api_data/data_layouts.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ dimensions and its meaning) is important as it dictates the way calculations are
99
Other kernels are layout-agnostic, or imply non-vision meaning of dimensions. The table
1010
:ref:`t_layout_letter_desc` describes the letters used for the layout description.
1111

12+
.. tabularcolumns:: |\Y{0.2}|\Y{0.4}|
13+
1214
.. _t_layout_letter_desc:
1315
.. table:: Layout Letter Description
1416
:align: center
@@ -39,7 +41,7 @@ MLI Data layout (HWCN)
3941
^^^^^^^^^^^^^^^^^^^^^^
4042

4143
Layout-dependent MLI kernels use the HWC layout for tensors and HWCN layout for weights.
42-
The Height/Width/Channel layout is also referred as Interleaved or Channel last.
44+
The Height/Width/Channel layout is also referred as "Interleaved" or "Channel last".
4345
The smallest stride between dimension elements in memory is for C (channel or depth)
4446
followed by the width and then the height. The height is the least frequently changing
4547
index.
@@ -75,11 +77,12 @@ transpose function can also be used to convert one layout into another layout.
7577
Description
7678
"""""""""""
7779

80+
.. tabularcolumns:: |\Y{0.2}|\Y{0.4}|
81+
7882
.. _t_hwcn_spec:
7983
.. table:: The HWCN Layout
8084
:align: center
81-
:widths: 60, 130
82-
85+
8386
+--------------------+---------------------------------------------+
8487
| **Aspect** | **Comment** |
8588
+====================+=============================================+

doc/documents/mli_api_data/data_structures.rst

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@ shape of this array, its data format, and the way it is organized in memory.
3535
3636
The table :ref:`mli_tnsr_struc` describes the fields in the ``mli_tensor`` structure.
3737

38+
.. tabularcolumns:: |\Y{0.2}|\Y{0.3}|\Y{0.5}|
39+
3840
.. _mli_tnsr_struc:
3941
.. table:: mli_tensor Structure Field Descriptions
4042
:align: center
41-
:widths: 50, 50, 130
43+
:class: longtable
4244

4345
+-------------------+------------------------+-----------------------------------------------------------------------------+
4446
| **Field name** | **type** | **Comment** |
@@ -145,10 +147,12 @@ It stores pointer to data or a single value that intend to be directly used in a
145147
146148
:ref:`t_mli_d_cont_strct` describes the fields in the ``mli_data_container`` struture.
147149

150+
.. tabularcolumns:: |\Y{0.2}|\Y{0.2}|\Y{0.6}|
151+
148152
.. _t_mli_d_cont_strct:
149153
.. table:: mli_data_container Structure Field Description
150154
:align: center
151-
:widths: 50, 50, 130
155+
:class: longtable
152156

153157
+--------------------+------------------+----------------------------------------------------------------------+
154158
| **Field Name** | **Type** | **Comment** |
@@ -204,10 +208,11 @@ and other implementation specific things. ``mli_element_type`` is defined as fo
204208
205209
:ref:`t_mli_el_type` describes the entities in the ``mli_element_type`` union.
206210

211+
.. tabularcolumns:: |\Y{0.25}|\Y{0.5}|
212+
207213
.. _t_mli_el_type:
208214
.. table:: mli_element_type Enumeration Values Description
209215
:align: center
210-
:widths: 50, 50, 130
211216

212217
+-----------------------+----------------------------------------------------------------------------+
213218
| **Enumeration Value** | **Description** |
@@ -272,10 +277,12 @@ quantization parameters can vary. For instance in a CHW layout, ``dim`` = 0 mean
272277
a different zero point and a different scale factor. The size of these arrays is the same as the number of
273278
channels in the tensor ``(array_size = shape[dim])``.
274279

280+
.. tabularcolumns:: |\Y{0.3}|\Y{0.3}|\Y{0.4}|
281+
275282
.. _t_mli_el_p_union:
276283
.. table:: mli_element_params Union Field Description
277284
:align: center
278-
:widths: 50, 50, 130
285+
:class: longtable
279286

280287
+------------------------+------------------------+-----------------------------------------------------------------------------+
281288
| **Field Name** | **Type** | **Comment** |
@@ -336,6 +343,10 @@ channels in the tensor ``(array_size = shape[dim])``.
336343
// Filling other fields of tsr_fx16
337344
338345
..
346+
..
347+
348+
.. admonition:: Example
349+
:class: "admonition tip"
339350

340351
SA8 tensor quantized on per-tensor level might be populated in the following way:
341352

@@ -360,6 +371,10 @@ channels in the tensor ``(array_size = shape[dim])``.
360371
// Filling other fields of tsr_sa8
361372
362373
..
374+
..
375+
376+
.. admonition:: Example
377+
:class: "admonition tip"
363378

364379
SA8 tensor quantized on per-axis level might be populated in the following way:
365380

@@ -415,12 +430,14 @@ The ``mli_lut`` struct describes the data in the LUT, including the format of it
415430
..
416431
417432
The following table describes the fields in the ``mli_lut`` structure.
433+
434+
.. tabularcolumns:: |\Y{0.2}|\Y{0.3}|\Y{0.5}|
418435

419436
.. _mli_lut_struct_table:
420437
.. table:: mli_lut Structure Field Descriptions
421438
:align: center
422-
:widths: 50, 50, 130
423-
439+
:class: longtable
440+
424441
+-------------------+------------------------+-----------------------------------------------------------------------------+
425442
| **Field name** | **type** | **Comment** |
426443
+===================+========================+=============================================================================+

doc/documents/mli_api_data/error_codes.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ Error Codes
66
Most functions return a value of type mli_status. This is an enumeration type with fields
77
as described in table :ref:`t_mli_status_enum`.
88

9+
.. tabularcolumns:: |\Y{0.4}|\Y{0.15}|\Y{0.45}|
10+
911
.. _t_mli_status_enum:
1012
.. table:: mli_status Enum Fields
1113
:align: center
12-
:widths: 50, 50, 130
14+
:class: longtable
1315

1416
+-------------------------------------+----------------+--------------------------------------------------------------------------+
1517
| **Field name** | **value** | **Description** |

0 commit comments

Comments
 (0)