Skip to content

Commit 39cc0bd

Browse files
dzakharJaccovG
authored andcommitted
[DOCS] Grammar corrections
1 parent 537f4bf commit 39cc0bd

23 files changed

+56
-55
lines changed

doc/documents/data_movement/data_movement.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ The size of the array is defined by ``MLI_MAX_RANK``.
132132

133133
It is possible to combine multiple 'operations' in one move. In that the internal order of how the parameters are
134134
applied is relevant:
135+
135136
- padding_pre/padding_post (using cfg->padding_pre and cfg->padding_post as described in figure :ref:`f_mli_mov_cfg_params_pad`)
136137
- crop (using cfg->offset and cfg->size as described in figure :ref:`f_mli_mov_cfg_params_crop`)
137138
- subsampling (using cfg->sub_sample_step as described in figure :ref:`f_mli_mov_cfg_params_sub`)
@@ -193,7 +194,7 @@ following options to initialize all the fields in a consistent way:
193194
Some operations (like padding, concat, slice, subsample) when applied on the quantization axis will affect the
194195
quantization parameters (e.g. If subsampling on the quantization axis is applied, also the quantization parameters
195196
will be subsampled). For these cases the output tensor should contain valid pre-allocated memory buffers to get
196-
correct quantization parameters, if this is not done, and the pointers are initialized with ``nullptr`` or with the
197+
correct quantization parameters. If this is not done, and the pointers are initialized with ``nullptr`` or with the
197198
same pointers as the src tensor, the result is undefined.
198199

199200
- In case of per-axis quantization of the src tensor, the axis needs to match the (permuted) quantization axis in the

doc/documents/mli_api_data/data_structures.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ The table :ref:`mli_tnsr_struc` describes the fields in the ``mli_tensor`` struc
8484
| | | - ``mem_stride[2] >= 1`` |
8585
| | | |
8686
| | | ``mli_move`` is the only function which can write the ``mem_stride`` field |
87-
| | | of the ``dst`` tensor. Other kernels don't update this Field |
87+
| | | of the ``dst`` tensor. Other kernels don't update this field |
8888
+-------------------+------------------------+-----------------------------------------------------------------------------+
8989
| ``rank`` | ``uint32_t`` | Number of dimensions of this tensor (Must be less or equal to |
9090
| | | ``MLI_MAX_RANK*``) |
@@ -106,11 +106,11 @@ The table :ref:`mli_tnsr_struc` describes the fields in the ``mli_tensor`` struc
106106
..
107107
108108
.. important::
109-
``mli_tensor`` is valid if all it's fields are populated in a non-contradictory way which implies:
109+
``mli_tensor`` is valid if all its fields are populated in a non-contradictory way which implies:
110110

111111
- ``rank`` and ``shape`` fields are aligned with ``mem_strides`` field
112112
- ``data`` container points to a memory region of ``el_type`` elements or contains a single
113-
element itself (see :ref:`c_mli_data_container`). It’s capacity is enough to preserve data described
113+
element itself (see :ref:`c_mli_data_container`). Its capacity is enough to preserve data described
114114
by ``rank``, ``shape`` and ``mem_stride`` fields.
115115
- ``el_params`` structure is filled properly according to ``el_type`` field and
116116
related quantization scheme (see :ref:`data_fmts`)
@@ -186,7 +186,7 @@ It stores pointer to data or a single value that intend to be directly used in a
186186
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
187187

188188
``mli_element_type`` enumeration defines the basic element type stored in tensor structure.
189-
Based on this information library functions may define sizes, algorithms for processing,
189+
Based on this information, library functions may define sizes, algorithms for processing,
190190
and other implementation specific things. ``mli_element_type`` is defined as follows:
191191

192192
.. code:: c

doc/documents/mli_kernels/conv_2d.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,16 +167,16 @@ Conditions
167167
Ensure that you satisfy the following general conditions before calling the function:
168168

169169
- ``in``, ``out``, ``weights`` and ``bias`` tensors must be valid (see :ref:`mli_tnsr_struc`)
170-
and satisfy data requirements of the used version of the kernel.
170+
and satisfy data requirements of the selected version of the kernel.
171171

172172
- Shapes of ``in``, ``out``, ``weights`` and ``bias`` tensors must be compatible,
173173
which implies the following requirements:
174174

