Skip to content

Commit 4233e10

Browse files
authored
Merge branch 'master' into cleanup_logic_func
2 parents 5869e1f + 3d11b5c commit 4233e10

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+249
-239
lines changed

doc/docstring_template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def func(a, b=None, c=True):
7878
-----------
7979
Some limitations in comparison to baseline, ex:
8080
Input array data types are limited by supported DPNP :ref:`Data types`.
81-
Parameter ``c`` is supported only with default value ``True``.
81+
Parameter `c` is supported only with default value ``True``.
8282
Otherwise the function will be executed sequentially on CPU.
8383
8484
See Also

dpnp/backend/cmake/Modules/MKLConfig.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ if(GNU_C_COMPILER OR GNU_Fortran_COMPILER)
414414
endif()
415415
endif()
416416

417-
# Additonal compiler & linker options
417+
# Additional compiler & linker options
418418
if(CXX_COMPILER_NAME STREQUAL "icpx" OR CXX_COMPILER_NAME STREQUAL "icx.exe")
419419
list(APPEND MKL_DPCPP_COPT "-fsycl")
420420
list(APPEND MKL_DPCPP_LOPT "-fsycl")

dpnp/backend/examples/example8.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ int main(int, char **)
5656

5757
dpnp_argsort_c<double, long>(array, result, size);
5858

59-
std::cout << "array with 'sorted' indeces" << std::endl;
59+
std::cout << "array with 'sorted' indices" << std::endl;
6060
for (size_t i = 0; i < size; ++i) {
6161
std::cout << result[i] << ", ";
6262
}

dpnp/backend/extensions/lapack/heevd.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ static sycl::event heevd_impl(sycl::queue exec_q,
114114
info = -1;
115115
}
116116