175175
- ``in`` and ``out`` are 3-dimensional tensors (rank==3). Dimensions meaning,
176-
and order (layout) is aligned with the used version of kernel.
176+
and order (layout) is aligned with the specific version of kernel.
177177

178178
- ``weights`` is a 4-dimensional tensor (rank==4). Dimensions meaning,
179-
and order (layout) is aligned with the used kernel.
179+
and order (layout) is aligned with the specific kernel.
180180

181181
- ``bias`` must be a one-dimensional tensor (rank==1). Its length must be equal to
182182
:math:`Co` (output channels OR number of filters).
@@ -244,7 +244,7 @@ the following quantization conditions before calling the function:
244244
const float w_scale_1 = 0.00542382f;
245245
float bias_scale = in_w_scale * w_scale_1;
246246
247-
// Derive quantized bias scale and frac bits for it to use it in tensor struct.
247+
// Derive quantized bias scale and frac bits for use in tensor struct.
248248
int exp;
249249
frexpf(bias_scale, &exp);
250250
int bias_scale_frac_bits = 15 - exp;

doc/documents/mli_kernels/conv_depthwise.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,16 +153,16 @@ Conditions
153153
Ensure that you satisfy the following general conditions before calling the function:
154154

155155
- ``in``, ``out``, ``weights`` and ``bias`` tensors must be valid (see :ref:`mli_tnsr_struc`)
156-
and satisfy data requirements of the used version of the kernel.
156+
and satisfy data requirements of the selected version of the kernel.
157157

158158
- Shapes of ``in``, ``out``, ``weights`` and ``bias`` tensors must be compatible,
159159
which implies the following requirements:
160160

161161
- ``in`` and ``out`` are 3-dimensional tensors (rank==3). Dimensions meaning,
162-
and order (layout) is aligned with the used version of kernel.
162+
and order (layout) is aligned with the specific version of kernel.
163163

164164
- ``weights`` is a 4-dimensional tensor (rank==4). Dimensions meaning,
165-
and order (layout) is aligned with the used kernel.
165+
and order (layout) is aligned with the specifc kernel.
166166

167167
- ``bias`` must be a one-dimensional tensor (rank==1). Its length must be equal to
168168
:math:`Co` (output channels OR number of filters).

doc/documents/mli_kernels/conv_grp.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ outputs are then concatenated together to give the final output.
1515

1616
For example, in a HWCN data layout, if the ``in`` feature map is :math:`(Hi, Wi, Ci)` and
1717
the ``weights`` is :math:`(Hk, Wk, Cw, Co)`, the ``output`` feature map is :math:`(Ho, Wo, Co)`
18-
tensor where :math:`Ci` is equalt to :math:`Cw * M` and :math:`Co` is multiple of :math:`M`.
18+
tensor where :math:`Ci` is equal to :math:`Cw * M` and :math:`Co` is multiple of :math:`M`.
1919
Also spatial dimensions :math:`H*, W*` comply with the system of equations :eq:`eq_conv2d_shapes`.
2020

2121
Depthwise convolution (see :ref:`conv_depthwise`) is an extreme case of group
@@ -157,16 +157,16 @@ Ensure that you satisfy the following general conditions before calling the func
157157

158158

159159
- ``in``, ``out``, ``weights`` and ``bias`` tensors must be valid (see :ref:`mli_tnsr_struc`)
160-
and satisfy data requirements of the used version of the kernel.
160+
and satisfy data requirements of the selected version of the kernel.
161161

162162
- Shapes of ``in``, ``out``, ``weights`` and ``bias`` tensors must be compatible,
163163
which implies the following requirements:
164164

165165
- ``in`` and ``out`` are 3-dimensional tensors (rank==3). Dimensions meaning,
166-
and order (layout) is aligned with the used version of kernel.
166+
and order (layout) is aligned with the specifc version of kernel.
167167

168168
- ``weights`` is a 4-dimensional tensor (rank==4). Dimensions meaning,
169-
and order (layout) is aligned with the used kernel.
169+
and order (layout) is aligned with the specific kernel.
170170

171171
- ``bias`` must be a one-dimensional tensor (rank==1). Its length must be equal to
172172
:math:`Co` (output channels OR number of filters).

doc/documents/mli_kernels/conv_transp.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,16 +175,16 @@ Conditions
175175
Ensure that you satisfy the following general conditions before calling the function:
176176

177177
- ``in``, ``out``, ``weights`` and ``bias`` tensors must be valid (see :ref:`mli_tnsr_struc`)
178-
and satisfy data requirements of the used version of the kernel.
178+
and satisfy data requirements of the selected version of the kernel.
179179