117-
if (info != 0) // an unexected error occurs
117+
if (info != 0) // an unexpected error occurs
118118
{
119119
if (scratchpad != nullptr) {
120120
sycl::free(scratchpad, exec_q);
@@ -188,8 +188,9 @@ std::pair<sycl::event, sycl::event>
188188
bool is_eig_vecs_f_contig = eig_vecs.is_f_contiguous();
189189
bool is_eig_vals_c_contig = eig_vals.is_c_contiguous();
190190
if (!is_eig_vecs_f_contig) {
191-
throw py::value_error("An array with input matrix / ouput eigenvectors "
192-
"must be F-contiguous");
191+
throw py::value_error(
192+
"An array with input matrix / output eigenvectors "
193+
"must be F-contiguous");
193194
}
194195
else if (!is_eig_vals_c_contig) {
195196
throw py::value_error(

dpnp/backend/extensions/lapack/syevd.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static sycl::event syevd_impl(sycl::queue exec_q,
112112
info = -1;
113113
}
114114

115-
if (info != 0) // an unexected error occurs
115+
if (info != 0) // an unexpected error occurs
116116
{
117117
if (scratchpad != nullptr) {
118118
sycl::free(scratchpad, exec_q);
@@ -186,8 +186,9 @@ std::pair<sycl::event, sycl::event>
186186
bool is_eig_vecs_f_contig = eig_vecs.is_f_contiguous();
187187
bool is_eig_vals_c_contig = eig_vals.is_c_contiguous();
188188
if (!is_eig_vecs_f_contig) {
189-
throw py::value_error("An array with input matrix / ouput eigenvectors "
190-
"must be F-contiguous");
189+
throw py::value_error(
190+
"An array with input matrix / output eigenvectors "
191+
"must be F-contiguous");
191192
}
192193
else if (!is_eig_vals_c_contig) {
193194
throw py::value_error(
@@ -202,7 +203,7 @@ std::pair<sycl::event, sycl::event>
202203

203204
if (eig_vecs_type_id != eig_vals_type_id) {
204205
throw py::value_error(
205-
"Types of eigenvectors and eigenvalues are missmatched");
206+
"Types of eigenvectors and eigenvalues are mismatched");
206207
}
207208

208209
syevd_impl_fn_ptr_t syevd_fn = syevd_dispatch_vector[eig_vecs_type_id];

dpnp/backend/extensions/sycl_ext/dispatcher_utils.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,8 +388,8 @@ struct CartesianDispatcher
388388

389389
FnT operator()(std::initializer_list<DispatchT> values)
390390
{
391-
// though std::initializer_list::size is constexpr it doesnt work for
392-
// some reson constexpr auto const list_size = values.size();
391+
// though std::initializer_list::size is constexpr it doesn't work for
392+
// some reason constexpr auto const list_size = values.size();
393393
std::array<int, sizeof...(Axis)> idx;
394394
bool found =
395395
coord_in_space<DispatchT, Matcher, std::tuple<Axis...>>::get(

dpnp/backend/extensions/sycl_ext/sum_mean.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ bool check_limitations(const dpctl::tensor::usm_ndarray &in,
6161
size_t out_full_size = out.get_size() * out.get_elemsize();
6262
if (out_full_size > local_mem_size) {
6363
if (throw_on_fail)
64-
throw py::value_error("Resulting array exceeds local memroy size" +
64+
throw py::value_error("Resulting array exceeds local memory size" +
6565
std::to_string(local_mem_size));
6666

6767
return false;

dpnp/backend/extensions/vm/common.hpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,15 @@ std::pair<sycl::event, sycl::event>
124124
return std::make_pair(sycl::event(), sycl::event());
125125
}
126126

127-
// ensure that output is ample enough to accomodate all elements
127+
// ensure that output is ample enough to accommodate all elements
128128
auto dst_offsets = dst.get_minmax_offsets();
129-
// destination must be ample enough to accomodate all elements
129+
// destination must be ample enough to accommodate all elements
130130
{
131131
size_t range =
132132
static_cast<size_t>(dst_offsets.second - dst_offsets.first);
133133
if (range + 1 < src_nelems) {
134134
throw py::value_error(
135-
"Destination array can not accomodate all the elements "
135+
"Destination array can not accommodate all the elements "
136136
"of source array.");
137137
}
138138
}
@@ -225,15 +225,15 @@ std::pair<sycl::event, sycl::event> binary_ufunc(
225225
return std::make_pair(sycl::event(), sycl::event());
226226
}
227227

228-
// ensure that output is ample enough to accomodate all elements
228+
// ensure that output is ample enough to accommodate all elements
229229
auto dst_offsets = dst.get_minmax_offsets();
230-
// destination must be ample enough to accomodate all elements
230+
// destination must be ample enough to accommodate all elements
231231
{
232232
size_t range =
233233
static_cast<size_t>(dst_offsets.second - dst_offsets.first);
234234
if (range + 1 < src_nelems) {
235235
throw py::value_error(
236-
"Destination array can not accomodate all the "
236+
"Destination array can not accommodate all the "
237237
"elements of source array.");
238238
}
239239
}
@@ -329,9 +329,9 @@ bool need_to_call_unary_ufunc(sycl::queue exec_q,
329329
return false;
330330
}
331331

332-
// ensure that output is ample enough to accomodate all elements
332+
// ensure that output is ample enough to accommodate all elements
333333
auto dst_offsets = dst.get_minmax_offsets();
334-
// destination must be ample enough to accomodate all elements
334+
// destination must be ample enough to accommodate all elements
335335
{
336336
size_t range =
337337
static_cast<size_t>(dst_offsets.second - dst_offsets.first);
@@ -346,7 +346,7 @@ bool need_to_call_unary_ufunc(sycl::queue exec_q,
346346
return false;
347347
}
348348

349-
// suppport only contiguous inputs
349+
// support only contiguous inputs
350350
bool is_src_c_contig = src.is_c_contiguous();
351351
bool is_dst_c_contig = dst.is_c_contiguous();
352352

@@ -425,9 +425,9 @@ bool need_to_call_binary_ufunc(sycl::queue exec_q,
425425
return false;
426426
}
427427

428-
// ensure that output is ample enough to accomodate all elements
428+
// ensure that output is ample enough to accommodate all elements
429429
auto dst_offsets = dst.get_minmax_offsets();
430-
// destination must be ample enough to accomodate all elements
430+
// destination must be ample enough to accommodate all elements
431431
{
432432
size_t range =
433433
static_cast<size_t>(dst_offsets.second - dst_offsets.first);
@@ -442,7 +442,7 @@ bool need_to_call_binary_ufunc(sycl::queue exec_q,
442442
return false;
443443
}
444444

445-
// suppport only contiguous inputs
445+
// support only contiguous inputs
446446
bool is_src1_c_contig = src1.is_c_contiguous();
447447
bool is_src2_c_contig = src2.is_c_contiguous();
448448
bool is_dst_c_contig = dst.is_c_contiguous();

dpnp/backend/include/dpnp_iface.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ INP_DLLEXPORT void
10151015
*
10161016
* @param [in] q_ref Reference to SYCL queue.
10171017
* @param [in] array Input array with data.
1018-
* @param [out] result Output array with indeces.
1018+
* @param [out] result Output array with indices.
10191019
* @param [in] size Number of elements in input arrays.
10201020
* @param [in] dep_event_vec_ref Reference to vector of SYCL events.
10211021
*/
@@ -1069,7 +1069,7 @@ INP_DLLEXPORT void dpnp_searchsorted_c(void *result,
10691069
*
10701070
* @param [in] q_ref Reference to SYCL queue.
10711071
* @param [in] array Input array with data.
1072-
* @param [out] result Output array with indeces.
1072+
* @param [out] result Output array with indices.
10731073
* @param [in] size Number of elements in input arrays.
10741074
* @param [in] dep_event_vec_ref Reference to vector of SYCL events.
10751075
*/
@@ -1564,7 +1564,7 @@ INP_DLLEXPORT void dpnp_min_c(void *array,
15641564
*
15651565
* @param [in] q_ref Reference to SYCL queue.
15661566
* @param [in] array Input array with data.
1567-
* @param [out] result Output array with indeces.
1567+
* @param [out] result Output array with indices.
15681568
* @param [in] size Number of elements in input array.
15691569
* @param [in] dep_event_vec_ref Reference to vector of SYCL events.
15701570
*/
@@ -1585,7 +1585,7 @@ INP_DLLEXPORT void dpnp_argmax_c(void *array, void *result, size_t size);
15851585
*
15861586
* @param [in] q_ref Reference to SYCL queue.
15871587
* @param [in] array Input array with data.
1588-
* @param [out] result Output array with indeces.
1588+
* @param [out] result Output array with indices.
15891589
* @param [in] size Number of elements in input array.
15901590
* @param [in] dep_event_vec_ref Reference to vector of SYCL events.
15911591
*/
@@ -1606,7 +1606,7 @@ INP_DLLEXPORT void dpnp_argmin_c(void *array, void *result, size_t size);
16061606
*
16071607
* @param [in] q_ref Reference to SYCL queue.
16081608
* @param [in] input_in Input array with data.
1609-
* @param [out] result_out Output array with indeces.
1609+
* @param [out] result_out Output array with indices.
16101610
* @param [in] input_size Number of elements in input arrays.
16111611
* @param [in] decimals Number of decimal places to round. Support
16121612
* only with default value 0.
@@ -1633,7 +1633,7 @@ INP_DLLEXPORT void dpnp_around_c(const void *input_in,
16331633
*
16341634
* @param [in] q_ref Reference to SYCL queue.
16351635
* @param [in] array Input array with data.
1636-
* @param [out] result Output array with indeces.
1636+
* @param [out] result Output array with indices.
16371637
* @param [in] shape Shape of input array.
16381638
* @param [in] ndim Number of elements in shape.
16391639
* @param [in] axis Axis.
@@ -1819,7 +1819,7 @@ INP_DLLEXPORT void dpnp_triu_c(void *array,
18191819
*
18201820
* @param [in] q_ref Reference to SYCL queue.
18211821
* @param [in] array Input array with data.
1822-
* @param [out] result Output array with indeces.
1822+
* @param [out] result Output array with indices.
18231823
* @param [in] shape Shape of input array.
18241824
* @param [in] ndim Number of elements in shape.
18251825
* @param [in] axis Axis.

dpnp/backend/include/dpnp_iface_fptr.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ DPNPFuncData_t get_dpnp_function_ptr(
526526
* @ingroup BACKEND_API
527527
* @brief get runtime pointer to selected function
528528
*
529-
* Same interface function as @ref get_dpnp_function_ptr with a bit diffrent
529+
* Same interface function as @ref get_dpnp_function_ptr with a bit different
530530
* interface
531531
*
532532
* @param [out] result_type Type of the result provided by the backend API

dpnp/backend/include/dpnp_iface_random.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ INP_DLLEXPORT void dpnp_rng_gamma_c(void *result,
205205
/**
206206
* @ingroup BACKEND_RANDOM_API
207207
* @brief math library implementation of random number generator (gaussian
208-
* continious distribution)
208+
* continuous distribution)
209209
*
210210
* @param [in] q_ref Reference to SYCL queue.
211211
* @param [out] result Output array.
@@ -431,7 +431,7 @@ INP_DLLEXPORT void dpnp_rng_multinomial_c(void *result,
431431
* @param [in] q_ref Reference to SYCL queue.
432432
* @param [out] result Output array.
433433
* @param [in] dimen Dimension of output random vectors.
434-
* @param [in] mean_in Mean arry of dimension.
434+
* @param [in] mean_in Mean array of dimension.
435435
* @param [in] mean_size Length of `mean_in`.
436436
* @param [in] cov Variance-covariance matrix.
437437
* @param [in] cov_size Length of `cov_in`.
@@ -518,7 +518,7 @@ INP_DLLEXPORT void dpnp_rng_noncentral_chisquare_c(void *result,
518518
/**
519519
* @ingroup BACKEND_RANDOM_API
520520
* @brief math library implementation of random number generator (normal
521-
* continious distribution)
521+
* continuous distribution)
522522
*
523523
* @param [in] q_ref Reference to SYCL queue.
524524
* @param [out] result_out Output array.
@@ -645,7 +645,7 @@ INP_DLLEXPORT void
645645
* @param [in] itemsize Length of `result` array element in bytes.
646646
* @param [in] ndim Number of array dimensions in `result`
647647
* arrays.
648-
* @param [in] high_dim_size Number of elements in `result` arrays higer
648+
* @param [in] high_dim_size Number of elements in `result` arrays higher
649649
* dimension, or len(result).
650650
* @param [in] size Number of elements in `result` arrays.
651651
* @param [in] dep_event_vec_ref Reference to vector of SYCL events.

dpnp/backend/kernels/dpnp_krnl_bitwise.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ static void func_map_init_bitwise_1arg_1type(func_map_t &fmap)
264264
} \
265265
\
266266
/* memory transfer optimization, use USM-host for temporary speeds \
267-
* up tranfer to device */ \
267+
* up transfer to device */ \
268268
using usm_host_allocatorT = \
269269
sycl::usm_allocator<shape_elem_type, sycl::usm::alloc::host>; \
270270
\

dpnp/backend/kernels/dpnp_krnl_common.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ DPCTLSyclEventRef dpnp_dot_c(DPCTLSyclQueueRef q_ref,
322322
// TODO: rewrite the condition in general case for ndims > 2
323323
// (looks like there are such another cases)
324324
if (ext_input1_ndim == 2 && ext_input2_ndim == 2) {
325-
// OneMKL gemm suports only arrays contiguous on inner dimension,
325+
// OneMKL gemm supports only arrays contiguous on inner dimension,
326326
// so stride for at least one dimension should be equal to 1
327327
if ((ext_input1_strides[0] == 1 || ext_input1_strides[1] == 1) &&
328328
(ext_input2_strides[0] == 1 || ext_input2_strides[1] == 1) &&
@@ -392,7 +392,7 @@ DPCTLSyclEventRef dpnp_dot_c(DPCTLSyclQueueRef q_ref,
392392
info = -1;
393393
}
394394

395-
if (info != 0) // an unexected error occurs
395+
if (info != 0) // an unexpected error occurs
396396
{
397397
throw std::runtime_error(error_msg.str());
398398
}

dpnp/backend/kernels/dpnp_krnl_elemwise.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
} \
9393
\
9494
/* memory transfer optimization, use USM-host for temporary speeds \
95-
* up tranfer to device */ \
95+
* up transfer to device */ \
9696
using usm_host_allocatorT = \
9797
sycl::usm_allocator<shape_elem_type, sycl::usm::alloc::host>; \
9898
\
@@ -754,7 +754,7 @@ constexpr auto dispatch_fmod_op(T elem1, T elem2)
754754
} \
755755
\
756756
/* memory transfer optimization, use USM-host for temporary speeds \
757-
* up tranfer to device */ \
757+
* up transfer to device */ \
758758
using usm_host_allocatorT = \
759759
sycl::usm_allocator<shape_elem_type, sycl::usm::alloc::host>; \
760760
\
@@ -1146,7 +1146,7 @@ static void func_map_init_elemwise_1arg_1type(func_map_t &fmap)
11461146
} \
11471147
\
11481148
/* memory transfer optimization, use USM-host for temporary speeds \
1149-
* up tranfer to device */ \
1149+
* up transfer to device */ \
11501150
using usm_host_allocatorT = \
11511151
sycl::usm_allocator<shape_elem_type, sycl::usm::alloc::host>; \
11521152
\

dpnp/backend/kernels/dpnp_krnl_logic.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ static sycl::event dpnp_allclose(sycl::queue &q,
197197
}
198198
}
199199

200-
// casting integeral to floating type to avoid bad behavior
200+
// casting integral to floating type to avoid bad behavior
201201
// on abs(MIN_INT), which leads to undefined result
202202
using _Arr2Type = std::conditional_t<std::is_integral_v<_DataType2>,
203203
_TolType, _DataType2>;
@@ -525,7 +525,7 @@ DPCTLSyclEventRef (*dpnp_any_ext_c)(DPCTLSyclQueueRef,
525525
} \
526526
\
527527
/* memory transfer optimization, use USM-host for temporary speeds \
528-
* up tranfer to device */ \
528+
* up transfer to device */ \
529529
using usm_host_allocatorT = \
530530
sycl::usm_allocator<shape_elem_type, sycl::usm::alloc::host>; \
531531
\

dpnp/backend/src/dpnp_fptr.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ struct func_type_map_factory_t : public Ps...
9898
};
9999

100100
/**
101-
* A map of the FPTR interface to link Data type enum value with accociated C++
101+
* A map of the FPTR interface to link Data type enum value with associated C++
102102
* type
103103
*/
104104
typedef func_type_map_factory_t<

dpnp/backend/src/dpnp_iterator.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
* @ingroup BACKEND_UTILS
4141
* @brief Iterator for @ref DPNPC_id type
4242
*
43-
* This type should be used to simplify data iteraton over input with parameters
43+
* This type should be used to simplify data iteration over input with
44+
* parameters
4445
* "[axis|axes]" It is designed to be used in SYCL environment
4546
*
4647
*/

0 commit comments

Comments
 (0)