180180
- Shapes of ``in``, ``out``, ``weights`` and ``bias`` tensors must be compatible,
181181
which implies the following requirements:
182182

183183
- ``in`` and ``out`` are 3-dimensional tensors (rank==3). Dimensions meaning,
184-
and order (layout) is aligned with the used version of kernel.
184+
and order (layout) is aligned with the specific version of kernel.
185185

186186
- ``weights`` is a 4-dimensional tensor (rank==4). Dimensions meaning,
187-
and order (layout) is aligned with the used kernel.
187+
and order (layout) is aligned with the specific kernel.
188188

189189
- ``bias`` must be a one-dimensional tensor (rank==1). Its length must be equal to
190190
:math:`Co` (output channels OR number of filters).

doc/documents/mli_kernels/div_argmax.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Conditions
8787
Ensure that you satisfy the following general conditions before calling the function:
8888

8989
- ``in`` tensor must be valid (see :ref:`mli_tnsr_struc`)
90-
and satisfy data requirements of the used version of the kernel.
90+
and satisfy data requirements of the selected version of the kernel.
9191

9292
- ``out`` tensor must be valid (see :ref:`mli_tnsr_struc`)
9393
and satisfy the following requiremens:

doc/documents/mli_kernels/div_permute.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Conditions
9191
Ensure that you satisfy the following general conditions before calling the function:
9292

9393
- ``in`` and ``out`` tensors must be valid (see :ref:`mli_tnsr_struc`)
94-
and satisfy data requirements of the used version of the kernel.
94+
and satisfy data requirements of the selected version of the kernel.
9595

9696
- Shape of ``out`` tensor must reflect already permuted shape of ``in`` tensor.
9797

@@ -100,7 +100,7 @@ Ensure that you satisfy the following general conditions before calling the func
100100
- ``mem_stride`` of the innermost dimension must be equal to 1 for all the tensors.
101101

102102
- Only first N (equal to ``rank`` of ``in`` tensor) values in permutation order array are considered
103-
by kernel. All of them must be unique, nonnegative and less than the ``rank`` of the ``in`` tensor.
103+
by kernel. All of them must be unique, non-negative and less than the ``rank`` of the ``in`` tensor.
104104

105105
Result
106106
^^^^^^
@@ -113,7 +113,7 @@ These functions modify:
113113
It is assumed that all the other fields and structures are properly populated
114114
to be used in calculations and are not modified by the kernel.
115115

116-
For **fx8** and **fx16** ``el_params`` field of ``in`` tensor is copyed to the ``out`` tensor. The same is applyed for
116+
For **fx8** and **fx16** ``el_params`` field of ``in`` tensor is copyed to the ``out`` tensor. The same is applied for
117117
**sa8** versions of kernel in case of per-tensor quantization (``in.el_params.sa.dim`` < 0)
118118

119119
For **sa8** versions of kernel, and in case of per-axis quantization, the ``el_params`` field of the

doc/documents/mli_kernels/elemw_grp.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Conditions
8181
Ensure that you satisfy the following general conditions before calling the function:
8282

8383
- ``in1``, ``in2`` and ``out`` tensors must be valid (see :ref:`mli_tnsr_struc`)
84-
and satisfy data requirements of the used version of the kernel.
84+
and satisfy data requirements of the specific version of the kernel.
8585

8686
- Shapes of ``in1``, ``in2`` and ``out`` tensors must be compatible,
8787
which implies the following requirements:

doc/documents/mli_kernels/pool_avg.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,13 @@ Conditions
9393
Ensure that you satisfy the following general conditions before calling the function:
9494

9595
- ``in`` and ``out`` tensors must be valid (see :ref:`mli_tnsr_struc`)
96-
and satisfy data requirements of the used version of the kernel.
96+
and satisfy data requirements of the selected version of the kernel.
9797

9898
- Shapes of ``in`` and ``out`` tensors must be compatible,
9999
which implies the following requirements:
100100

101101
- ``in`` and ``out`` are 3-dimensional tensors (rank==3). Dimensions meaning,
102-
and order (layout) is aligned with the used version of kernel.
102+
and order (layout) is aligned with the specific version of kernel.
103103

104104
- Channel :math:`Ci` dimension of ``in`` and ``out`` tensors must be equal.
105105

0 commit comments

Comments
 (0)